From 6833e8bbe89dc61bda59a1e04c01415501ad4133 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 7 Dec 2006 23:27:40 +0000 Subject: * When keeping the temporary build directory (-K), change the owner back to the Nix account. --- src/libstore/build.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/libstore/build.cc') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 0d2879cc9..9f3420c68 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1698,10 +1698,13 @@ void DerivationGoal::initChild() void DerivationGoal::deleteTmpDir(bool force) { if (tmpDir != "") { - if (keepFailed && !force) + if (keepFailed && !force) { printMsg(lvlError, format("builder for `%1%' failed; keeping build directory `%2%'") % drvPath % tmpDir); + if (buildUser.enabled() && !amPrivileged()) + getOwnership(tmpDir); + } else deletePathWrapped(tmpDir); tmpDir = ""; -- cgit v1.2.3