Subject: pkg/33573: mk/bulk/printindex chokes on SUBDIR entries with a trailing comment
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <dieter.NetBSD@pandora.be>
List: pkgsrc-bugs
Date: 05/27/2006 20:00:01
>Number:         33573
>Category:       pkg
>Synopsis:       mk/bulk/printindex chokes on SUBDIR entries with a trailing comment
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 27 20:00:01 +0000 2006
>Originator:     Dieter Roelants
>Release:        pkgsrc HEAD
>Organization:
>Environment:
	(rather irrelevant)
>Description:
	The printindex script in pkgsrc/mk/bulk/ builds a dependency
	tree from Makefiles in all categories. It does some sanity
	checking on the contents of these Makefiles. This now fails,
	because in pkgtools/Makefile, there are two SUBDIR entries
	with a trailing comment (libnbcompat & mtree). These
	subdirs where disabled until recently.
	The error goes something like this:
	printindex error: The package list contains invalid characters
	(#               #)
>How-To-Repeat:
	Start a bulk build without specifying a PKGLIST.
>Fix:
	Probably something like this:

--- printindex.orig	2005-11-29 10:19:15.000000000 +0100
+++ printindex	2006-05-27 21:46:49.000000000 +0200
@@ -109,7 +109,7 @@
 
 case ${PKGLIST-""} in
 "")	# List of all packages, from pkgsrc/*/Makefile
-	list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${GREP} -v regress/ | ${SED} 's,/Makefile.*=[[:space:]]*,/,'`
+	list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${GREP} -v regress/ | ${SED} 's,/Makefile.*=[[:space:]]*,/,' | ${SED} 's/[[:space:]].*//'`
 	;;
 *)	list="${PKGLIST}"
 	;;

	Or maybe just remove the comments in pkgtools/Makefile.