all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#30130: Add ‘guix whereis’ command
@ 2018-01-15 17:16 Mathieu Lirzin
  2018-01-17 14:05 ` Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mathieu Lirzin @ 2018-01-15 17:16 UTC (permalink / raw)
  To: 30130

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30130: Add ‘guix whereis’ command
  2018-01-15 17:16 bug#30130: Add ‘guix whereis’ command Mathieu Lirzin
@ 2018-01-17 14:05 ` Ludovic Courtès
  2018-12-17  9:39 ` swedebugia
  2024-01-30 16:13 ` Ricardo Wurmus
  2 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-01-17 14:05 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 30130

Mathieu Lirzin <mthl@gnu.org> skribis:

> 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’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30130: Add ‘guix whereis’ command
  2018-01-15 17:16 bug#30130: Add ‘guix whereis’ command Mathieu Lirzin
  2018-01-17 14:05 ` Ludovic Courtès
@ 2018-12-17  9:39 ` swedebugia
  2018-12-17 12:03   ` Ricardo Wurmus
  2024-01-30 16:13 ` Ricardo Wurmus
  2 siblings, 1 reply; 6+ messages in thread
From: swedebugia @ 2018-12-17  9:39 UTC (permalink / raw)
  To: 30130

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30130: Add ‘guix whereis’ command
  2018-12-17  9:39 ` swedebugia
@ 2018-12-17 12:03   ` Ricardo Wurmus
  2018-12-17 20:55     ` Efraim Flashner
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2018-12-17 12:03 UTC (permalink / raw)
  To: swedebugia; +Cc: 30130


> 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.

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30130: Add ‘guix whereis’ command
  2018-12-17 12:03   ` Ricardo Wurmus
@ 2018-12-17 20:55     ` Efraim Flashner
  0 siblings, 0 replies; 6+ messages in thread
From: Efraim Flashner @ 2018-12-17 20:55 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: swedebugia, 30130

[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]

On Mon, Dec 17, 2018 at 01:03:38PM +0100, Ricardo Wurmus wrote:
> 
> > 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.

> 
> > 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30130: Add ‘guix whereis’ command
  2018-01-15 17:16 bug#30130: Add ‘guix whereis’ command Mathieu Lirzin
  2018-01-17 14:05 ` Ludovic Courtès
  2018-12-17  9:39 ` swedebugia
@ 2024-01-30 16:13 ` Ricardo Wurmus
  2 siblings, 0 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2024-01-30 16:13 UTC (permalink / raw)
  To: 30130-done

I’m closing this because we now have “guix locate”.

-- 
Ricardo




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-30 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15 17:16 bug#30130: Add ‘guix whereis’ command Mathieu Lirzin
2018-01-17 14:05 ` Ludovic Courtès
2018-12-17  9:39 ` swedebugia
2018-12-17 12:03   ` Ricardo Wurmus
2018-12-17 20:55     ` Efraim Flashner
2024-01-30 16:13 ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.