Subject: improved diagnostic output of pkg_delete(1)
To: None <tech-pkg@netbsd.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-pkg
Date: 02/13/2002 20:34:22
Hi -

I always found it annoying that if pkg_delete(1) complains
about non-existing files or non-empty directories one doesn't
know which particular pkg caused it (in case of pkg_delete -r).

How about the following modification? Can this break anything?

best regards
Matthias


Index: perform.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/delete/perform.c,v
retrieving revision 1.33
diff -u -r1.33 perform.c
--- perform.c	2001/07/16 13:50:41	1.33
+++ perform.c	2002/02/13 19:28:40
@@ -623,8 +623,8 @@
 		/* 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?)");
+		"couldn't entirely delete package `%s' (perhaps the packing list is\n"
+			    "incorrectly specified?)", pkg);
 	}
 	/* Remove this package from the +REQUIRED_BY list of the packages this 
depends on */
 	for (p = Plist.head; p; p = p->next) {