Subject: pkg/34145: pkg_chk swallows argument after -q
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <dieter.NetBSD@pandora.be>
List: pkgsrc-bugs
Date: 08/05/2006 13:00:01
>Number:         34145
>Category:       pkg
>Synopsis:       pkg_chk swallows argument after -q
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 05 13:00:00 +0000 2006
>Originator:     dieter roelants
>Release:        NetBSD 3.99.24
>Organization:
>Environment:
System: NetBSD simult.amelgem.be 3.99.24 NetBSD 3.99.24 (SIMULT) #10: Fri Aug 4 10:24:50 CEST 2006 dieter@simult.amelgem.be:/build/obj.i386.current/sys/arch/i386/compile/SIMULT i386
Architecture: i386
Machine: i386
>Description:
	pkg_chk shifts the next argument after -q away for no
	apparent reason.
>How-To-Repeat:
	Try pkg_chk -qu instead of pkg_chk -uq
>Fix:

	(This updates the usage a bit, too.)

--- pkg_chk.sh.orig	2006-08-05 14:47:51.000000000 +0200
+++ pkg_chk.sh	2006-08-05 14:49:38.000000000 +0200
@@ -566,7 +566,7 @@
 	-v      Verbose
 
 pkg_chk verifies installed packages against pkgsrc.
-The most common usage is 'pkg_chk -i' to check all installed packages or
+The most common usage is 'pkg_chk -u -q' to check all installed packages or
 'pkg_chk -u' to update all out of date packages.
 For more advanced usage, including defining a set of desired packages based
 on hostname and type, see pkg_chk(8).
@@ -615,7 +615,7 @@
 	-N )	opt_N=1 ;;
 	-n )	opt_n=1 ;;
 	-P )	opt_P="$2" ; shift ;;
-	-q )	opt_q=1 ; shift ;;
+	-q )	opt_q=1 ;;
 	-r )	opt_r=1 ;;
 	-s )	opt_s=1 ;;
 	-U )	opt_U="$2" ; shift ;;