[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: |
Mon, 03 Apr 2017 10:53:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi Chris,
Chris Marusich <address@hidden> skribis:
> My understanding is that Nix builds derivations in a temporary
> directory. My understanding is that eventually, we copy the results of
> the build into the final, content-addressed store path. Since we don't
> know the final, content-addressed store path until after we calculate
> the hash of the output, how do we prevent that final store path from
> being garbage collected while the build process is running? Do we use
> addTempRoot to add the final, content-addressed store path as a
> temporary root, too? I looked in the code but couldn't figure this out.
Store items are not content-addressed, except for fixed-output
derivations and things added with ‘add-to-store’ and
‘add-text-to-store’.
Leaving these two special cases aside, store file names are computed as
a function of the build inputs of a derivation. In Eelco Dolstra’s
thesis, both models are described: the “extensional model” (the one Nix
and Guix use) and the “intensional model” (content-addressability, which
has never been deployed, and which is challenging in many ways.)
HTH!
Ludo’.