1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 23:51:47 +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

@ -17,19 +17,20 @@ class Store;
struct SubstitutablePathInfo
{
std::optional<StorePath> deriver;
StoreReferences references;
StorePathSet references;
uint64_t downloadSize; /* 0 = unknown or inapplicable */
uint64_t narSize; /* 0 = unknown */
};
typedef std::map<StorePath, SubstitutablePathInfo> SubstitutablePathInfos;
struct ValidPathInfo
{
StorePath path;
std::optional<StorePath> deriver;
Hash narHash;
StoreReferences references;
StorePathSet references;
time_t registrationTime = 0;
uint64_t narSize = 0; // 0 = unknown
uint64_t id; // internal use only
@ -81,12 +82,6 @@ struct ValidPathInfo
/* Return true iff the path is verifiably content-addressed. */
bool isContentAddressed(const Store & store) const;
/* Functions to view references + hasSelfReference as one set, mainly for
compatibility's sake. */
StorePathSet referencesPossiblyToSelf() const;
void insertReferencePossiblyToSelf(StorePath && ref);
void setReferencesPossiblyToSelf(StorePathSet && refs);
static const size_t maxSigs = std::numeric_limits<size_t>::max();
/* Return the number of signatures on this .narinfo that were