From owner-freebsd-bugs Fri Feb 9 9:21: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9373D37D0E5 for ; Fri, 9 Feb 2001 09:20:07 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f19HK7884770; Fri, 9 Feb 2001 09:20:07 -0800 (PST) (envelope-from gnats) Received: from infres.enst.fr (infres.enst.fr [137.194.160.3]) by hub.freebsd.org (Postfix) with ESMTP id 1862637BE0C for ; Fri, 9 Feb 2001 08:58:36 -0800 (PST) Received: from shalmaneser.enst.fr (shalmaneser.enst.fr [137.194.160.128]) by infres.enst.fr (Postfix) with ESMTP id C449B45407 for ; Fri, 9 Feb 2001 17:58:19 +0100 (MET) Received: by shalmaneser.enst.fr (Postfix, from userid 11117) id E9173112B3; Fri, 9 Feb 2001 17:58:29 +0100 (CET) Message-Id: <20010209165829.E9173112B3@shalmaneser.enst.fr> Date: Fri, 9 Feb 2001 17:58:29 +0100 (CET) From: quinot@inf.enst.fr Reply-To: quinot@inf.enst.fr To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/24971: pkg_delete -n should call delete_package() Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 24971 >Category: bin >Synopsis: pkg_delete -n should call delete_package() >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 09 09:20:07 PST 2001 >Closed-Date: >Last-Modified: >Originator: >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD shalmaneser.enst.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Nov 30 15:10:10 CET 2000 root@shalmaneser.enst.fr:/usr/obj/usr/src/sys/SHALMANESER i386 >Description: When called with the "-n" command line argument, pkg_delete is supposed to inform the user of all steps it would take. The current code does not issue any messages regarding actions that would be performed by delete_package (removing files and executing @unexec commands), because when the Fake variable is 1, delete_package (which itself respects Fake and prints messages rather than taking action when it is 1) is not called at all. >How-To-Repeat: pkg_delete -n where pkg is a package that has a @unexec command. That command is not displayed. >Fix: --- /usr/src/usr.sbin/pkg_install/delete/perform.c Sun Oct 22 11:53:25 2000 +++ perform.c Fri Feb 9 17:49:44 2001 @@ -172,13 +172,12 @@ errx(2, __FUNCTION__ ": unable to return to working directory %s!", home); } - if (!Fake) { - /* Some packages aren't packed right, so we need to just ignore delete_package()'s status. Ugh! :-( */ - if (delete_package(FALSE, CleanDirs, &Plist) == FAIL) - warnx( + /* Some packages aren't packed right, so we need to just ignore + delete_package()'s status. Ugh! :-( */ + if (delete_package(FALSE, CleanDirs, &Plist) == FAIL) + warnx( "couldn't entirely delete package (perhaps the packing list is\n" "incorrectly specified?)"); - } if (chdir(LogDir) == FAIL) { warnx("unable to change directory to %s! deinstall failed", LogDir); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message