1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-25 03:39:36 +01:00

* Outline of the new scheme for derivate distribution.

This commit is contained in:
Eelco Dolstra 2003-07-09 16:12:40 +00:00
parent 2b95a9dc05
commit 6011bd0da2
4 changed files with 35 additions and 4 deletions

View file

@ -158,6 +158,9 @@ static string queryPathByHashPrefix(Hash hash, const string & prefix)
}
string expandHash(const Hash & hash, const string & outPath = "")
{
string queryPathByHash(Hash hash)
{
return queryPathByHashPrefix(hash, "/");
@ -187,8 +190,8 @@ void addToStore(string srcPath, string & dstPath, Hash & hash)
void deleteFromStore(const string & path)
{
string prefix = nixStore + "/";
if (string(path, 0, prefix.size()) != prefix)
string prefix = + "/";
if (!isInPrefix(path, nixStore))
throw Error(format("path %1% is not in the store") % path);
unregisterPath(path);