mirror of
https://github.com/NixOS/nix.git
synced 2025-11-18 08:19:35 +01:00
WIP: store separate hasValidPath bool
This commit is contained in:
parent
1722ae6ece
commit
71e4c9c505
17 changed files with 119 additions and 69 deletions
|
|
@ -326,7 +326,7 @@ void RemoteStore::querySubstitutablePathInfos(const StorePathSet & paths,
|
|||
auto deriver = readString(conn->from);
|
||||
if (deriver != "")
|
||||
info.deriver = parseStorePath(deriver);
|
||||
info.references = readStorePaths<StorePathSet>(*this, conn->from);
|
||||
info.setReferencesPossiblyToSelf(i, readStorePaths<StorePathSet>(*this, conn->from));
|
||||
info.downloadSize = readLongLong(conn->from);
|
||||
info.narSize = readLongLong(conn->from);
|
||||
infos.insert_or_assign(i, std::move(info));
|
||||
|
|
@ -339,11 +339,12 @@ void RemoteStore::querySubstitutablePathInfos(const StorePathSet & paths,
|
|||
conn.processStderr();
|
||||
size_t count = readNum<size_t>(conn->from);
|
||||
for (size_t n = 0; n < count; n++) {
|
||||
SubstitutablePathInfo & info(infos[parseStorePath(readString(conn->from))]);
|
||||
auto path = parseStorePath(readString(conn->from));
|
||||
SubstitutablePathInfo & info { infos[path] };
|
||||
auto deriver = readString(conn->from);
|
||||
if (deriver != "")
|
||||
info.deriver = parseStorePath(deriver);
|
||||
info.references = readStorePaths<StorePathSet>(*this, conn->from);
|
||||
info.setReferencesPossiblyToSelf(path, readStorePaths<StorePathSet>(*this, conn->from));
|
||||
info.downloadSize = readLongLong(conn->from);
|
||||
info.narSize = readLongLong(conn->from);
|
||||
}
|
||||
|
|
@ -376,7 +377,7 @@ void RemoteStore::queryPathInfoUncached(const StorePath & path,
|
|||
auto deriver = readString(conn->from);
|
||||
if (deriver != "") info->deriver = parseStorePath(deriver);
|
||||
info->narHash = Hash(readString(conn->from), htSHA256);
|
||||
info->references = readStorePaths<StorePathSet>(*this, conn->from);
|
||||
info->setReferencesPossiblyToSelf(readStorePaths<StorePathSet>(*this, conn->from));
|
||||
conn->from >> info->registrationTime >> info->narSize;
|
||||
if (GET_PROTOCOL_MINOR(conn->daemonVersion) >= 16) {
|
||||
conn->from >> info->ultimate;
|
||||
|
|
@ -455,7 +456,7 @@ void RemoteStore::addToStore(const ValidPathInfo & info, Source & source,
|
|||
conn.processStderr(0, source2.get());
|
||||
|
||||
auto importedPaths = readStorePaths<StorePathSet>(*this, conn->from);
|
||||
assert(importedPaths.size() <= 1);
|
||||
assert(importedPaths.empty() == 0); // doesn't include possible self reference
|
||||
}
|
||||
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue