aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/misc.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-14 16:38:43 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-14 16:42:03 -0500
commitb3d91239ae9f21a60057b278ceeff663fb786246 (patch)
treee5c910beda88a280b197d27cc269595d667d988b /src/libstore/misc.cc
parent056cc1c1b903114f59c536dd9821b46f68516f4e (diff)
Make `ValidPathInfo` have plain `StorePathSet` references like before
This change can wait for another PR.
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r--src/libstore/misc.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc
index 70e97569a..da96dcebc 100644
--- a/src/libstore/misc.cc
+++ b/src/libstore/misc.cc
@@ -40,8 +40,9 @@ void Store::computeFSClosure(const StorePathSet & startPaths,
std::future<ref<const ValidPathInfo>> & fut) {
StorePathSet res;
auto info = fut.get();
- for (auto & ref : info->references.others)
- res.insert(ref);
+ for (auto & ref : info->references)
+ if (ref != path)
+ res.insert(ref);
if (includeOutputs && path.isDerivation())
for (auto & [_, maybeOutPath] : queryPartialDerivationOutputMap(path))
@@ -223,7 +224,7 @@ void Store::queryMissing(const std::vector<DerivedPath> & targets,
state->narSize += info->second.narSize;
}
- for (auto & ref : info->second.references.others)
+ for (auto & ref : info->second.references)
pool.enqueue(std::bind(doPath, DerivedPath::Opaque { ref }));
},
}, req.raw());
@@ -241,7 +242,7 @@ StorePaths Store::topoSortPaths(const StorePathSet & paths)
return topoSort(paths,
{[&](const StorePath & path) {
try {
- return queryPathInfo(path)->references.others;
+ return queryPathInfo(path)->references;
} catch (InvalidPath &) {
return StorePathSet();
}
@@ -297,7 +298,7 @@ std::map<DrvOutput, StorePath> drvOutputReferences(
auto info = store.queryPathInfo(outputPath);
- return drvOutputReferences(Realisation::closure(store, inputRealisations), info->referencesPossiblyToSelf());
+ return drvOutputReferences(Realisation::closure(store, inputRealisations), info->references);
}
OutputPathMap resolveDerivedPath(Store & store, const DerivedPath::Built & bfd, Store * evalStore_)