mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 09:19:36 +01:00
Fix issue #14287
The test added in the previous commit now passes. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
246dbe1c05
commit
de192794c9
1 changed files with 9 additions and 1 deletions
|
|
@ -677,7 +677,15 @@ Goal::Co DerivationBuildingGoal::tryToBuild()
|
||||||
{
|
{
|
||||||
builder.reset();
|
builder.reset();
|
||||||
StorePathSet outputPaths;
|
StorePathSet outputPaths;
|
||||||
for (auto & [_, output] : builtOutputs) {
|
/* In the check case we install no store objects, and so
|
||||||
|
`builtOutputs` is empty. However, per issue #14287, there is
|
||||||
|
an expectation that the post-build hook is still executed.
|
||||||
|
(This is useful for e.g. logging successful deterministic rebuilds.)
|
||||||
|
|
||||||
|
In order to make that work, in the check case just load the
|
||||||
|
(preexisting) infos from scratch, rather than relying on what
|
||||||
|
`DerivationBuilder` returned to us. */
|
||||||
|
for (auto & [_, output] : buildMode == bmCheck ? checkPathValidity(initialOutputs).second : builtOutputs) {
|
||||||
// for sake of `bmRepair`
|
// for sake of `bmRepair`
|
||||||
worker.markContentsGood(output.outPath);
|
worker.markContentsGood(output.outPath);
|
||||||
outputPaths.insert(output.outPath);
|
outputPaths.insert(output.outPath);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue