Subject: pkg/13413: pkgtools/pkgchk patch for using BSD_PKG_MK when using /etc/mk.conf
To: None <gnats-bugs@gnats.netbsd.org>
From: Stoned Elipot <seb@pbox.org>
List: netbsd-bugs
Date: 07/09/2001 00:18:24
>Number:         13413
>Category:       pkg
>Synopsis:       pkgtools/pkgchk patch for using BSD_PKG_MK when using /etc/mk.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 08 15:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Stoned Elipot
>Release:        pkgsrc-current
>Organization:
SCRIPT, Paris VII University, France
>Environment:
System: NetBSD nakano 1.5 NetBSD 1.5 (NAKANO) #1: Mon Jun 25 15:11:24 CEST 2001     seb@nakano:/site/a/src/kernels/compile/NAKANO i386
>Description:
pkgchk(8) use make and /etc/mk.conf to get PKGSRCDIR value. If one uses
- as suggested in mk/mk.conf.example - BSD_PKG_MK in /etc/mk.conf, local setting
of PKGSRCDIR may be not computed by extract_variables().
>How-To-Repeat:
Try setting PKGSRCDIR in /etc/mk.conf between something like '.ifdef BSD_PKG_MK
... .endif' or something similar.
>Fix:
the following little patch helps fixing this.
Index: files/pkgchk.sh
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkgchk/files/pkgchk.sh,v
retrieving revision 1.4
diff -u -r1.4 pkgchk.sh
--- pkgchk.sh	2001/07/07 12:17:35	1.4
+++ pkgchk.sh	2001/07/08 22:08:29
@@ -13,7 +13,7 @@
 
     if [ -z "$PKGSRCDIR" ];then
 	if [ -f /etc/mk.conf ] ;then
-	    eval `printf 'all:\n\t@echo PKGSRCDIR=${PKGSRCDIR}\n' | make -f - -f /etc/mk.conf`
+	    eval `printf 'BSD_PKG_MK=1\nall:\n\t@echo PKGSRCDIR=${PKGSRCDIR}\n' | make -f - -f /etc/mk.conf`
 	fi
 	if [ -z "$PKGSRCDIR" ];then
 	    PKGSRCDIR=/usr/pkgsrc
>Release-Note:
>Audit-Trail:
>Unformatted: