* When keeping the temporary build directory (-K), change the owner

back to the Nix account.
This commit is contained in:
Eelco Dolstra 2006-12-07 23:27:40 +00:00
parent e24d0201c2
commit 6833e8bbe8

View file

@ -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 = "";