NetBSD Problem Report #34145

From dieter.NetBSD@pandora.be  Sat Aug  5 12:58:18 2006
Return-Path: <dieter.NetBSD@pandora.be>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 3CD5C63B8C3
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  5 Aug 2006 12:58:18 +0000 (UTC)
Message-Id: <20060805125819.AC2BD1B29D@simult.amelgem.be>
Date: Sat,  5 Aug 2006 14:58:19 +0200 (CEST)
From: dieter.NetBSD@pandora.be
Reply-To: dieter.NetBSD@pandora.be
To: gnats-bugs@NetBSD.org
Subject: pkg_chk swallows argument after -q
X-Send-Pr-Version: 3.95

>Number:         34145
>Category:       pkg
>Synopsis:       pkg_chk swallows argument after -q
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 05 13:00:00 +0000 2006
>Closed-Date:    Sun Aug 06 12:23:28 +0000 2006
>Last-Modified:  Sun Aug 06 12:25:01 +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 ;;

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: cube@netbsd.org
State-Changed-When: Sun, 06 Aug 2006 12:23:28 +0000
State-Changed-Why:
Patch applied (I went a bit further with how -i and -c are documented).
Thanks!


From: Quentin Garnier <cube@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/34145 CVS commit: pkgsrc/pkgtools/pkg_chk
Date: Sun,  6 Aug 2006 12:21:09 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	cube
 Date:		Sun Aug  6 12:21:09 UTC 2006

 Modified Files:
 	pkgsrc/pkgtools/pkg_chk: Makefile
 	pkgsrc/pkgtools/pkg_chk/files: pkg_chk.8 pkg_chk.sh

 Log Message:
 Fix -q which ate the next argument.  Only document -i and -c in the
 "Deprecated options" part of the manual.

 PR#34145 by Dieter Roelants.


 To generate a diff of this commit:
 cvs rdiff -r1.40 -r1.41 pkgsrc/pkgtools/pkg_chk/Makefile
 cvs rdiff -r1.20 -r1.21 pkgsrc/pkgtools/pkg_chk/files/pkg_chk.8
 cvs rdiff -r1.38 -r1.39 pkgsrc/pkgtools/pkg_chk/files/pkg_chk.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.