From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Package file indexing Date: Tue, 26 Mar 2019 13:41:16 +0100 Message-ID: <87pnqdhkpf.fsf@gnu.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:35739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8lZ7-0002jJ-12 for guix-devel@gnu.org; Tue, 26 Mar 2019 08:52:30 -0400 In-Reply-To: <87imw7cpe7.fsf@bababa.i-did-not-set--mail-host-address--so-tickle-me> (Pierre Neidhardt's message of "Mon, 25 Mar 2019 09:46:40 +0100") 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.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt Cc: Guix-devel Pierre Neidhardt skribis: > Ludovic Court=C3=A8s writes: [...] >> The daemon could have a special RPC: you give it a file name and it >> returns a store item (or package+version?) or #f. > > I think you meant "store itemS" (plural), no? Yes. >> Internally it=E2=80=99d call =E2=80=98guix substitute=E2=80=99 to fetch = the file index from >> the substitute server, check its signature, cache it locally, and then >> look up the file. >> >> You should look at how NixOS does it for its =E2=80=98command-not-found= =E2=80=99 support >> (I think it=E2=80=99s part of NixOS, not Nix). IIRC they distribute an = SQLite >> database, but it=E2=80=99s a pretty ad-hoc mechanism without authenticat= ion. > > I could work on this, but that seems like a lot of work, especially for > me who knows nothing about the daemon (but hey, it's a great opportunity > to learn!). Note that the daemon would act as an intermediary, but in practice the functionality would be very much peripheral to the daemon. IOW, you don=E2=80=99t need to know about the daemon internals. Ludo=E2=80=99.