aboutsummaryrefslogtreecommitdiff
path: root/src/store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-15 16:28:54 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-15 16:28:54 +0000
commitf5b6fa5256efce5f7a963386cd16e441446f5746 (patch)
treedd4ada2e432ea1e7bcdeada23583539575b1a342 /src/store.hh
parent8898e86b4fe1ecf8b34a5cca2a7b9b38d395678c (diff)
* Basic work on allowing derive expressions to build multiple paths.
This is not entirely trivial since this introduces the possibility of mutual recursion. * Made normal forms self-contained. * Use unique ids, not content hashes, for content referencing.
Diffstat (limited to 'src/store.hh')
-rw-r--r--src/store.hh19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/store.hh b/src/store.hh
index b6ed43ff6..7dd0f72e6 100644
--- a/src/store.hh
+++ b/src/store.hh
@@ -8,29 +8,28 @@
using namespace std;
+typedef Hash FSId;
+
+
/* Copy a path recursively. */
void copyPath(string src, string dst);
/* Register a substitute. */
-void registerSubstitute(const Hash & srcHash, const Hash & subHash);
+void registerSubstitute(const FSId & srcId, const FSId & subId);
-/* Register a path keyed on its hash. */
-Hash registerPath(const string & path, Hash hash = Hash());
+/* Register a path keyed on its id. */
+void registerPath(const string & path, const FSId & id);
/* Return a path whose contents have the given hash. If target is
not empty, ensure that such a path is realised in target (if
necessary by copying from another location). If prefix is not
- empty, only return a path that is an descendent of prefix.
-
- If no path with the given hash is known to exist in the file
- system,
-*/
-string expandHash(const Hash & hash, const string & target = "",
+ empty, only return a path that is an descendent of prefix. */
+string expandId(const FSId & id, const string & target = "",
const string & prefix = "/");
/* Copy a file to the nixStore directory and register it in dbRefs.
Return the hash code of the value. */
-void addToStore(string srcPath, string & dstPath, Hash & hash,
+void addToStore(string srcPath, string & dstPath, FSId & id,
bool deterministicName = false);
/* Delete a value from the nixStore directory. */