Skip to content

Commit

Permalink
Prevent .chroot from being GC'ed when using LocalStore::buildDerivati…
Browse files Browse the repository at this point in the history
…on()

Fixes NixOS#616.
  • Loading branch information
edolstra committed Aug 24, 2015
1 parent eadb86f commit e12cf82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libstore/build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit e12cf82

Please sign in to comment.