forked from lix-project/lix
Keep build directory if not all expected outputs were produced
Fixes issue #123 in Nixpkgs.
This commit is contained in:
parent
b674665765
commit
00092b2d35
|
@ -1352,8 +1352,6 @@ void DerivationGoal::buildDone()
|
||||||
% drvPath % statusToString(status));
|
% drvPath % statusToString(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteTmpDir(true);
|
|
||||||
|
|
||||||
/* Delete the chroot (if we were using one). */
|
/* Delete the chroot (if we were using one). */
|
||||||
autoDelChroot.reset(); /* this runs the destructor */
|
autoDelChroot.reset(); /* this runs the destructor */
|
||||||
|
|
||||||
|
@ -1370,6 +1368,8 @@ void DerivationGoal::buildDone()
|
||||||
being valid. */
|
being valid. */
|
||||||
computeClosure();
|
computeClosure();
|
||||||
|
|
||||||
|
deleteTmpDir(true);
|
||||||
|
|
||||||
/* It is now safe to delete the lock files, since all future
|
/* It is now safe to delete the lock files, since all future
|
||||||
lockers will see that the output paths are valid; they will
|
lockers will see that the output paths are valid; they will
|
||||||
not create new lock files with the same names as the old
|
not create new lock files with the same names as the old
|
||||||
|
@ -2239,7 +2239,7 @@ void DerivationGoal::deleteTmpDir(bool force)
|
||||||
if (tmpDir != "") {
|
if (tmpDir != "") {
|
||||||
if (settings.keepFailed && !force) {
|
if (settings.keepFailed && !force) {
|
||||||
printMsg(lvlError,
|
printMsg(lvlError,
|
||||||
format("builder for `%1%' failed; keeping build directory `%2%'")
|
format("note: keeping build directory `%2%'")
|
||||||
% drvPath % tmpDir);
|
% drvPath % tmpDir);
|
||||||
if (buildUser.enabled() && !amPrivileged())
|
if (buildUser.enabled() && !amPrivileged())
|
||||||
getOwnership(tmpDir);
|
getOwnership(tmpDir);
|
||||||
|
|
Loading…
Reference in a new issue