Subject: bin/32068: pkg_info -Q broken for (local) binary pkgs, output inconsistent
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <feyrer@cs.stevens.edu>
List: netbsd-bugs
Date: 11/14/2005 01:16:00
>Number:         32068
>Category:       bin
>Synopsis:       pkg_info -Q broken for (local) binary pkgs, output inconsistent
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 14 01:16:00 +0000 2005
>Originator:     hubert@feyrer.de
>Release:        NetBSD 2.0.2_STABLE
>Organization:
	
>Environment:
	
	
System: NetBSD chimay-bleu.cs.stevens.edu 2.0.2_STABLE NetBSD 2.0.2_STABLE (BOCK) #9: Wed Oct 12 13:24:50 EDT 2005 jschauma@doppelbock.hpcf.cs.stevens-tech.edu:/usr/2.0/src/sys/arch/i386/compile/obj/BOCK i386
Architecture: i386
Machine: i386
>Description:
	1)
	pkg_info -Q claims to be able to extract values from the 
	buildinfo(?). This does not work when applied to (local) 
	binary packages, and I strongly doubt it works for FTP/HTTP 
	remote ones.

	(How did this come up? A user asked how to find out what operating
	system version a certain binary package was built for)
	
	2) 
	The output format should be changed to print "variable=value"
	if -q is not given, and just "value" (as now) if -q is used.

>How-To-Repeat:
	chimay-bleu% pkg_info -Q OS_VERSION freetype2-2.1.10.tgz
	pkg_info: show_var: can't open '+BUILD_INFO' for reading
	chimay-bleu% pkg_info -V
	20050607
	chimay-bleu% pkg_info -Q OS_VERSION png
	2.0.2_STABLE

>Fix:
	Please (both items)
	
	Implementing this by having information in the +CONTENTS file
	is probably a lot easier than to have it in various other +-files,
	even if those +-files are low-hanging fruits when operating on
	installed packages. But that's not everyting.

>Unformatted: