daemon: Prevent .chroot from being GC'ed when using LocalStore::buildDerivation()

Fixes #616.
This commit is contained in:
Eelco Dolstra 2015-08-24 11:13:31 +02:00 committed by Ludovic Courtès
parent 18b3151613
commit 538684d0c4
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}