Subject: misc/1464: crunchgen and special srcdir
To: None <gnats-bugs@NetBSD.ORG>
From: Matthias Pfaller <leo@dachau.marco.de>
List: netbsd-bugs
Date: 09/15/1995 10:24:21
>Number:         1464
>Category:       misc
>Synopsis:       crunchgen should search "special srcdirs" in "normal dirs"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 15 04:35:02 1995
>Last-Modified:
>Originator:     Matthias Pfaller
>Organization:
	marco GmbH, Dachau, Germany
>Release:        95/08/26
>Environment:
System: NetBSD robin 1.0A NetBSD 1.0A (ROBIN) #3: Mon Sep 11 16:07:11 MSZ 1995 leo@robin:/usr/src/sys/arch/i386/compile/ROBIN i386


>Description:
At the moment it is necessary to specify the absolute path of special srcdirs.
So if one would like to have vi on the install disk, you have to use an
absolute path to /usr/src/usr.bin/vi/common. crunchgen should look for the
special src path in all directories it knows about
>How-To-Repeat:
>Fix:
--- crunchgen.c.orig	Sat May 13 12:06:38 1995
+++ crunchgen.c	Tue Sep 12 22:40:02 1995
@@ -482,6 +482,15 @@
 
     if(!p->ident) 
 	p->ident = genident(p->name);
+    if(p->srcdir && *p->srcdir != '/' && !is_dir(p->srcdir)) {
+	srcparent = dir_search(p->srcdir);
+	if (srcparent)
+	    sprintf(path, "%s/%s", srcparent, p->srcdir);
+	if(is_dir(path)) {
+	    free(p->srcdir);
+	    p->srcdir = strdup(path);
+	}
+    }	
     if(!p->srcdir) {
 	srcparent = dir_search(p->name);
 	if(srcparent)
-- 
leo@dachau.marco.de			in real life: Matthias Pfaller
marco GmbH, 85221 Dachau, Germany	tel: +49 8131 516142
>Audit-Trail:
>Unformatted: