aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-01-26 10:02:03 +0100
committerregnat <rg@regnat.ovh>2021-02-23 08:04:03 +0100
commit527da736905730e70725bf4b3556d61267d220ba (patch)
tree9fdc44c3bf0bfa79124c53305417e93874da33c2
parent69666b951ee06733ed420cb4cd408a19e42c6e43 (diff)
Properly bypass the registering step when all outputs are present
There was already some logic for that, but it didn't handle the case of content-addressed outputs, so extend it a bit for that
-rw-r--r--src/libstore/build/derivation-goal.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index 096f24029..6052b625d 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -3001,11 +3001,11 @@ void DerivationGoal::registerOutputs()
*/
if (hook) {
bool allValid = true;
- for (auto & i : drv->outputsAndOptPaths(worker.store)) {
- if (!i.second.second || !worker.store.isValidPath(*i.second.second))
+ for (auto & [outputName, outputPath] : worker.store.queryPartialDerivationOutputMap(drvPath)) {
+ if (!outputPath || !worker.store.isValidPath(*outputPath))
allValid = false;
else
- finalOutputs.insert_or_assign(i.first, *i.second.second);
+ finalOutputs.insert_or_assign(outputName, *outputPath);
}
if (allValid) return;
}