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-19T11·16+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-19T11·16+0000
commit863dcff6c5ffc163010ec1f9e6819bb9aaaadc29 (patch)
tree4747222c7f8c471e6cbfa07c49023853d2f6b957 /src/libstore/store.hh
parente9762e2d10c4a837e3d75d53e3a24452f07f47ec (diff)
* Started removing closure store expressions, i.e., the explicit
  representation of closures as ATerms in the Nix store.  Instead, the
  file system pointer graph is now stored in the Nix database.  This
  has many advantages:

  - It greatly simplifies the implementation (we can drop the notion
    of `successors', and so on).

  - It makes registering roots for the garbage collector much easier.
    Instead of specifying the closure expression as a root, you can
    simply specify the store path that must be retained as a root.
    This could not be done previously, since there was no way to find
    the closure store expression containing a given store path.
    
  - Better traceability: it is now possible to query what paths are
    referenced by a path, and what paths refer to a path.

Diffstat (limited to 'src/libstore/store.hh')
-rw-r--r--src/libstore/store.hh29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/libstore/store.hh b/src/libstore/store.hh
index c27918cbb4f9..65c3baf98af6 100644
--- a/src/libstore/store.hh
+++ b/src/libstore/store.hh
@@ -40,27 +40,6 @@ void createStoreTransaction(Transaction & txn);
 /* Copy a path recursively. */
 void copyPath(const Path & src, const Path & dst);
 
-/* Register a successor.  This function accepts a transaction handle
-   so that it can be enclosed in an atomic operation with calls to
-   registerValidPath().  This must be atomic, since if we register a
-   successor for a derivation without registering the paths built in
-   the derivation, we have a successor with dangling pointers, and if
-   we do it in reverse order, we can get an obstructed build (since to
-   rebuild the successor, the outputs paths must not exist). */
-void registerSuccessor(const Transaction & txn,
-    const Path & srcPath, const Path & sucPath);
-
-/* Remove a successor mapping. */
-void unregisterSuccessor(const Path & srcPath);
-
-/* Return the predecessors of the Nix expression stored at the given
-   path. */
-bool querySuccessor(const Path & srcPath, Path & sucPath);
-
-/* Return the predecessors of the Nix expression stored at the given
-   path. */
-Paths queryPredecessors(const Path & sucPath);
-
 /* Register a substitute. */
 typedef list<pair<Path, Substitute> > SubstitutePairs;
 void registerSubstitutes(const Transaction & txn,
@@ -81,6 +60,14 @@ void assertStorePath(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. */
+void setReferences(const Transaction & txn, const Path & storePath,
+    const PathSet & references);
+
+/* Queries the set of outgoing FS references for a store path.  The
+   result is not cleared. */
+void queryReferences(const Path & storePath, PathSet & references);
+
 /* Constructs a unique store path name. */
 Path makeStorePath(const string & type,
     const Hash & hash, const string & suffix);