aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-08-24 11:13:31 +0200
committerLudovic Courtès <ludo@gnu.org>2015-12-02 19:37:59 +0200
commit538684d0c42fdedfbd660840d3e66c783c9006ef (patch)
treecf40c82a3c3fedd7c13789259a2512ca875e1571 /nix
parent18b3151613e90eb7b4e0d174069ccc9fbe99b721 (diff)
downloadguix-538684d0c42fdedfbd660840d3e66c783c9006ef.tar
guix-538684d0c42fdedfbd660840d3e66c783c9006ef.tar.gz
daemon: Prevent .chroot from being GC'ed when using LocalStore::buildDerivation()
Fixes #616.
Diffstat (limited to 'nix')
-rw-r--r--nix/libstore/build.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index efe1ab2b17..ab33f57265 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -882,6 +882,10 @@ DerivationGoal::DerivationGoal(const Path & drvPath, const StringSet & wantedOut
state = &DerivationGoal::init;
name = (format("building of `%1%'") % drvPath).str();
trace("created");
+
+ /* Prevent the .chroot directory from being
+ garbage-collected. (See isActiveTempFile() in gc.cc.) */
+ worker.store.addTempRoot(drvPath);
}