From owner-freebsd-bugs Mon Jun 5 7: 0:11 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 804F337B8AE for ; Mon, 5 Jun 2000 07:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA21375; Mon, 5 Jun 2000 07:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by hub.freebsd.org (Postfix) with ESMTP id CBDFB37B5FB for ; Mon, 5 Jun 2000 06:54:08 -0700 (PDT) (envelope-from stijn@pcwin002.win.tue.nl) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.9.3/8.9.3) id PAA13714; Mon, 5 Jun 2000 15:55:06 +0200 (CEST) (envelope-from stijn) Message-Id: <200006051355.PAA13714@pcwin002.win.tue.nl> Date: Mon, 5 Jun 2000 15:55:06 +0200 (CEST) From: stijn@win.tue.nl Reply-To: stijn@win.tue.nl To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/19019: pkg_version -c doesn't honor -l (limit status) flag Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 19019 >Category: bin >Synopsis: pkg_version -c doesn't honor -l (limit status) flag >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jun 05 07:00:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Stijn Hoop >Release: FreeBSD 5.0-CURRENT i386 >Organization: Eindhoven Technical University >Environment: FreeBSD 5.0-CURRENT as of 22 May 2000 >Description: pkg_version(1) doesn't honor the -l flag if given the -c flag. The command pkg_version -c is used to show commands to update packages on the system to the latest version. The -l flag is used (according to the manpage) to limit the output of pkg_version to packages older than the index, newer than the index or at the same version. However, this functionality cannot be combined, and pkg_version -c will only work if an overview of newer packages is requested (-l '<'). >How-To-Repeat: I expect pkg_version -c -l '=' to produce a list of instructions about how to reinstall all current packages, however this doesn't produce any output. >Fix: Here is a simple patch that defaults to the old behavior but does respect the -l flag in combination with the -c flag (if -l is listed after the -c on the command line). --- /usr/sbin/pkg_version Mon May 22 16:26:13 2000 +++ pkg_version Mon Jun 5 13:36:38 2000 @@ -141,6 +141,7 @@ } if ($opt_c) { $ShowCommandsFlag = $opt_c; + $LimitFlag = " 0) { - next if $ShowCommandsFlag; $versionCode = ">"; $Comment = "succeeds index (index has $indexVersion)"; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message