diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-07 09:25:26 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-07 09:25:26 +0000 |
commit | 5895c160c466c0a97716ffdf5ef654eb1c3c6009 (patch) | |
tree | 8e2756dd75b785f550c00538e4b97570d6a4c1c6 /src/fstate.cc | |
parent | 609a224848dd08cea35a89b03b64274c82f0a2a7 (diff) |
* Make dbRefs a mapping from Hash to [Path].
Diffstat (limited to 'src/fstate.cc')
-rw-r--r-- | src/fstate.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fstate.cc b/src/fstate.cc index 8003a1b38..2e3ffd639 100644 --- a/src/fstate.cc +++ b/src/fstate.cc @@ -167,7 +167,7 @@ struct RStatus static ATerm termFromHash(const Hash & hash) { - string path = queryFromStore(hash); + string path = queryPathByHash(hash); ATerm t = ATreadFromNamedFile(path.c_str()); if (!t) throw Error(format("cannot read aterm %1%") % path); return t; @@ -183,7 +183,7 @@ Hash writeTerm(ATerm t) string path2 = nixStore + "/" + (string) hash + ".nix"; if (rename(path.c_str(), path2.c_str()) == -1) throw SysError(format("renaming %1% to %2%") % path % path2); - setDB(nixDB, dbRefs, hash, path2); + registerPath(path2, hash); return hash; } @@ -259,7 +259,7 @@ static FState realise(RStatus & status, FState fs) } /* Do we know a path with that hash? If so, copy it. */ - string path2 = queryFromStore(hash); + string path2 = queryPathByHash(hash); copyPath(path2, path); return nf; @@ -318,7 +318,7 @@ static FState realise(RStatus & status, FState fs) /* Register targetHash -> targetPath. !!! this should be in values.cc. */ - setDB(nixDB, dbRefs, outHash, outPath); + registerPath(outPath, outHash); /* Register the normal form of fs. */ FState nf = ATmake("Path(<str>, Hash(<str>), <term>)", |