mirror of
https://github.com/NixOS/nix
synced 2025-07-01 08:28:00 +02:00
Make ValidPathInfo
have plain StorePathSet
references like before
This change can wait for another PR.
This commit is contained in:
parent
056cc1c1b9
commit
b3d91239ae
24 changed files with 109 additions and 166 deletions
|
@ -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()));
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue