Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/libstore/unix/build/derivation-builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,6 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
if (buildMode == bmRepair) {
/* Path already exists, need to replace it */
replaceValidPath(store.toRealPath(finalDestPath), actualPath);
actualPath = store.toRealPath(finalDestPath);
} else if (buildMode == bmCheck) {
/* Path already exists, and we want to compare, so we leave out
new path in place. */
Expand All @@ -1756,7 +1755,6 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
auto destPath = store.toRealPath(finalDestPath);
deletePath(destPath);
movePath(actualPath, destPath);
actualPath = destPath;
}
}

Expand Down Expand Up @@ -1809,7 +1807,9 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
debug("unreferenced input: '%1%'", store.printStorePath(i));
}

store.optimisePath(actualPath, NoRepair); // FIXME: combine with scanForReferences()
if (!store.isValidPath(newInfo.path))
store.optimisePath(
store.toRealPath(finalDestPath), NoRepair); // FIXME: combine with scanForReferences()

newInfo.deriver = drvPath;
newInfo.ultimate = true;
Expand Down
Loading