From 6f6bb1fdea9dcd4c6f6c0b8059b05d56ea7c16f3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 15 Dec 2008 23:55:11 +0000 Subject: * 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(+) (limited to 'src/libstore') 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(new AutoDelete(chrootRootDir)); -- cgit 1.4.1