From 538684d0c42fdedfbd660840d3e66c783c9006ef Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 24 Aug 2015 11:13:31 +0200 Subject: daemon: Prevent .chroot from being GC'ed when using LocalStore::buildDerivation() Fixes #616. --- nix/libstore/build.cc | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- cgit v1.2.3