Skip site navigation (1)Skip section navigation (2)
Date:      Fri,  9 Feb 2001 17:58:29 +0100 (CET)
From:      quinot@inf.enst.fr
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/24971: pkg_delete -n should call delete_package()
Message-ID:  <20010209165829.E9173112B3@shalmaneser.enst.fr>

next in thread | raw e-mail | index | archive | help

>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 <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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010209165829.E9173112B3>