diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index 10e842d8b74..5ad7f6ade49 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -622,7 +622,7 @@ static void performOp(TunnelLogger * logger, ref store, auto paths = readStorePaths(*store, from); std::set caPaths; if (GET_PROTOCOL_MINOR(clientVersion) > 22) - caPaths = readContentAddressSet(*store, from); + caPaths = readStorePathDescriptorSet(*store, from); logger->startWork(); store->querySubstitutablePathInfos(paths, caPaths, infos); logger->stopWork(); diff --git a/src/libstore/path-info.hh b/src/libstore/path-info.hh index febc3e6fe65..5b2716b769f 100644 --- a/src/libstore/path-info.hh +++ b/src/libstore/path-info.hh @@ -72,7 +72,7 @@ struct ValidPathInfo : PathReferences void sign(const Store & store, const SecretKey & secretKey); - std::optional fullContentAddressOpt() const; + std::optional fullStorePathDescriptorOpt() const; /* Return true iff the path is verifiably content-addressed. */ bool isContentAddressed(const Store & store) const; diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 27de5c28456..aee82599bf0 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -39,7 +39,7 @@ void writeStorePaths(const Store & store, Sink & out, const StorePathSet & paths out << store.printStorePath(i); } -std::set readContentAddressSet(const Store & store, Source & from) +std::set readStorePathDescriptorSet(const Store & store, Source & from) { std::set paths; // TODO @@ -49,7 +49,7 @@ std::set readContentAddressSet(const Store & store, Source return paths; } -void writeContentAddressSet(const Store & store, Sink & out, const std::set & paths) +void writeStorePathDescriptorSet(const Store & store, Sink & out, const std::set & paths) { // TODO //out << paths.size(); @@ -388,7 +388,7 @@ void RemoteStore::querySubstitutablePathInfos(const StorePathSet & paths, const writeStorePaths(*this, conn->to, combine()); } else { writeStorePaths(*this, conn->to, paths); - writeContentAddressSet(*this, conn->to, caPaths); + writeStorePathDescriptorSet(*this, conn->to, caPaths); } conn.processStderr(); size_t count = readNum(conn->from); diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 5f7375abee2..80d336209a6 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -619,7 +619,7 @@ void copyStorePath(ref srcStore, ref dstStore, // recompute store path on the chance dstStore does it differently if (info->ca && info->references.empty()) { auto info2 = make_ref(*info); - info2->path = dstStore->makeFixedOutputPathFromCA(*info->fullContentAddressOpt()); + info2->path = dstStore->makeFixedOutputPathFromCA(*info->fullStorePathDescriptorOpt()); if (dstStore->storeDir == srcStore->storeDir) assert(info->path == info2->path); info = info2; @@ -697,7 +697,7 @@ std::map copyPaths(ref srcStore, ref dstStor auto info = srcStore->queryPathInfo(storePath); auto storePathForDst = storePath; if (info->ca && info->references.empty() && !info->hasSelfReference) { - storePathForDst = dstStore->makeFixedOutputPathFromCA(*info->fullContentAddressOpt()); + storePathForDst = dstStore->makeFixedOutputPathFromCA(*info->fullStorePathDescriptorOpt()); if (dstStore->storeDir == srcStore->storeDir) assert(storePathForDst == storePath); if (storePathForDst != storePath) @@ -725,7 +725,7 @@ std::map copyPaths(ref srcStore, ref dstStor auto storePathForDst = storePath; if (info->ca && info->references.empty() && !info->hasSelfReference) { - storePathForDst = dstStore->makeFixedOutputPathFromCA(*info->fullContentAddressOpt()); + storePathForDst = dstStore->makeFixedOutputPathFromCA(*info->fullStorePathDescriptorOpt()); if (dstStore->storeDir == srcStore->storeDir) assert(storePathForDst == storePath); if (storePathForDst != storePath) @@ -843,7 +843,7 @@ void ValidPathInfo::sign(const Store & store, const SecretKey & secretKey) sigs.insert(secretKey.signDetached(fingerprint(store))); } -std::optional ValidPathInfo::fullContentAddressOpt() const +std::optional ValidPathInfo::fullStorePathDescriptorOpt() const { if (! ca) return std::nullopt; @@ -868,7 +868,7 @@ std::optional ValidPathInfo::fullContentAddressOpt() const bool ValidPathInfo::isContentAddressed(const Store & store) const { - auto fullCaOpt = fullContentAddressOpt(); + auto fullCaOpt = fullStorePathDescriptorOpt(); if (! fullCaOpt) return false; diff --git a/src/libstore/worker-protocol.hh b/src/libstore/worker-protocol.hh index cdb9b9be4e6..f42ce125f2f 100644 --- a/src/libstore/worker-protocol.hh +++ b/src/libstore/worker-protocol.hh @@ -70,9 +70,9 @@ template T readStorePaths(const Store & store, Source & from); void writeStorePaths(const Store & store, Sink & out, const StorePathSet & paths); -std::set readContentAddressSet(const Store & store, Source & from); +std::set readStorePathDescriptorSet(const Store & store, Source & from); -void writeContentAddressSet(const Store & store, Sink & out, const std::set & paths); +void writeStorePathDescriptorSet(const Store & store, Sink & out, const std::set & paths); void writeOutputPathMap(const Store & store, Sink & out, const OutputPathMap & paths);