diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-02-07T13·40+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-02-07T13·40+0000 |
commit | 450c358e2055488897349bf50951cce16ad9bc90 (patch) | |
tree | f669cc7b444fc753b8964b8de68d9571a83cc08b /src/libstore/store.hh | |
parent | a37338815de6affd44f927712143f626c8e6d79d (diff) |
* Maintain a database table (`derivers') that maps output paths to the
derivation that produced them. * `nix-store -qd PATH' prints out the derivation that produced a path.
Diffstat (limited to 'src/libstore/store.hh')
-rw-r--r-- | src/libstore/store.hh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/libstore/store.hh b/src/libstore/store.hh index 3a0b7a7131a2..95c738ed1bcc 100644 --- a/src/libstore/store.hh +++ b/src/libstore/store.hh @@ -57,7 +57,8 @@ void clearSubstitutes(); of the file system contents of the path. The hash must be a SHA-256 hash. */ void registerValidPath(const Transaction & txn, - const Path & path, const Hash & hash, const PathSet & references); + const Path & path, const Hash & hash, const PathSet & references, + const Path & deriver); /* Throw an exception if `path' is not directly in the Nix store. */ void assertStorePath(const Path & path); @@ -77,7 +78,8 @@ void canonicalisePathMetaData(const Path & path); /* Checks whether a path is valid. */ bool isValidPath(const Path & path); -/* Sets the set of outgoing FS references for a store path. */ +/* Sets the set of outgoing FS references for a store path. Use with + care! */ void setReferences(const Transaction & txn, const Path & storePath, const PathSet & references); @@ -89,6 +91,14 @@ void queryReferences(const Path & storePath, PathSet & references); result is not cleared. */ void queryReferers(const Path & storePath, PathSet & referers); +/* Sets the deriver of a store path. Use with care! */ +void setDeriver(const Transaction & txn, const Path & storePath, + const Path & deriver); + +/* Query the deriver of a store path. Return the empty string if no + deriver has been set. */ +Path queryDeriver(const Transaction & txn, const Path & storePath); + /* Constructs a unique store path name. */ Path makeStorePath(const string & type, const Hash & hash, const string & suffix); |