about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-12-15T23·55+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-12-15T23·55+0000
commit6f6bb1fdea9dcd4c6f6c0b8059b05d56ea7c16f3 (patch)
treee6c6477fe048c6bd678ec43bb806ed8d01f62102
parent92cb7c4dfe036ed4c13d45128a21838a039d840f (diff)
* Delete the chroot if it already exists (e.g. left over from an
  interrupted build).

-rw-r--r--src/libstore/build.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 54890afd180c..f015b878c3ee 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1678,6 +1678,7 @@ void DerivationGoal::startBuilder()
            to ensure that we can create hard-links to non-directory
            inputs in the fake Nix store in the chroot (see below). */
         chrootRootDir = drvPath + ".chroot";
+        if (pathExists(chrootRootDir)) deletePath(chrootRootDir);
 
         /* Clean up the chroot directory automatically. */
         autoDelChroot = boost::shared_ptr<AutoDelete>(new AutoDelete(chrootRootDir));