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
parent eadb86f447
commit e12cf82782

View file

@ -911,6 +911,10 @@ DerivationGoal::DerivationGoal(const Path & drvPath, const BasicDerivation & drv
state = &DerivationGoal::haveDerivation;
name = (format("building of %1%") % showPaths(outputPaths(drv))).str();
trace("created");
/* Prevent the .chroot directory from being
garbage-collected. (See isActiveTempFile() in gc.cc.) */
worker.store.addTempRoot(drvPath);
}