guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/07: daemon: Prevent .chroot from being GC'ed when using LocalStore::b


From: Ludovic Courtès
Subject: 01/07: daemon: Prevent .chroot from being GC'ed when using LocalStore::buildDerivation()
Date: Wed, 02 Dec 2015 17:39:09 +0000

civodul pushed a commit to branch master
in repository guix.

commit 538684d0c42fdedfbd660840d3e66c783c9006ef
Author: Eelco Dolstra <address@hidden>
Date:   Mon Aug 24 11:13:31 2015 +0200

    daemon: Prevent .chroot from being GC'ed when using 
LocalStore::buildDerivation()
    
    Fixes #616.
---
 nix/libstore/build.cc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index efe1ab2..ab33f57 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);
 }
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]