mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 11:36:03 +01:00
Fix issue #14287
The test added in the previous commit now passes.
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
(cherry picked from commit de192794c9)
This commit is contained in:
parent
328a3bbbd0
commit
9e4177bc67
1 changed files with 9 additions and 1 deletions
|
|
@ -860,7 +860,15 @@ Goal::Co DerivationBuildingGoal::tryToBuild()
|
|||
{
|
||||
builder.reset();
|
||||
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`
|
||||
worker.markContentsGood(output.outPath);
|
||||
outputPaths.insert(output.outPath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue