Skip to content

Commit

Permalink
Merge pull request NixOS#11257 from DeterminateSystems/no-failed-subs…
Browse files Browse the repository at this point in the history
…titution

PathSubstitutionGoal: Fix spurious "failed" count in the progress bar
  • Loading branch information
edolstra authored Aug 6, 2024
2 parents 79abf81 + 0a00bd0 commit 2ed075f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/libstore/build/substitution-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ Goal::Co PathSubstitutionGoal::init()
/* None left. Terminate this goal and let someone else deal
with it. */

worker.failedSubstitutions++;
worker.updateProgress();
if (substituterFailed) {
worker.failedSubstitutions++;
worker.updateProgress();
}

/* Hack: don't indicate failure if there were no substituters.
In that case the calling derivation should just do a
Expand All @@ -158,7 +160,7 @@ Goal::Co PathSubstitutionGoal::init()
}


Goal::Co PathSubstitutionGoal::tryToRun(StorePath subPath, nix::ref<Store> sub, std::shared_ptr<const ValidPathInfo> info, bool& substituterFailed)
Goal::Co PathSubstitutionGoal::tryToRun(StorePath subPath, nix::ref<Store> sub, std::shared_ptr<const ValidPathInfo> info, bool & substituterFailed)
{
trace("all references realised");

Expand Down
2 changes: 1 addition & 1 deletion src/libstore/build/substitution-goal.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public:
*/
Co init() override;
Co gotInfo();
Co tryToRun(StorePath subPath, nix::ref<Store> sub, std::shared_ptr<const ValidPathInfo> info, bool& substituterFailed);
Co tryToRun(StorePath subPath, nix::ref<Store> sub, std::shared_ptr<const ValidPathInfo> info, bool & substituterFailed);
Co finished();

/**
Expand Down

0 comments on commit 2ed075f

Please sign in to comment.