Subject: [bug#62264] [PATCH v2 2/3] Add 'guix locate'.

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Thu, 08 Jun 2023 22:59:28 +0200

Wow, thank you Antoine and Ludo!  This is well thought out.  Very nice!
Some comments though:

Ludovic Courtès <[email-masked]> writes:
> * guix/scripts/locate.scm, tests/guix-locate.sh: New files.
> * Makefile.am (MODULES): Add 'guix/scripts/locate.scm'.
> (SH_TESTS): Add 'tests/guix-locate.sh'.
> * po/guix/POTFILES.in: Add it.

The commit message is missing the info that this patch also contains the
changes to doc/guix.texi and also to tests/guix-locate.sh.

> diff --git a/doc/guix.texi b/doc/guix.texi
> …
> +@item --datebase=@var{file}

This should be --database not --datebase.

> +@table @code
> +@item manifests
> +This is the default method: it works by traversing profiles on the
> +machine and recording packages it encounters---packages you or other
> +users of the machine installed, directly or indirectly.  It is fast but
> +it can miss other packages available in the store but not referred to by
> +any profile

The sentence does not end with a period.

I went on to test some things.  They are not very important, but still
there are bugs:

After deleting ~/.cache/guix/locate and cd’ing out of my home directory,
then inside “guix shell -CW coreutils”, “guix locate ls” does not find
ls.

When I use “guix locate icecat”, it legitimately also locates a file
lib/icecat/icecat in addition to the desired bin/icecat.  I try to
filter by “guix locate bin/icecat” or “guix locate -g bin/icecat”, but
it seems locate does not support file names with slashes.

Also, “guix locate” crashed for me on a machine where I was using the
nonfree channel to get support for my GPU and not just software
rendering.  “guix locate” crashed; it failed to load its module (nongnu
packages ncurses).  Sadly, after playing around without the bad channel,
I cannot replicate this anymore with the bad channel.  locate works now.
Strange.  And I cannot currently test on another machine for unrelated
reasons.

Regards,
Florian