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

In the middle of adding state references to derivations and the db...

This commit is contained in:
Wouter den Breejen 2007-06-18 19:54:31 +00:00
parent 5e59387d40
commit bdecf3bdbc
16 changed files with 190 additions and 191 deletions

View file

@ -179,7 +179,7 @@ std::pair<Path, Hash> computeStorePathForPath(const Path & srcPath,
Path computeStorePathForText(const string & suffix, const string & s,
const PathSet & references)
const PathSet & references, const PathSet & stateReferences)
{
Hash hash = hashString(htSHA256, s);
/* Stuff the references (if any) into the type. This is a bit
@ -190,6 +190,11 @@ Path computeStorePathForText(const string & suffix, const string & s,
type += ":";
type += *i;
}
for (PathSet::const_iterator i = stateReferences.begin(); i != stateReferences.end(); ++i) {
type += ":";
type += *i;
}
return makeStorePath(type, hash, suffix);
}