Subject: bin/14441: sushi scripts can't find pkgsrc categories
To: None <gnats-bugs@gnats.netbsd.org>
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
>Closed-Date:
>Last-Modified:
>Originator: Robert Elz
>Release: NetBSD-current 20011102
>Organization:
Prince of Songkla University
>Environment:
System: NetBSD brandenburg.cs.mu.OZ.AU 1.5_BETA NetBSD 1.5_BETA (BRANDENBURG) #6: Sun Oct 14 19:40:40 ICT 2001 kre@brandenburg.cs.mu.OZ.AU:/usr/src/sys/arch/i386/compile/BRANDENBURG i386
Really ..
NetBSD jade.coe.psu.ac.th 1.5Y NetBSD 1.5Y (JADE) #5: Sun Sep 23 21:28:02 ICT 2001 kre@jade.coe.psu.ac.th:/usr/obj/sys/compile/JADE i386
but with -current sources cvs updated as of about an hour ago.
>Description:
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.
>How-To-Repeat:
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...
>Fix:
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 @@
fi
if [ -d "/usr/src/pkgsrc" ]; then
PKGSRCDIR="/usr/src/pkgsrc"
fi
fi
-cd $PKGSRCDIR/$2/$1
-if [ "$?" != "1" ]; then
- exit 0
-fi
-ls -1d */ | sed -e s'@/@@' | egrep -v '(mk|distfiles)'
+cd $PKGSRCDIR || exit 0
+ls -1d */ | sed -e s'@/@@' | egrep -v '^(CVS|mk|distfiles|packages)$'
>Release-Note:
>Audit-Trail:
>Unformatted: