1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 06:53:54 +02:00

Merge pull request #4389 from hercules-ci/backport-issue-3964-substitution-loop

Backport issue 3964 substitution loop
This commit is contained in:
Domen Kožar 2020-12-25 15:59:31 +00:00 committed by GitHub
commit 0828ace09b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1222,8 +1222,13 @@ void DerivationGoal::outputsSubstituted()
/* If the substitutes form an incomplete closure, then we should /* If the substitutes form an incomplete closure, then we should
build the dependencies of this derivation, but after that, we build the dependencies of this derivation, but after that, we
can still use the substitutes for this derivation itself. */ can still use the substitutes for this derivation itself.
if (nrIncompleteClosure > 0) retrySubstitution = true;
If the nrIncompleteClosure != nrFailed, we have another issue as well.
In particular, it may be the case that the hole in the closure is
an output of the current derivation, which causes a loop if retried.
*/
if (nrIncompleteClosure > 0 && nrIncompleteClosure == nrFailed) retrySubstitution = true;
nrFailed = nrNoSubstituters = nrIncompleteClosure = 0; nrFailed = nrNoSubstituters = nrIncompleteClosure = 0;