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-14T13·51+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-14T13·51+0000
commit9530cc31700f68fd229eee69eabd2baa099f404a (patch)
tree5cc317adeb0c8098d8a9197a0bcbcb29ee4d941d /src/libstore/store.hh
parenta7b94e87d7d28f763a708876cba46c8f2484b526 (diff)
* Start move towards SHA-256 hashes instead of MD5.
* Start cleaning up unique store path generation (they weren't always
  unique; in particular the suffix ("-aterm-2.2", "-builder.sh") was
  not part of the hash, therefore changes to the suffix would cause
  multiple store objects with the same hash).

Diffstat (limited to 'src/libstore/store.hh')
-rw-r--r--src/libstore/store.hh11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libstore/store.hh b/src/libstore/store.hh
index 6a989874bc3b..25a6bc8b9669 100644
--- a/src/libstore/store.hh
+++ b/src/libstore/store.hh
@@ -81,14 +81,17 @@ void assertStorePath(const Path & path);
 /* Checks whether a path is valid. */ 
 bool isValidPath(const Path & path);
 
+/* Constructs a unique store path name. */
+Path makeStorePath(const string & type,
+    Hash & hash, const string & suffix);
+    
 /* Copy the contents of a path to the store and register the validity
    the resulting path.  The resulting path is returned. */
 Path addToStore(const Path & srcPath);
 
-/* Like addToStore, but the path of the output is given, and the
-   contents written to the output path is a regular file containing
-   the given string. */
-void addTextToStore(const Path & dstPath, const string & s);
+/* 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);
 
 /* Delete a value from the nixStore directory. */
 void deleteFromStore(const Path & path);