aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build')
-rw-r--r--src/libstore/build/local-derivation-goal.cc14
-rw-r--r--src/libstore/build/substitution-goal.cc6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 3d8299bbf..ff24bd088 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -2421,26 +2421,26 @@ DrvOutputs LocalDerivationGoal::registerOutputs()
}
};
- auto rewriteRefs = [&]() -> PathReferences<StorePath> {
+ auto rewriteRefs = [&]() -> StoreReferences {
/* In the CA case, we need the rewritten refs to calculate the
final path, therefore we look for a *non-rewritten
self-reference, and use a bool rather try to solve the
computationally intractable fixed point. */
- PathReferences<StorePath> res {
- .hasSelfReference = false,
+ StoreReferences res {
+ .self = false,
};
for (auto & r : references) {
auto name = r.name();
auto origHash = std::string { r.hashPart() };
if (r == *scratchPath) {
- res.hasSelfReference = true;
+ res.self = true;
} else if (auto outputRewrite = get(outputRewrites, origHash)) {
std::string newRef = *outputRewrite;
newRef += '-';
newRef += name;
- res.references.insert(StorePath { newRef });
+ res.others.insert(StorePath { newRef });
} else {
- res.references.insert(r);
+ res.others.insert(r);
}
}
return res;
@@ -2523,7 +2523,7 @@ DrvOutputs LocalDerivationGoal::registerOutputs()
auto narHashAndSize = hashPath(htSHA256, actualPath);
ValidPathInfo newInfo0 { requiredFinalPath, narHashAndSize.first };
newInfo0.narSize = narHashAndSize.second;
- static_cast<PathReferences<StorePath> &>(newInfo0) = rewriteRefs();
+ newInfo0.references = rewriteRefs();
return newInfo0;
},
diff --git a/src/libstore/build/substitution-goal.cc b/src/libstore/build/substitution-goal.cc
index 307183505..36b0ea7a7 100644
--- a/src/libstore/build/substitution-goal.cc
+++ b/src/libstore/build/substitution-goal.cc
@@ -128,7 +128,7 @@ void PathSubstitutionGoal::tryNext()
}
if (info->path != storePath) {
- if (info->isContentAddressed(*sub) && info->references.empty() && !info->hasSelfReference) {
+ if (info->isContentAddressed(*sub) && info->references.empty()) {
auto info2 = std::make_shared<ValidPathInfo>(*info);
info2->path = storePath;
info = info2;
@@ -165,7 +165,7 @@ void PathSubstitutionGoal::tryNext()
/* To maintain the closure invariant, we first have to realise the
paths referenced by this one. */
- for (auto & i : info->references)
+ for (auto & i : info->references.others)
addWaitee(worker.makePathSubstitutionGoal(i));
if (waitees.empty()) /* to prevent hang (no wake-up event) */
@@ -187,7 +187,7 @@ void PathSubstitutionGoal::referencesValid()
return;
}
- for (auto & i : info->references)
+ for (auto & i : info->references.others)
assert(worker.store.isValidPath(i));
state = &PathSubstitutionGoal::tryToRun;