aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/local-derivation-goal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build/local-derivation-goal.cc')
-rw-r--r--src/libstore/build/local-derivation-goal.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index d96858fc0..bb4f92989 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -2523,7 +2523,10 @@ DrvOutputs LocalDerivationGoal::registerOutputs()
auto narHashAndSize = hashPath(htSHA256, actualPath);
ValidPathInfo newInfo0 { requiredFinalPath, narHashAndSize.first };
newInfo0.narSize = narHashAndSize.second;
- newInfo0.references = rewriteRefs();
+ auto refs = rewriteRefs();
+ newInfo0.references = std::move(refs.others);
+ if (refs.self)
+ newInfo0.references.insert(newInfo0.path);
return newInfo0;
},
@@ -2774,12 +2777,12 @@ void LocalDerivationGoal::checkOutputs(const std::map<std::string, ValidPathInfo
auto i = outputsByPath.find(worker.store.printStorePath(path));
if (i != outputsByPath.end()) {
closureSize += i->second.narSize;
- for (auto & ref : i->second.referencesPossiblyToSelf())
+ for (auto & ref : i->second.references)
pathsLeft.push(ref);
} else {
auto info = worker.store.queryPathInfo(path);
closureSize += info->narSize;
- for (auto & ref : info->referencesPossiblyToSelf())
+ for (auto & ref : info->references)
pathsLeft.push(ref);
}
}
@@ -2819,7 +2822,7 @@ void LocalDerivationGoal::checkOutputs(const std::map<std::string, ValidPathInfo
auto used = recursive
? getClosure(info.path).first
- : info.referencesPossiblyToSelf();
+ : info.references;
if (recursive && checks.ignoreSelfRefs)
used.erase(info.path);