1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 04:30:59 +01:00

* Realisation of Derive(...) expressions.

This commit is contained in:
Eelco Dolstra 2003-06-27 14:56:12 +00:00
parent 3da9687854
commit 40b5936691
7 changed files with 193 additions and 165 deletions

View file

@ -127,16 +127,13 @@ string fetchURL(string url)
#endif
void deleteFromStore(Hash hash)
void deleteFromStore(const string & path)
{
string fn;
if (queryDB(nixDB, dbRefs, hash, fn)) {
string prefix = nixStore + "/";
if (string(fn, prefix.size()) != prefix)
throw Error("path " + fn + " is not in the store");
deletePath(fn);
delDB(nixDB, dbRefs, hash);
}
string prefix = nixStore + "/";
if (string(path, 0, prefix.size()) != prefix)
throw Error(format("path %1% is not in the store") % path);
deletePath(path);
// delDB(nixDB, dbRefs, hash);
}