Subject: pkg/21895: pkg_chk -u is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <marc@informatik.uni-bremen.de>
List: netbsd-bugs
Date: 06/16/2003 00:46:49
>Number:         21895
>Category:       pkg
>Synopsis:       pkg_chk -u is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 15 22:47:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Marc Recht
>Release:        NetBSD 1.6T
>Organization:
	
>Environment:
	
	
System: NetBSD leeloo.intern.geht.de 1.6T NetBSD 1.6T (LEELOO) #0: Sat Jun 14 13:59:36 CEST 2003 root@leeloo.intern.geht.de:/usr/obj/sys/arch/i386/compile/LEELOO i386
Architecture: i386
Machine: i386
>Description:
pkg_info -B \* returns (among other things) entries of the form
PKGPATH=xyz
pkg_chk is matching against "PKGPATH= " (with space) and for this
reason doesn't find anything.
	
>How-To-Repeat:
	
>Fix:
Index: files/pkgchk.sh
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkgchk/files/pkgchk.sh,v
retrieving revision 1.39
diff -u -r1.39 pkgchk.sh
--- files/pkgchk.sh     2003/05/22 16:38:59     1.39
+++ files/pkgchk.sh     2003/06/15 22:43:14
@@ -338,7 +338,7 @@
 real_pkgsrcdir=`pwd`
 
 if [ -n "$opt_i" ];then
-    PKGDIRLIST=`sh -c "${PKG_INFO} -B \*" | ${AWK} '/PKGPATH= /{printf $2" "}'`+    PKGDIRLIST=`sh -c "${PKG_INFO} -B \*" | ${AWK}  -F"=" '/PKGPATH=/ {printf $2" "}'`
 fi
 
 if [ -n "$opt_c" ];then
	
>Release-Note:
>Audit-Trail:
>Unformatted: