On 10/7/26 20:21, Hugo Buddelmeijer via wrote:
Basically, I want to always keep everything in the store that
corresponds to the tip of master or the tip of python-team; I never want
to collect those, because chances are high I'm going to need those
packages later.
So I'm now running 'guix build -r $PKG $PKG --no-grafts' for all 2700
packages I have already built, but it takes about 2 seconds per package,
so it will take hours. So this is not something I can do before every
`guix gc` either.
Apparently, all that 'guix build -r myroot mypkg --no-grafts' does, is:
1. build mypkg
2. create a symlink called myroot that points to the output in the store
3. create a symlink in /var/guix/gcroots/auto to myroot
(With multiple symlinks for multiple outputs.) And
1. the package is already built by design,
2. the myroot symlink I can bulk create myself,
3. the /var/guix/gcroots/auto symlink is created by addIndirectRoot I think
So if I can figure out a way to call addIndirectRoot in bulk, then I'm done.
https://codeberg.org/guix/guix/src/commit/aa641a7175bc6eba1e1c6472884245d2f2557967/nix/libstore/store-api.hh#L243