1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +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

@ -224,6 +224,13 @@ Path computeStorePathForText(const string & name, const string & s,
}
void Store::queryReferences(const Path & path, PathSet & references)
{
ValidPathInfo info = queryPathInfo(path);
references.insert(info.references.begin(), info.references.end());
}
/* Return a string accepted by decodeValidPathInfo() that
registers the specified paths as valid. Note: it's the
responsibility of the caller to provide a closure. */