mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 23:12:44 +01:00
Move markContentsGood to after DerivationBuilder finishes
I think this should be fine for repairing. If anything, it is better, because it would be weird to "mark and output good" only for it to then fail output checks.
This commit is contained in:
parent
bde745cb3f
commit
3e0b1705c1
3 changed files with 4 additions and 9 deletions
|
|
@ -623,11 +623,6 @@ Goal::Co DerivationBuildingGoal::tryToBuild()
|
||||||
goal.worker.childTerminated(&goal);
|
goal.worker.childTerminated(&goal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void markContentsGood(const StorePath & path) override
|
|
||||||
{
|
|
||||||
goal.worker.markContentsGood(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
Path openLogFile() override
|
Path openLogFile() override
|
||||||
{
|
{
|
||||||
return goal.openLogFile();
|
return goal.openLogFile();
|
||||||
|
|
@ -804,8 +799,11 @@ Goal::Co DerivationBuildingGoal::tryToBuild()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
StorePathSet outputPaths;
|
StorePathSet outputPaths;
|
||||||
for (auto & [_, output] : builtOutputs)
|
for (auto & [_, output] : builtOutputs) {
|
||||||
|
// for sake of `bmRepair`
|
||||||
|
worker.markContentsGood(output.outPath);
|
||||||
outputPaths.insert(output.outPath);
|
outputPaths.insert(output.outPath);
|
||||||
|
}
|
||||||
runPostBuildHook(worker.store, *logger, drvPath, outputPaths);
|
runPostBuildHook(worker.store, *logger, drvPath, outputPaths);
|
||||||
|
|
||||||
/* It is now safe to delete the lock files, since all future
|
/* It is now safe to delete the lock files, since all future
|
||||||
|
|
|
||||||
|
|
@ -133,8 +133,6 @@ struct DerivationBuilderCallbacks
|
||||||
* @todo this should be reworked
|
* @todo this should be reworked
|
||||||
*/
|
*/
|
||||||
virtual void childTerminated() = 0;
|
virtual void childTerminated() = 0;
|
||||||
|
|
||||||
virtual void markContentsGood(const StorePath & path) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1804,7 +1804,6 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
|
||||||
}
|
}
|
||||||
|
|
||||||
store.optimisePath(actualPath, NoRepair); // FIXME: combine with scanForReferences()
|
store.optimisePath(actualPath, NoRepair); // FIXME: combine with scanForReferences()
|
||||||
miscMethods->markContentsGood(newInfo.path);
|
|
||||||
|
|
||||||
newInfo.deriver = drvPath;
|
newInfo.deriver = drvPath;
|
||||||
newInfo.ultimate = true;
|
newInfo.ultimate = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue