From nobody@FreeBSD.org  Mon Mar 14 11:06:18 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 EA577106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 14 Mar 2011 11:06:18 +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 D9A868FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 14 Mar 2011 11:06:18 +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 p2EB6IvR082479
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 14 Mar 2011 11:06:18 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2EB6IeM082478;
	Mon, 14 Mar 2011 11:06:18 GMT
	(envelope-from nobody)
Message-Id: <201103141106.p2EB6IeM082478@red.freebsd.org>
Date: Mon, 14 Mar 2011 11:06:18 GMT
From: Max Shonichev <mshonich@yandex.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_info -g mistakenly adds $PREFIX to global paths
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         155548
>Category:       bin
>Synopsis:       pkg_info(1): pkg_info -g mistakenly adds $PREFIX to global paths
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 14 11:10:13 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Mar 14 11:18:52 UTC 2011
>Originator:     Max Shonichev
>Release:        8.1-RELEASE
>Organization:
private software company
>Environment:
FreeBSD freebsd81 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
rrdtool was built from ports tree with following make.conf options recommended to disable man files creation:

freebsd81# cat /etc/make.conf
NOMANPAGES=1
NOPORTDOCS=1
NODOCS=1
MANPREFIX=/tmp/

freebsd81# pkg_info -v -x rrdtool | grep File | head
File: lib/python2.6/site-packages/py_rrdtool-0.2.1-py2.6.egg-info
File: /tmp//man/man1/bin_dec_hex.1.gz
File: /tmp//man/man1/cdeftutorial.1.gz

next, pkg_info -g 
freebsd81# pkg_info -g -x rrdtool
Information for rrdtool-1.4.5:

Mismatched Checksums:
pkg_info: /usr/local//tmp//man/man1/bin_dec_hex.1.gz doesn't exist
pkg_info: /usr/local//tmp//man/man1/cdeftutorial.1.gz doesn't exist
pkg_info: /usr/local//tmp//man/man1/rpntutorial.1.gz doesn't exist
pkg_info: /usr/local//tmp//man/man1/rrd-beginners.1.gz doesn't exist

as you can see, pkg_info -v shows correct paths of 'installed' man files (e.g. /tmp/), but pkg_info -g thinks that local user prefix (/usr/local/) should be added (note the double slash) to them as well, which is wrong. 

I guess proper digging through sources could help find similar issues more critical than this one.
>How-To-Repeat:
just follow the established procedures
>Fix:
dont' bother

>Release-Note:
>Audit-Trail:
>Unformatted:
