From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Package file indexing Date: Thu, 09 Jan 2020 13:55:26 +0100 Message-ID: <87v9pk94ch.fsf@ambrevar.xyz> References: <20190314204941.GA21065@jasmine.lan> <87mulx9kuv.fsf@nckx> <87zhpx846u.fsf@ambrevar.xyz> <87bm21y2s2.fsf_-_@gnu.org> <87imw7cpe7.fsf@bababa.i-did-not-set--mail-host-address--so-tickle-me> <87pnqdhkpf.fsf@gnu.org> <87imlt3hr2.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36831) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipXLb-0001JS-Ce for guix-devel@gnu.org; Thu, 09 Jan 2020 07:55:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipXLY-0008OE-Fm for guix-devel@gnu.org; Thu, 09 Jan 2020 07:55:34 -0500 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: zimoun Cc: Guix-devel --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable zimoun writes: > It appears to me better for 2 reasons: > 1. because obviously "filesearch" is a kind of "search" ;-) so it > adds consistency. > 2. because it allows (in the near future) mixed research: "guix > search bin/hg python" applying the "python" filter only to the > packages returned by "bin/hg". And "guix search python bin/hg" search > the binary file "hg" only to the packages matching "python. Agreed. >> --8<---------------cut here---------------start------------->8--- >> name: jami > > [...] > >> filepaths: >> + bin/foo >> + share/bar/bin/foo-blah >> relevance: 24 >> --8<---------------cut here---------------end--------------->8--- > > How do you compute the relevance/score? I've copy-pasted the current output for Jami, I did not touch it in a particular way. > For example, let consider 2 packages: > > a- 'bin/foo' > b- 'share/baz/bin/foo' > > How to do you order/score the result? What do you expect first? The > package a- I guess. > Therefore, weight should be applied, isn't it? Agreed. >> I suggest the following: >> >> - Add a "--search-file-paths=3D[auto|on|off]" option. > > I do not find this option name explaining by itself. Personally, I am > inclined to provide a path to the option and not a boolean. If I understand you correctly, you are suggesting this syntax to return packages matching "python-" and with files matching "foo.*bar". guix search --file-path=3D"foo.*bar" python- What I originally suggested is that we could equivalently do: guix search "/foo.*bar" python- Forget about the --search-file-paths option, it's probably not necessary. > Time to time, I am looking for header C file or latex style but I do > not know the path. I would like to have something like: > > guix search gmsh.h > or > guix search ieee*.sty That's OK, if you know the basename then "/gmsh.h" will match. If you only know a substring of the basename, then "/.*gmsh.h" will match too. > IMHO, it should be included under "guix package", i.e., > > guix package gmsh --list-files Why not, but then this does not match the interface we have with "guix size". Could we also have "guix package gmsh --size"? Would we deprecate "guix size" then? If not, then for the sake of consistency I'd prefer to have "guix list-file= s". =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl4XIr4ACgkQm9z0l6S7 zH/KcQf+KRFn5w1Ugs8+UBBQ8+SfuUvbNzyb2y+/hhwImemMjhZisD/jQbdMUrhT FiHAy/hfAd/A6vpHBFyZBoeuePf6Wcye+HFyB2+eNLazOhgi6W3udpVv2bvtLG9m XmwXRT2LpJFyWquSLnj0bOjGkwWzKSFXXom88qinWecdkq6vAl6Nj3/kkPDGxk/i 7BNnHY5ifZyQdgrskiSZvnR1E79yHzbqaTFmbRsFYYiiSwvO68JJHlk9BXjFm5GH BVXKFnVcdDLWPYbo5n8+UO2b3rcF0s8+g7VVfY2jN4OlpKpqXwR1kC1c7cBgseWZ hbqLJOm9luL8dS4owBVHVW7OuJP7kQ== =j2kv -----END PGP SIGNATURE----- --=-=-=--