From quinot@inf.enst.fr  Fri Feb  9 09:16:52 2001
Return-Path: <quinot@inf.enst.fr>
Received: from infres.enst.fr (infres.enst.fr [137.194.160.3])
	by hub.freebsd.org (Postfix) with ESMTP id 1862637BE0C
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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
Cc:
Subject: pkg_delete -n should call delete_package()
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         24971
>Category:       bin
>Synopsis:       pkg_delete -n should call delete_package()
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 09 09:20:07 PST 2001
>Closed-Date:    Sun Mar 4 09:38:51 PST 2001
>Last-Modified:  Sun Mar 04 09:39:51 PST 2001
>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 <pkg>
	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:
State-Changed-From-To: open->closed 
State-Changed-By: roberto 
State-Changed-When: Sun Mar 4 09:38:51 PST 2001 
State-Changed-Why:  
Patch applied, thanks! 


http://www.freebsd.org/cgi/query-pr.cgi?pr=24971 
>Unformatted:
