From nobody@FreeBSD.org  Sat Feb 19 07:47:11 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 68AAE106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Feb 2011 07:47:11 +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 575CD8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Feb 2011 07:47:11 +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 p1J7lAoK019920
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Feb 2011 07:47:10 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1J7lAqV019919;
	Sat, 19 Feb 2011 07:47:10 GMT
	(envelope-from nobody)
Message-Id: <201102190747.p1J7lAqV019919@red.freebsd.org>
Date: Sat, 19 Feb 2011 07:47:10 GMT
From: Gary Palmer <freebsd-gnats@in-addr.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_info error message should contain information about which file the error is in
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154877
>Category:       bin
>Synopsis:       pkg_info(1) error message should contain information about which file the error is in
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 19 07:50:08 UTC 2011
>Closed-Date:    Fri May 11 13:38:27 UTC 2012
>Last-Modified:  Fri May 11 13:38:27 UTC 2012
>Originator:     Gary Palmer
>Release:        FreeBSD 7.4-RC1
>Organization:
>Environment:
>Description:
One of my package +CONTENTS files somehow ended up with a @pkgdep line with no argument on it.  This prompted pkg_info (and other tools) to issue a warning like:

% pkg_info -W /usr/local/bin/vncviewer
pkg_info: corrupted record (pkgdep line without argument), ignoring
/usr/local/bin/vncviewer was installed by package tightvnc-1.3.10_3
% 

However it didn't mention which package file the problem was in, leading me to resort to ktrace to figure it out.  I shouldn't need to use ktrace to figure it out - the error message should be more explicit about where the problem is.
>How-To-Repeat:
Edit a +CONTENTS file to add an empty @pkgdep line and then run

% pkg_info -W /usr/local/bin/vncviewer

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->portmgr 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Feb 23 08:54:19 UTC 2011 
Responsible-Changed-Why:  
assign. 

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

From: "Beat Gaetzi" <beat@FreeBSD.org>
To: bug-followup@FreeBSD.org, freebsd-gnats@in-addr.com
Cc:  
Subject: Re: bin/154877: pkg_info(1) error message should contain information about which file the error is in
Date: Tue, 12 Apr 2011 12:19:13 +0200

 ------=_20110412121913_94236
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: 8bit
 
 Hi,
 
 Attached patch adds the package name to the pkg_info(1) error message if a
 corrupt pkgdep line is detected.
 
 Beat
 ------=_20110412121913_94236
 Content-Type: application/octet-stream; name="libpkg-plist-pkgdep.patch"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="libpkg-plist-pkgdep.patch"
 
 SW5kZXg6IGxpYi9saWJwa2cvcGxpc3QuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaWIvbGlicGtnL3BsaXN0
 LmMJKFJldmlzaW9uIDIyMDU2MSkKKysrIGxpYi9saWJwa2cvcGxpc3QuYwkoQXJiZWl0c2tvcGll
 KQpAQCAtMjg2LDcgKzI4Niw4IEBACiAJaWYgKCpjcCA9PSAnXDAnKSB7CiAJICAgIGNwID0gTlVM
 TDsKIAkgICAgaWYgKGNtZCA9PSBQTElTVF9QS0dERVApIHsKLQkJd2FybngoImNvcnJ1cHRlZCBy
 ZWNvcmQgKHBrZ2RlcCBsaW5lIHdpdGhvdXQgYXJndW1lbnQpLCBpZ25vcmluZyIpOworCQl3YXJu
 eCgiY29ycnVwdGVkIHJlY29yZCBmb3IgJXMgKHBrZ2RlcCBsaW5lIHdpdGhvdXQgIgorCQkJImFy
 Z3VtZW50KSwgaWdub3JpbmciLCBwa2ctPm5hbWUpOwogCQljbWQgPSBGQUlMOwogCSAgICB9CiAJ
 ICAgIGdvdG8gYm90dG9tOwo=
 ------=_20110412121913_94236--
 

From: Gary Palmer <freebsd-gnats@in-addr.com>
To: Beat Gaetzi <beat@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/154877: pkg_info(1) error message should contain information
 about which file the error is in
Date: Wed, 13 Apr 2011 00:11:08 +0100

 Beat Gaetzi wrote:
 > Hi,
 >
 > Attached patch adds the package name to the pkg_info(1) error message if a
 > corrupt pkgdep line is detected.
 >    
 
 
 Hi Beat,
 
 Thanks for looking at this.  Unfortunately I don't have any corruptions 
 right now but the patch looks correct
 
 Thanks!
 
 Gary
 
 
State-Changed-From-To: open->closed 
State-Changed-By: beat 
State-Changed-When: Fri May 11 13:36:55 UTC 2012 
State-Changed-Why:  
Superseded by bin/164378: libpkg no longer exists. 

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