aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store
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/nix-store
parent056cc1c1b903114f59c536dd9821b46f68516f4e (diff)
Make `ValidPathInfo` have plain `StorePathSet` references like before
This change can wait for another PR.
Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/dotgraph.cc2
-rw-r--r--src/nix-store/graphml.cc2
-rw-r--r--src/nix-store/nix-store.cc8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/nix-store/dotgraph.cc b/src/nix-store/dotgraph.cc
index 36d774dca..577cadceb 100644
--- a/src/nix-store/dotgraph.cc
+++ b/src/nix-store/dotgraph.cc
@@ -56,7 +56,7 @@ void printDotGraph(ref<Store> store, StorePathSet && roots)
cout << makeNode(std::string(path.to_string()), path.name(), "#ff0000");
- for (auto & p : store->queryPathInfo(path)->referencesPossiblyToSelf()) {
+ for (auto & p : store->queryPathInfo(path)->references) {
if (p != path) {
workList.insert(p);
cout << makeEdge(std::string(p.to_string()), std::string(path.to_string()));
diff --git a/src/nix-store/graphml.cc b/src/nix-store/graphml.cc
index d2eebca7a..425d61e53 100644
--- a/src/nix-store/graphml.cc
+++ b/src/nix-store/graphml.cc
@@ -71,7 +71,7 @@ void printGraphML(ref<Store> store, StorePathSet && roots)
auto info = store->queryPathInfo(path);
cout << makeNode(*info);
- for (auto & p : info->referencesPossiblyToSelf()) {
+ for (auto & p : info->references) {
if (p != path) {
workList.insert(p);
cout << makeEdge(path.to_string(), p.to_string());
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 5cb5aa53a..5b261ecc6 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -263,7 +263,7 @@ static void printTree(const StorePath & path,
closure(B). That is, if derivation A is an (possibly indirect)
input of B, then A is printed first. This has the effect of
flattening the tree, preventing deeply nested structures. */
- auto sorted = store->topoSortPaths(info->referencesPossiblyToSelf());
+ auto sorted = store->topoSortPaths(info->references);
reverse(sorted.begin(), sorted.end());
for (const auto &[n, i] : enumerate(sorted)) {
@@ -344,7 +344,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
for (auto & j : ps) {
if (query == qRequisites) store->computeFSClosure(j, paths, false, includeOutputs);
else if (query == qReferences) {
- for (auto & p : store->queryPathInfo(j)->referencesPossiblyToSelf())
+ for (auto & p : store->queryPathInfo(j)->references)
paths.insert(p);
}
else if (query == qReferrers) {
@@ -867,7 +867,7 @@ static void opServe(Strings opFlags, Strings opArgs)
auto info = store->queryPathInfo(i);
out << store->printStorePath(info->path)
<< (info->deriver ? store->printStorePath(*info->deriver) : "");
- worker_proto::write(*store, out, info->referencesPossiblyToSelf());
+ worker_proto::write(*store, out, info->references);
// !!! Maybe we want compression?
out << info->narSize // downloadSize
<< info->narSize;
@@ -964,7 +964,7 @@ static void opServe(Strings opFlags, Strings opArgs)
};
if (deriver != "")
info.deriver = store->parseStorePath(deriver);
- info.setReferencesPossiblyToSelf(worker_proto::read(*store, in, Phantom<StorePathSet> {}));
+ info.references = worker_proto::read(*store, in, Phantom<StorePathSet> {});
in >> info.registrationTime >> info.narSize >> info.ultimate;
info.sigs = readStrings<StringSet>(in);
info.ca = parseContentAddressOpt(readString(in));