about summary refs log tree commit diff
path: root/src/libstore/store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-25T21·28+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-25T21·28+0000
commita24b78e9f1a7326badb6c38d5d63aeb6ccdf9970 (patch)
treef1d9a3fde9ab4f70e78152263d69afc29da6e393 /src/libstore/store.hh
parent2a2756b85643de6355b7b9e3cc47574e7df82303 (diff)
* Maintain the references/referers relation also for derivations.
  This simplifies garbage collection and `nix-store --query
  --requisites' since we no longer need to treat derivations
  specially.

* Better maintaining of the invariants, e.g., setReferences() can only
  be called on a valid/substitutable path.

Diffstat (limited to 'src/libstore/store.hh')
-rw-r--r--src/libstore/store.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstore/store.hh b/src/libstore/store.hh
index 20f50cbfb1c5..968786305e4c 100644
--- a/src/libstore/store.hh
+++ b/src/libstore/store.hh
@@ -57,7 +57,7 @@ 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 Path & path, const Hash & hash, const PathSet & references);
 
 /* Throw an exception if `path' is not directly in the Nix store. */
 void assertStorePath(const Path & path);
@@ -97,7 +97,8 @@ Path addToStore(const Path & srcPath);
 
 /* Like addToStore, but the contents written to the output path is a
    regular file containing the given string. */
-Path addTextToStore(const string & suffix, const string & s);
+Path addTextToStore(const string & suffix, const string & s,
+    const PathSet & references);
 
 /* Delete a value from the nixStore directory. */
 void deleteFromStore(const Path & path);