summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-12-12 17:14:57 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-12-12 17:14:57 +0000
commit92cb7c4dfe036ed4c13d45128a21838a039d840f (patch)
tree24adccb1a893ef5d7f4f0321f47cc2b6054810d4 /src/libstore/gc.cc
parent0008b0006db59ea8fccfe041cf8d87f05abb427d (diff)
downloadguix-92cb7c4dfe036ed4c13d45128a21838a039d840f.tar.gz
* Put chroots in the Nix store. This ensures that we can create hard
  links to the inputs.

Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 32cfbd022c..552016584a 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -565,6 +565,11 @@ static bool isLive(const Path & path, const PathSet & livePaths,
     if (hasSuffix(path, ".lock") && tempRoots.find(string(path, 0, path.size() - 5)) != tempRoots.end())
         return true;
 
+    /* Don't delete .chroot directories for derivations that are
+       currently being built. */
+    if (hasSuffix(path, ".chroot") && tempRoots.find(string(path, 0, path.size() - 7)) != tempRoots.end())
+        return true;
+
     return false;
 }