Hi Ludo! > “Something” needs to build the file-to-package database (which is what > you’re working on), and then there needs to be a way for users to fetch > that database. This is all orthogonal to substitutes, as I see it, > which is why I think we need to think about integrating it maybe with > ‘guix publish’ on the server side and (guix channels) on the client > side. If the database is filled on =guix build=, then the substitute server would automatically have a filesearch database. Question: How do I hook onto =guix build=? The only thing left to do after that is to expose the database in =guix publish= so that the client can fetch it with a =guix pull=. >>> If we download a fresh database every time, we might as well simply >>> overwrite the one we have? >> >> But then we would miss the database when switching Guix generation. > > Ah got it; having a database known to correspond to a specific commit is > even better. > > However, note that it could take time for the server to provide the > complete database for a commit (the time for as many packages as > possible to be built), so clients may want to refresh it anyway, or even > perhaps to use an older database. Indeed, and that's why I think we need to include a timestamp: if the client's database timestamp is older than that of the substitute server database, then we re-fetch it. Sounds good? -- Pierre Neidhardt https://ambrevar.xyz/