about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-18T14·11-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-18T14·11-0400
commit00092b2d356293a7af9d4d8125a689f90c461591 (patch)
treee235eeb1bf2a267a65056960db62d87b5e3ae487 /src/libstore/build.cc
parentb67466576531959ca298fcfce4f0bf379515f8e5 (diff)
Keep build directory if not all expected outputs were produced
Fixes issue #123 in Nixpkgs.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 43565ac024aa..04ba02d14e46 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1352,8 +1352,6 @@ void DerivationGoal::buildDone()
                 % drvPath % statusToString(status));
         }
 
-        deleteTmpDir(true);
-
         /* Delete the chroot (if we were using one). */
         autoDelChroot.reset(); /* this runs the destructor */
 
@@ -1370,6 +1368,8 @@ void DerivationGoal::buildDone()
            being valid. */
         computeClosure();
 
+        deleteTmpDir(true);
+
         /* It is now safe to delete the lock files, since all future
            lockers will see that the output paths are valid; they will
            not create new lock files with the same names as the old
@@ -2239,7 +2239,7 @@ void DerivationGoal::deleteTmpDir(bool force)
     if (tmpDir != "") {
         if (settings.keepFailed && !force) {
             printMsg(lvlError,
-                format("builder for `%1%' failed; keeping build directory `%2%'")
+                format("note: keeping build directory `%2%'")
                 % drvPath % tmpDir);
             if (buildUser.enabled() && !amPrivileged())
                 getOwnership(tmpDir);