From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: Re: Package file indexing Date: Sun, 12 Jan 2020 13:29:42 +0000 Message-ID: <871rs4g5vd.fsf@cbaines.net> 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> <87png11xgi.fsf@cbaines.net> <87tv5cpypp.fsf@gnu.org> <874kx4anch.fsf@ambrevar.xyz> <87blrc1sos.fsf@cbaines.net> <87h813wktw.fsf@ambrevar.xyz> <878smf1lrr.fsf@cbaines.net> <87o8v9j1df.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:51312) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqdJO-0007PB-9C for guix-devel@gnu.org; Sun, 12 Jan 2020 08:29:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqdJL-0003X5-T5 for guix-devel@gnu.org; Sun, 12 Jan 2020 08:29:50 -0500 In-reply-to: <87o8v9j1df.fsf@ambrevar.xyz> 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: Pierre Neidhardt Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Pierre Neidhardt writes: > Christopher Baines writes: > >> Not quite. As Ludo mentioned, you can trivially extract out the file >> list from nar files already (like guix archive -t). So this new service >> I'm thinking about which stores the nar files, would be able to read the >> list of files from the nar. > > To clarify, you mean the hypothetical new service for file indexing? > Or did you mean for the Guix Data Service? This new hypothetical service. The Guix Data Service just knows about the existence of some nar files, and the hashes, but I'm not thinking of having it store the contents, hence having another service to do that. >>> Please correct me if I got it all wrong! :D >> >> All great questions, hopefully I've managed to clear things up! > > You did, thanks! > > Another practical question: what would be the preferred format for the > database? > > SQLite? Custom binary? Plain text? Architecturally, I see this part of the problem as something that's more flexible as you could export multiple formats. Ideally, you'd have some data structure optimised for searching, then maybe some way of looking up attributes of the outputs (like what package generates them) and files (what's the size). Maybe sqlite is one to try initially. There's guile-sqlite3 for reading and writing, and it can contain multiple tables as well as indexes for fast searching. > Where would we store this database? In /var? Per user is probably most flexible, so in the home directory somewhere. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl4bH0ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeCAg/+JYZAjApWGPNIKvtscoFTf9TuD3Uo70mvVMPMlkZuNIYLbG5nnZycm9Hs JmRAOr7vIpfPJlK6Ubw7xbo0BAK+8B2GVQDNtKFCU92u+Nnvkzw8blyY/ly/jVGz bHG/VoHBcJP4NmjlUC7CuJDA7j+ygXq1Z66CgnaZ1MMTNg+ZjqPenvlnSY9oZ7cP xrJzPJyoNcQVpZyimXcpfVuDdzB3oEyBanM4vPQpDQKm2jPhvEY4O9wh6CtrE8VK he27kErJuukOLEhTDC3c7RZ0iAOnMkREUCnYiyvFPRIqkLjvsY4vrn5pMTqOe4ID xYpwRbJagbahCG3rr+b7Pep9f/fr41hdx7fq2kFQQST+g9kpDOt24tUM7Qy47AKK R8vyYutffGIenTQ99nrZsgujTBwtYMvxiydFtBMsrFjaQighKV94qDVbpTEM3z6h +W3XtfFJuXA08chogGgSH1b0UkG9EA9LgJZi7k5IzFiPBX8IiaqAXzEuw3vYw8iq 5NHkcm/M2rf8p34GMs0ak9NUcg5sA+FwhoGFjtSNGfveAdLipe7Z+ABVy7SBnOA8 FD382ewpqh1V/Vct2fygTSh8tjpNBYLWNL8YbwKLeKpIFrqk0/vN+sxy7M2IVa1P P9FJJsV2yhtRnUHgJmlXFIgzFxtxAnrW18s70VQDWiRWJe2m/Xw= =JOhY -----END PGP SIGNATURE----- --=-=-=--