guix-devel
[Top][All Lists]
Advanced

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

Re: Improve package search


From: Pierre Neidhardt
Subject: Re: Improve package search
Date: Thu, 14 Mar 2019 23:46:33 +0100
User-agent: mu4e 1.0; emacs 26.1

> Absolutely.  Adding this to the package record manually is a maintenance
> nightmare.  It's data that can be trivially auto-generated (ls …/{,s}bin,
> basically), and storing it in-line takes up too much screen and mind space for
> my taste.

"Program names" might even be too limited, if not too shortsighted.  At the end
of the day, programs are not necessarily stored in /bin/.  More importantly,
users don't necessarily look for programs, they could very well be looking for a
library.

So instead of including a program name listing, I suggest to we index the
complete file listing of all packages.    This would allow us to add the only
feature that's missing in Guix that other package managers have (dpkg, portage,
pacman...): find file names in non-installed packages.

Extending the search with file listings might result in too much noise, so
instead we could have a separate command.  "guix which" for instance, as
suggested Tobias, but since we are not just talking about executables, maybe
"guix filesearch" would be more appropriate.

Example:

--8<---------------cut here---------------start------------->8---
$ guix filesearch foo
74i7r7qp1km0gw1i22fnq3szbgc9mpdx-foobar-1.0/bin/foo
74i7r7qp1km0gw1i22fnq3szbgc9mpdx-foobar-1.0/lib/libfoo.a
109sdfvp1km0gwjdksl982fjidsfji9s-…-foobar-1.2/bin/foo
109sdfvp1km0gwjdksl982fjidsfji9s-…-foobar-1.2/lib/libfoo.a
--8<---------------cut here---------------end--------------->8---

And full paths would be supported, so that we can "filter" by executables for 
instance:

--8<---------------cut here---------------start------------->8---
$ guix filesearch bin/foo
74i7r7qp1km0gw1i22fnq3szbgc9mpdx-foobar-1.0/bin/foo
109sdfvp1km0gwjdksl982fjidsfji9s-…-foobar-1.2/bin/foo
--8<---------------cut here---------------end--------------->8---

This has been discussed before, if someone can find the threads... :p

> People have suggested using the build farm for this, but that adds
> disproportionate complexity and decouples/delays updates from the commits that
> caused them.  It's just not the right place.

I haven't though through the details, but I am under the impression that the
file listing could be retrieve with the same mechanism as "guix size", i.e. from
the substitute index.  I think it would work well on the build farm, without
more complexity than just another entry to the substitute index.

I'd really love to work on this Very Soon™ ;)

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]