pkgsrc-Users archive

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

Re: ANN: Availability of pkg(8)-capable pkgsrc

On 11/14/2016 15:12, Swift Griggs wrote:
On Mon, 14 Nov 2016, John Marino wrote:
Are you sure?  "pkg query" is very powerful.  Check "pkg alias"; one
prebuilt query may already exist.  I don't know yum so I don't know
what "whatprovides" does, but I would be very surprised if pkg(8)
doesn't do an equivalent.

Just re-read pkg(8). I could be wrong, but I still don't see anything
that would provide a solution.

It's simple. If one knows the name of an (*uninstalled*) binary
application, but not the package it came from you are screwed if you
can't guess.


  I know I need /usr/local/sbin/reject. I don't have it. I don't know what
  package it comes from. There is no way to "ask" pkg what package that
  file belongs to when it's not installed. So, I'd have no way to know it
  comes from the cups package because the name "reject" has zero to dow
  with the name of the package ("cups").

You might be able to do some jiggery-pokery with the pkg data files, but
that's certainly a far cry from saying:

yum whatprovides '*/reject'

You wouldn't believe how useful this can be to a group of sysadmins.
Folks remember the commands they need, not the names of the packages
they come from.


Okay, I get you.
This could be *easily* provided with access to a local repository.
Assume that pkgsrc provides 17,000 packages and all of them have been built. pkg(8) can check which files are in a package, so it would be a simple matter of a script scanning every package systematically and returning plist entries that match.

A fancier version could dump the results into a flat file that could be grepped.

So it's not a standard feature but any sysadmin that knows how to write a shell script could get this information pretty easily. In fact, something similar is show in DF's grok already:  (pick dports-plist and search)


This email has been checked for viruses by Avast antivirus software.

Home | Main Index | Thread Index | Old Index