NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/51269: pkg_info enhancements



The following reply was made to PR bin/51269; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg%bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/51269: pkg_info enhancements
Date: Sat, 25 Jun 2016 16:44:34 +0200

 On Sat, Jun 25, 2016 at 10:35:00AM +0000, paul%whooppee.com@localhost wrote:
 > * Allow for querying of more than one variable at a time, by specifying
 >   multiple -Q options
 > 
 > 	pkg_info -Q PKGPATH -Q PKGNAME
 
 So, how would I know where one variable ends and the next one starts?
 
 > * Allow querying for a list of packages that have a variable set, and/or
 >   packages that have a variable set to a specific value (and maybe even
 >   a third variant to get a list of packages that do _not_ set the variable).
 > 
 > 	pkg_info -V variable_name
 > 	pkg_info -V variable_name=value
 > 	pkg_info -V \!variable
 
 Given that this can be trivally written as shell loop, I don't see the
 point.
 
 > * Allow querying for a list of automatic packages.  Currently we have -a
 >   for "all" or -u for "user" but nothing for "automatic"
 
 Same here. E.g.:
 
 pkg_info -e '*' | while read pkg; do
 	case $(pkg_info -Q automatic "$pkg") in
 	[yY][eE][sS])
 	        echo "$pkg"
 	esac
 done
 
 > * When querying a variable in multiple packages, (optionally) print each
 >   package name as well as the variable's value.  Consider
 > 
 > 	pkg_info -Q PKGPATH \*
 
 Same problem as the first, can be written as in the former example.
 
 Joerg
 


Home | Main Index | Thread Index | Old Index