diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-03-24 23:24:48 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-03-24 23:24:48 +0100 |
commit | fe5509df9a58359a67da8c72ed8721cb3a33371d (patch) | |
tree | 5f994e4b221814cad85e025b05cc1e509ba79a0b /src | |
parent | 09796c026376b49a8bc5bb3a2865db015d3dfb06 (diff) |
Only return wanted outputs
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build/derivation-goal.cc | 5 | ||||
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 40c445836..7dc5737fb 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -311,14 +311,11 @@ void DerivationGoal::outputsSubstitutionTried() gaveUpOnSubstitution(); } + /* At least one of the output paths could not be produced using a substitute. So we have to build instead. */ void DerivationGoal::gaveUpOnSubstitution() { - /* Make sure checkPathValidity() from now on checks all - outputs. */ - wantedOutputs.clear(); - /* The inputs must be built before we can build this goal. */ if (useDerivation) for (auto & i : dynamic_cast<Derivation *>(drv.get())->inputDrvs) diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index 75e7e6ca3..ed83c4770 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -2613,7 +2613,8 @@ DrvOutputs LocalDerivationGoal::registerOutputs() signRealisation(thisRealisation); worker.store.registerDrvOutput(thisRealisation); } - builtOutputs.emplace(thisRealisation.id, thisRealisation); + if (wantedOutputs.empty() || wantedOutputs.count(outputName)) + builtOutputs.emplace(thisRealisation.id, thisRealisation); } return builtOutputs; |