mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Merge pull request #14276 from NixOS/fix-14193
libstore/registerOutputs: Don't try to optimize a non-existent actual…
This commit is contained in:
commit
27767a6094
1 changed files with 3 additions and 3 deletions
|
|
@ -1742,7 +1742,6 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
|
||||||
if (buildMode == bmRepair) {
|
if (buildMode == bmRepair) {
|
||||||
/* Path already exists, need to replace it */
|
/* Path already exists, need to replace it */
|
||||||
replaceValidPath(store.toRealPath(finalDestPath), actualPath);
|
replaceValidPath(store.toRealPath(finalDestPath), actualPath);
|
||||||
actualPath = store.toRealPath(finalDestPath);
|
|
||||||
} else if (buildMode == bmCheck) {
|
} else if (buildMode == bmCheck) {
|
||||||
/* Path already exists, and we want to compare, so we leave out
|
/* Path already exists, and we want to compare, so we leave out
|
||||||
new path in place. */
|
new path in place. */
|
||||||
|
|
@ -1756,7 +1755,6 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
|
||||||
auto destPath = store.toRealPath(finalDestPath);
|
auto destPath = store.toRealPath(finalDestPath);
|
||||||
deletePath(destPath);
|
deletePath(destPath);
|
||||||
movePath(actualPath, destPath);
|
movePath(actualPath, destPath);
|
||||||
actualPath = destPath;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1809,7 +1807,9 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
|
||||||
debug("unreferenced input: '%1%'", store.printStorePath(i));
|
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.deriver = drvPath;
|
||||||
newInfo.ultimate = true;
|
newInfo.ultimate = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue