Subject: bin/14441: sushi scripts can't find pkgsrc categories
To: None <>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 11/03/2001 18:04:18
>Number:         14441
>Category:       bin
>Synopsis:       sushi's pkgsrc category finding script doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 03 03:03:00 PST 2001
>Originator:     Robert Elz
>Release:        NetBSD-current 20011102
	Prince of Songkla University
System: NetBSD 1.5_BETA NetBSD 1.5_BETA (BRANDENBURG) #6: Sun Oct 14 19:40:40 ICT 2001 i386

Really ..

NetBSD 1.5Y NetBSD 1.5Y (JADE) #5: Sun Sep 23 21:28:02 ICT 2001 i386

but with -current sources cvs updated as of about an hour ago.

	The script that sushi uses to locate the package categories
	when doing an "install package from source" is terminally
	brain dead, and doesn't work at all.
	Run sushi, enter the install menu, select "Install New Packages
	From Source" - then see the list of categories is empty (and F4
	doesn't do a thing).

	If you continue from there (press enter) you'll be asked to select
	a package taken from a list of all the sub-directories of whatever
	directory you ran sushi from...
	Apply the patch below ...

	Note, this looks for failure of the cd command, rather than
	some kind of guesswork based upon the exit status.  The patch
	also improves the filter on the selection (no-one could have
	noticed that before as in any normal circumstance it wouldn't
	have been used)

--- install/install/script2	Wed Jan 24 09:35:57 2001
+++ /tmp/script2	Sat Nov  3 17:50:58 2001
@@ -6,10 +6,7 @@
 	if [ -d "/usr/src/pkgsrc" ]; then
-cd $PKGSRCDIR/$2/$1
-if [ "$?" != "1" ]; then
-	exit 0
-ls -1d */ | sed -e s'@/@@' | egrep -v '(mk|distfiles)'
+cd $PKGSRCDIR || exit 0
+ls -1d */ | sed -e s'@/@@' | egrep -v '^(CVS|mk|distfiles|packages)$'