aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/daemon.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-24 22:46:27 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-25 17:53:31 +0000
commit71e4c9c505f2418084643c1a68da5c89b82038dd (patch)
tree875c3a5489b9a45ad662da27db9eefd3cf09969b /src/libstore/daemon.cc
parent1722ae6ecee54e14164d215ba3d767ea6c352fc3 (diff)
WIP: store separate `hasValidPath` bool
Diffstat (limited to 'src/libstore/daemon.cc')
-rw-r--r--src/libstore/daemon.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index 842aef20c..c6b70f6f3 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -326,7 +326,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
logger->startWork();
StorePathSet paths;
if (op == wopQueryReferences)
- for (auto & i : store->queryPathInfo(path)->references)
+ for (auto & i : store->queryPathInfo(path)->referencesPossiblyToSelf())
paths.insert(i);
else if (op == wopQueryReferrers)
store->queryReferrers(path, paths);
@@ -601,7 +601,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
else {
to << 1
<< (i->second.deriver ? store->printStorePath(*i->second.deriver) : "");
- writeStorePaths(*store, to, i->second.references);
+ writeStorePaths(*store, to, i->second.referencesPossiblyToSelf(path));
to << i->second.downloadSize
<< i->second.narSize;
}
@@ -618,7 +618,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
for (auto & i : infos) {
to << store->printStorePath(i.first)
<< (i.second.deriver ? store->printStorePath(*i.second.deriver) : "");
- writeStorePaths(*store, to, i.second.references);
+ writeStorePaths(*store, to, i.second.referencesPossiblyToSelf(i.first));
to << i.second.downloadSize << i.second.narSize;
}
break;
@@ -647,7 +647,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
to << 1;
to << (info->deriver ? store->printStorePath(*info->deriver) : "")
<< info->narHash.to_string(Base16, false);
- writeStorePaths(*store, to, info->references);
+ writeStorePaths(*store, to, info->referencesPossiblyToSelf());
to << info->registrationTime << info->narSize;
if (GET_PROTOCOL_MINOR(clientVersion) >= 16) {
to << info->ultimate
@@ -707,7 +707,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
if (deriver != "")
info.deriver = store->parseStorePath(deriver);
info.narHash = Hash(readString(from), htSHA256);
- info.references = readStorePaths<StorePathSet>(*store, from);
+ info.setReferencesPossiblyToSelf(readStorePaths<StorePathSet>(*store, from));
from >> info.registrationTime >> info.narSize >> info.ultimate;
info.sigs = readStrings<StringSet>(from);
info.ca = parseContentAddressOpt(readString(from));