[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'guix build' and garbage collection
From: |
Ludovic Courtès |
Subject: |
Re: 'guix build' and garbage collection |
Date: |
Sun, 02 Apr 2017 11:30:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi Chris,
Chris Marusich <address@hidden> skribis:
> I saw this in guix/scripts.build.scm:
>
> (and (build-derivations store drv mode)
> (for-each show-derivation-outputs drv)
> (for-each (cut register-root store <> <>)
> (map (lambda (drv)
> (map cdr
> (derivation->output-paths drv)))
> drv)
> roots))
>
> Here, we build the derivations, and then we add indirect GC roots. My
> question is: what guarantee is there that the output paths will not be
> garbage collected after we build the derivations but before we add the
> indirect GC roots?
For the duration of the connection to the build daemon, build results
are registered as GC roots, so we’re fine.
You can see it in the ‘DerivationGoal’ constructor in libstore/build.cc:
/* Prevent the .chroot directory from being
garbage-collected. (See isActiveTempFile() in gc.cc.) */
worker.store.addTempRoot(drvPath);
Likewise in ‘SubstitutionGoal::init’.
HTH,
Ludo’.
- 'guix build' and garbage collection, Chris Marusich, 2017/04/01
- Re: 'guix build' and garbage collection,
Ludovic Courtès <=
- Re: 'guix build' and garbage collection, Chris Marusich, 2017/04/03
- Re: 'guix build' and garbage collection, Ludovic Courtès, 2017/04/03
- Re: 'guix build' and garbage collection, Chris Marusich, 2017/04/03
- Re: 'guix build' and garbage collection, Ludovic Courtès, 2017/04/04
- Re: 'guix build' and garbage collection, Chris Marusich, 2017/04/06
- Re: 'guix build' and garbage collection, Ludovic Courtès, 2017/04/07