1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

Expose the export magic value and move LocalStore::queryReferences to Store

This commit is contained in:
Eelco Dolstra 2016-02-15 14:48:38 +01:00
parent e03d6e0998
commit c8f4d89a34
4 changed files with 19 additions and 22 deletions

View file

@ -12,6 +12,13 @@
namespace nix {
/* Size of the hash part of store paths, in base-32 characters. */
const size_t storePathHashLen = 32; // i.e. 160 bits
/* Magic header of exportPath() output. */
const uint32_t exportMagic = 0x4558494e;
typedef std::map<Path, Path> Roots;
@ -156,10 +163,9 @@ public:
/* Query the hash of a valid path. */
virtual Hash queryPathHash(const Path & path) = 0;
/* Query the set of outgoing FS references for a store path. The
/* Query the set of outgoing FS references for a store path. The
result is not cleared. */
virtual void queryReferences(const Path & path,
PathSet & references) = 0;
virtual void queryReferences(const Path & path, PathSet & references);
/* Queries the set of incoming FS references for a store path.
The result is not cleared. */
@ -339,9 +345,6 @@ public:
};
const size_t storePathHashLen = 32; // base-32 characters, i.e. 160 bits
/* !!! These should be part of the store API, I guess. */
/* Throw an exception if `path' is not directly in the Nix store. */