1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 12:10:59 +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

@ -760,6 +760,7 @@ static Expr prim_toFile(EvalState & state, const ATermVector & args)
string contents = evalString(state, args[1], context);
PathSet refs;
PathSet stateRefs; //TODO TODO TODO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
for (PathSet::iterator i = context.begin(); i != context.end(); ++i) {
if (isDerivation(*i))
@ -768,8 +769,8 @@ static Expr prim_toFile(EvalState & state, const ATermVector & args)
}
Path storePath = readOnlyMode
? computeStorePathForText(name, contents, refs)
: store->addTextToStore(name, contents, refs);
? computeStorePathForText(name, contents, refs, stateRefs)
: store->addTextToStore(name, contents, refs, stateRefs);
/* Note: we don't need to add `context' to the context of the
result, since `storePath' itself has references to the paths