On 2022-01-21, Ludovic Courtès wrote: > Lately I found myself going several times to > to look for packages providing a given > file and I thought it’s time to do something about it. Hah! > The script below creates an SQLite database for the current set of > packages, but only for those already in the store: > > guix repl file-database.scm populate ... > I think accuracy (making sure you get results that correspond precisely > to, say, your current channel revisions and your current system) is not > a high priority: some result is better than no result. Likewise for > freshness: results for an older version of a given package may still be > valid now. Hear hear! > In terms of privacy, I think it’s better if we can avoid making one > request per file searched for. Off-line operation would be sweet, and > it comes with responsiveness; fast off-line search is necessary for > things like ‘command-not-found’ (where the shell tells you what package > to install when a command is not found). > > Based on that, it is tempting to just distribute a full database from > ci.guix, say, that the client command would regularly fetch. The > downside is that that’s quite a lot of data to download; if you use the > file search command infrequently, you might find yourself spending more > time downloading the database than actually searching it. > > We could have a hybrid solution: distribute a database that contains > only files in /bin and /sbin (it should be much smaller), and for > everything else, resort to a web service (the Data Service could be > extended to include file lists). That way, we’d have fast > privacy-respecting search for command names, and on-line search for > everything else. What about ... a roughly weekly job that runs on ci.guix. to create the database and packages of parts of the database and a channel that includes those and utilities to query them so that you can install the packages and refresh them at your leisure... Or just put the packages in the main repository, and update it manually roughly weekly? live well, vagrant