1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

Make ValidPathInfo have plain StorePathSet references like before

This change can wait for another PR.
This commit is contained in:
John Ericson 2023-01-14 16:38:43 -05:00
parent 056cc1c1b9
commit b3d91239ae
24 changed files with 109 additions and 166 deletions

View file

@ -180,11 +180,11 @@ ref<const ValidPathInfo> BinaryCacheStore::addToStoreCommon(
duration);
/* Verify that all references are valid. This may do some .narinfo
reads, but typically they'll already be cached. Note that
self-references are always valid. */
for (auto & ref : info.references.others)
reads, but typically they'll already be cached. */
for (auto & ref : info.references)
try {
queryPathInfo(ref);
if (ref != info.path)
queryPathInfo(ref);
} catch (InvalidPath &) {
throw Error("cannot add '%s' to the binary cache because the reference '%s' is not valid",
printStorePath(info.path), printStorePath(ref));