1
1
Fork 0
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:
John Ericson 2025-08-28 14:54:11 -04:00
parent bde745cb3f
commit 3e0b1705c1
3 changed files with 4 additions and 9 deletions

View file

@ -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

View file

@ -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;
}; };
/** /**

View file

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