about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03T15·20-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03T15·20-0400
commita807edfae8428bf426ee6ae849a7a24d74d39202 (patch)
tree9e6f4b4cb4854cf750f7db7c29ec930c45af0054
parenta3f205b24954c7f0983a937b0b9b3d64c22a2fa7 (diff)
Handle repairing paths that are in build-chroot-dirs
-rw-r--r--src/libstore/build.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 6c40b6686dcc..b62991dff0f3 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1875,6 +1875,13 @@ void DerivationGoal::startBuilder()
             }
         }
 
+        /* If we're repairing, it's possible that we're rebuilding a
+           path that is in settings.dirsInChroot (typically the
+           dependencies of /bin/sh).  Throw them out. */
+        if (repair)
+            foreach (DerivationOutputs::iterator, i, drv.outputs)
+                dirsInChroot.erase(i->second.path);
+
 #else
         throw Error("chroot builds are not supported on this platform");
 #endif