Add ‘guix whereis’ command

  • Done
  • quality assurance status badge
Details
5 participants
  • Efraim Flashner
  • Ludovic Courtès
  • Mathieu Lirzin
  • Ricardo Wurmus
  • swedebugia
Owner
unassigned
Submitted by
Mathieu Lirzin
Severity
wishlist
M
M
Mathieu Lirzin wrote on 15 Jan 2018 18:16
Add ‘guix whereis’ command
(address . bug-guix@gnu.org)
871sirf3fo.fsf@gnu.org
Hello,

I would find really useful if Guix was providing a tool similar to what
‘dnf whatprovides’ or ‘apt-file’ does. I mean something to check what
packages provides a particular file (executable/manual/library).

My main use-case is when running a ‘configure’ script which checks an
arbitrary program, I would like ‘guix whereis’ to help me find out what
package I need to install to satisfy its configuration requirement.

--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
M
M
Mathieu Lirzin wrote on 15 Jan 2018 18:17
control message for bug #30130
(address . control@debbugs.gnu.org)
87zi5fdosk.fsf@gnu.org
severity 30130 wishlist
L
L
Ludovic Courtès wrote on 17 Jan 2018 15:05
Re: bug#30130: Add ‘guix whereis’ command
(name . Mathieu Lirzin)(address . mthl@gnu.org)(address . 30130@debbugs.gnu.org)
877esg60nd.fsf@gnu.org
Mathieu Lirzin <mthl@gnu.org> skribis:

Toggle quote (4 lines)
> I would find really useful if Guix was providing a tool similar to what
> ‘dnf whatprovides’ or ‘apt-file’ does. I mean something to check what
> packages provides a particular file (executable/manual/library).

This has been discussed before, and can be summarized this way:

1. Finding files that are already in your store could be done easily,
using ‘updatedb’ or something similar.

2. Finding files from packages not in your store is trickier: it
involves getting info from a build farm server typically.

If we address #1 in a Guix-specific way (automatically populating a file
database upon build completion), then perhaps we could arrange for ‘guix
publish’ to publish that info.

Ludo’.
S
S
swedebugia wrote on 17 Dec 2018 10:39
Add ‘guix whereis’ command
(address . 30130@debbugs.gnu.org)
65446f307809a0e20ba595e2008eb3da@riseup.net
Hi

This could be solved by a new field in the package-record: (provides
'("list of commands provided"))

What do you think?

This could allow us to quickly let guile search the list of provided
commands and return the package name.

E.g. right now in my guixsd I have no "file" command. I have no idea
which package installs it. :p

--
Cheers
Swedebugia
R
R
Ricardo Wurmus wrote on 17 Dec 2018 13:03
(address . swedebugia@riseup.net)(address . 30130@debbugs.gnu.org)
87va3suzqd.fsf@elephly.net
Toggle quote (3 lines)
> This could be solved by a new field in the package-record: (provides
> '("list of commands provided"))

The danger with doing this in a package definition is that it can easily
go out of sync unless we also add a verification phase to compare the
output with the list of provided executables. Another problem is that
the list might not be complete and it is yet another manual thing to
maintain for all packages.

Another approach is to shift this task to substitute servers.

Toggle quote (3 lines)
> E.g. right now in my guixsd I have no "file" command. I have no idea
> which package installs it. :p

The confusingly named “file” package provides the “file” executable ;)

--
Ricardo
E
E
Efraim Flashner wrote on 17 Dec 2018 21:55
Re: bug#30130: Add ‘guix w hereis’ command
(name . Ricardo Wurmus)(address . rekado@elephly.net)
20181217205547.GA2581@macbook41
On Mon, Dec 17, 2018 at 01:03:38PM +0100, Ricardo Wurmus wrote:
Toggle quote (12 lines)
>
> > This could be solved by a new field in the package-record: (provides
> > '("list of commands provided"))
>
> The danger with doing this in a package definition is that it can easily
> go out of sync unless we also add a verification phase to compare the
> output with the list of provided executables. Another problem is that
> the list might not be complete and it is yet another manual thing to
> maintain for all packages.
>
> Another approach is to shift this task to substitute servers.

This is Debian's aproach, with 'apt-file'. Another option that would
keep it more local would be a custom updatedb command that would look in
bin/sbin/libexec in the store for binaries and keep track of that. The
downside of course being that you'd only know about binaries you had in
your store.

Toggle quote (6 lines)
>
> > E.g. right now in my guixsd I have no "file" command. I have no idea
> > which package installs it. :p
>
> The confusingly named “file” package provides the “file” executable ;)

This works for file, but it's not obvious that 'clear' is in ncurses.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlwYDU8ACgkQQarn3Mo9
g1Hb+xAAwSFBzpgQlYT6KtcPpKUvEWqjFOdrKTs++bofrXU7YD9x5KoAOez0haEE
7ySRQG284u3CCBX5Wqxb4Bians2haBridHfa3lpm+hitwB9Zn/ximV+M2znAfgNj
gheuPQTHsDrDVeG8lG0BUfh3BuycJzbZI+bSvxs0uWPeFs3zCtdLS4BFGzsdHHzD
9QwFwwAkYUEnLJQ47ReeqrPjzhuQmDH4i/BSthUIo9J816420iobnu7VO+6K/YmS
LsaCGSIOC3kbqsm3OThjbP2X0Ii1x7f4c2EJzdQNkdG3aoYWBxxa0dPJ+h+nbDyv
p50BuyXyzPmzmrnDpiT33mQyj0Lg1Xhks5Ot/vjxy1GbYPsEcv7TveF4cGzopXYW
+J4+hZv1WG/LqwUUDS51HjKNJEh6lWsy99WSqxM3DMyT4CAgkJBJUDIwLQZemOcQ
hE3DDXWAZw7zNOPHnhH8B+JerFBxyxpZ3+/kunl0qjeQ4SgjC1qYIWVpeRQcrBIj
c05d+T1ZAfGWDza8/JFE1j0hz5+k4Hj/lQVe5ZXgCs8AtkPp1akZplc40YBjpQ3S
TodzAriz+IYbm9u6xyliUZIG1LZyuZHYQqCQPYR7oLMl4cxfA+Z/hbKXkrR/9LLj
p8caN8K4BLJtYzW5pt801whMVsFOgKmqp5VUnvBTEVBNt/axFqo=
=daxm
-----END PGP SIGNATURE-----


R
R
Ricardo Wurmus wrote on 30 Jan 17:13 +0100
Add ‘guix whereis’ command
(address . 30130-done@debbugs.gnu.org)
87cytihk8t.fsf@elephly.net
I’m closing this because we now have “guix locate”.

--
Ricardo
Closed
?