From 6f6bb1fdea9dcd4c6f6c0b8059b05d56ea7c16f3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 15 Dec 2008 23:55:11 +0000 Subject: [PATCH] * Delete the chroot if it already exists (e.g. left over from an interrupted build). --- src/libstore/build.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 54890afd1..f015b878c 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(new AutoDelete(chrootRootDir));