PKGNG: ability to view pkg-plist?
ken at pcbsd.org
Fri Oct 25 23:40:08 UTC 2013
On 10/25/2013 18:05, Matthew Seaman wrote:
> On 25/10/2013 18:24, Ken Moore wrote:
>> I have been looking around, but I am unable to find a way to easily read
>> the pkg-plist within a PKGNG package on the repository. Is this
>> functionality missing in pkg, or am I just missing something?
> If you've downloaded the package tarball, then like this:
> lucid-nonsense:...cache/pkg/All:% pkg info -l -F ./pkg-1.1.4_8.txz
> Otherwise there is an optional '-l' flag to 'pkg repo' that creates a
> database of all of the files installable by all of the packages in the
> repo -- which should be downloadable as 'filesite.txz'. Whether this
> exists or not depends on the choices of the repository maintainer. It's
> not currently available from the official repos for http://pkg.freebsd.org/
>> Just for a bit of context:
>> I am working on adding the functionality into EasyPBI to work *without*
>> a local copy of the ports tree available, so I am trying to grab all the
>> information about a given package from the remote repository (with user
>> privileges) to maintain the "Easy" part of EasyPBI in the new version.
>> Most of the information can be easily pulled using "pkg rquery", but the
>> only thing I am still missing is the ability to search through the
>> pkg-plist for binaries/icons/etc..
> Yeah -- the repository catalogue is a collection of selected package
> metadata for the packages in the repo. Unfortunately the lists of files
> and directories from each package aren't part of that selection. Mostly
> because of the space they'd take up.
> Whether it would be desirable to publish a 'filesite.txz' index of all
> the files in the packages on the official repos is a matter for debate.
> It would probably mean some changes to poudriere too -- I can't see any
> obvious way of telling it to run 'pkg repo -l' instead of plain 'pkg repo'.
Thanks for the confirmation. The only way I am seeing that it can be
done at the moment is to download and/or install the package first, and
then there are a couple of pkg command for getting the pkg-plist ("pkg
info -l -F" if not installed, "pkg query %Fp" if it is installed).
Unfortunately, this generally requires root/admin permissions to fetch
the package (unless I change the package cache dir, but I am hesitant to
do that for a simple application like this), so that is out of the
question for my use case.
I will look into the "pkg repo -l" option and see if that will work. If
so, we might be able to use that on the PC-BSD package repo, and I can
just tell people that the simplifications for generating XDG
desktop/menu entries are only available if you are using a repository
with that option enabled.
Is a general way to list the files in a package that important for
others, or is my case very specialized? I can think of a few situations
where it might be a nice option to search for package(s) on the repo
that contains a particular binary name, but I might be in a very small
group of people that would actually use it.
~~ Ken Moore ~~
More information about the freebsd-ports