From nobody@FreeBSD.org  Tue Sep  6 14:20:05 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A5B15106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  6 Sep 2011 14:20:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 9141F8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  6 Sep 2011 14:20:05 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p86EK5rY059652
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 6 Sep 2011 14:20:05 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p86EK5WO059651;
	Tue, 6 Sep 2011 14:20:05 GMT
	(envelope-from nobody)
Message-Id: <201109061420.p86EK5WO059651@red.freebsd.org>
Date: Tue, 6 Sep 2011 14:20:05 GMT
From: Gary Palmer <freebsd-gnats@in-addr.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_delete error messages miss which package had the problem
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160516
>Category:       bin
>Synopsis:       pkg_delete(1) error messages miss which package had the problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pluknet
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 06 14:30:01 UTC 2011
>Closed-Date:    Wed Apr 04 13:24:42 UTC 2012
>Last-Modified:  Wed Apr  4 13:30:01 UTC 2012
>Originator:     Gary Palmer
>Release:        7.4p2
>Organization:
>Environment:
>Description:
While cleaning up some installed ports I ran


# pkg_delete objc-3.2.8_1 gcc-3.4.6_3,1 gcc-4.2.5.20090325_5 gcc-4.4.7.20110628
pkg_delete: '/usr/local/man/man3/Object.3.gz' fails original MD5 checksum - not deleted.
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)


It seems that Object.3.gz is also installed by


# pkg_info -W /usr/local/man/man3/Object.3.gz
/usr/local/man/man3/Object.3.gz was installed by package open-motif-2.3.3


I'd love to file a PR reporting a conflict between which ever gcc installed
the manpage and open-motif, but pkg_delete failed to mention which package
had the problem.

The error message should have included the package name or other information
which allowed the problem to be identified.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Sep 8 06:04:55 UTC 2011 
Responsible-Changed-Why:  
Applies to base system. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160516 

From: Sergey Kandaurov <pluknet@freebsd.org>
To: bug-followup@FreeBSD.org, freebsd-gnats@in-addr.com
Cc:  
Subject: Re: bin/160516: pkg_delete(1) error messages miss which package had
 the problem
Date: Wed, 14 Sep 2011 19:51:31 +0400

 Please try this patch.
 
 --- usr.sbin/pkg_install/delete/perform.c        2011-02-14
 20:16:45.000000000 +0300
 +++ usr.sbin/pkg_install/delete/perform.c   2011-09-14 19:46:31.000000000 +0400
 @@ -318,8 +318,8 @@
       */
      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?)", Plist.name);
 
      if (chdir(LogDir) == FAIL) {
         warnx("unable to change directory to %s! deinstall failed", LogDir);
State-Changed-From-To: open->patched 
State-Changed-By: pluknet 
State-Changed-When: Fri Sep 16 09:11:50 UTC 2011 
State-Changed-Why:  
A different version committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160516 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/160516: commit references a PR
Date: Fri, 16 Sep 2011 09:10:14 +0000 (UTC)

 Author: pluknet
 Date: Fri Sep 16 09:09:58 2011
 New Revision: 225610
 URL: http://svn.freebsd.org/changeset/base/225610
 
 Log:
   Print the package name on deletion errors.
   
   It appears this was already done in NetBSD a decade ago, hence
   I just reuse the change (except our code is bad styled).
   
   PR:		bin/160516
   Approved by:	portmgr
   Approved by:	re (kib)
   Obtained from:	NetBSD
 
 Modified:
   head/usr.sbin/pkg_install/delete/perform.c
 
 Modified: head/usr.sbin/pkg_install/delete/perform.c
 ==============================================================================
 --- head/usr.sbin/pkg_install/delete/perform.c	Fri Sep 16 08:24:31 2011	(r225609)
 +++ head/usr.sbin/pkg_install/delete/perform.c	Fri Sep 16 09:09:58 2011	(r225610)
 @@ -324,8 +324,8 @@ pkg_do(char *pkg)
       */
      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'\n"
 +	"(perhaps the packing list is incorrectly specified?)", pkg);
  
      if (chdir(LogDir) == FAIL) {
   	warnx("unable to change directory to %s! deinstall failed", LogDir);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
Responsible-Changed-From-To: freebsd-bugs->pluknet 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Sun Oct 23 22:53:33 UTC 2011 
Responsible-Changed-Why:  
you committed the change 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160516 
State-Changed-From-To: patched->closed 
State-Changed-By: pluknet 
State-Changed-When: Wed Apr 4 13:24:09 UTC 2012 
State-Changed-Why:  
Merged to 8 stable branch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160516 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/160516: commit references a PR
Date: Wed,  4 Apr 2012 13:22:20 +0000 (UTC)

 Author: pluknet
 Date: Wed Apr  4 13:22:10 2012
 New Revision: 233871
 URL: http://svn.freebsd.org/changeset/base/233871
 
 Log:
   MFC r225610: Print the package name on deletion errors.
   
   PR:		bin/160516
   Approved by:	portmgr (pav)
   Obtained from:	NetBSD
 
 Modified:
   stable/8/usr.sbin/pkg_install/delete/perform.c
 Directory Properties:
   stable/8/usr.sbin/pkg_install/   (props changed)
   stable/8/usr.sbin/pkg_install/add/   (props changed)
   stable/8/usr.sbin/pkg_install/info/   (props changed)
 
 Modified: stable/8/usr.sbin/pkg_install/delete/perform.c
 ==============================================================================
 --- stable/8/usr.sbin/pkg_install/delete/perform.c	Wed Apr  4 11:55:20 2012	(r233870)
 +++ stable/8/usr.sbin/pkg_install/delete/perform.c	Wed Apr  4 13:22:10 2012	(r233871)
 @@ -318,8 +318,8 @@ pkg_do(char *pkg)
       */
      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'\n"
 +	"(perhaps the packing list is incorrectly specified?)", pkg);
  
      if (chdir(LogDir) == FAIL) {
   	warnx("unable to change directory to %s! deinstall failed", LogDir);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
