Subject: bin/14442: sushi's pkgsrc install package selection menu lists wrong stuff
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 11/03/2001 18:12:40
>Number:         14442
>Category:       bin
>Synopsis:       sushi's pkgsrc package selection filter is broken
>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:12: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 updated via cvs an hour or so ago

>Description:
	After fixing the problem in PR bin/14441, sushi can select
	pkgsrc categories, but after having done that, it doesn't do
	a very good job of filtering the list of available packages
	in that category
>How-To-Repeat:
	Apply the patch to sushi given in PR bin/14441 (without that
	building packages from source with sushi doesn't work at all).
	Then run sushi, select the installation menu, install new
	package from source, use F4 to scroll the list of packages.
	Select pkgtools.   Enter the package install menu for pkgtools.
	Use F4 to scroll through the list of available packages.
	Observe that "CVS" is listed as a package that can be installed
	(well, it is, though in lower case, but not in this category)
	but that none of pkg_install pkglint, ... even xpkgwedge are
	in the list.
>Fix:
	Apply the patch below...

	This also makes the script select nothing (instead of listing
	whatever is $PWD) if for some reason a bad category was passed
	in (or the user doesn't have 'x' permission on the category
	directory)

--- install/install/script1	Fri Jan  5 09:06:57 2001
+++ /tmp/script1	Sat Nov  3 17:47:38 2001
@@ -6,11 +6,11 @@
 	fi
 	if [ -d "/usr/src/pkgsrc" ]; then
 		PKGSRCDIR="/usr/src/pkgsrc"
 	fi
 fi
-cd $PKGSRCDIR/$1
+cd $PKGSRCDIR/$1 || exit 0
 #for i in */Makefile
 #do
 #	grep PKGNAME= $i >/dev/null
 #	if [ $? -eq 0 ]; then
 #		grep PKGNAME= $i | sed -e 's/.*PKGNAME= *	*//'
@@ -19,6 +19,6 @@
 #		if [ $? -eq 0 ]; then
 #			grep DISTNAME= $i | sed -e 's/.*DISTNAME= *	*//'
 #		fi
 #	fi
 #done
-ls -1d */ | grep -v pkg | sed -e 's@/@@'
+ls -1d */ | sed -e 's@/@@' | egrep -v '^(CVS|pkg)$'
>Release-Note:
>Audit-Trail:
>Unformatted: