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

Before adding dbValidStatePaths

This commit is contained in:
Wouter den Breejen 2007-06-22 13:03:06 +00:00
parent 0e41b191bf
commit 51fad07fbd
13 changed files with 167 additions and 144 deletions

View file

@ -1194,7 +1194,7 @@ DerivationGoal::HookReply DerivationGoal::tryBuildHook()
*probably* already has it.) */
PathSet allInputs;
allInputs.insert(inputPaths.begin(), inputPaths.end());
computeFSClosure(drvPath, allInputs);
computeFSClosure(drvPath, allInputs, false); //TODO !!!!!!!!!!!!!!!!!!!!!!!!!!! WE (MAY) ALSO NEED TO COPY STATE
string s;
for (PathSet::iterator i = allInputs.begin();
@ -1316,7 +1316,7 @@ bool DerivationGoal::prepareBuild()
for (StringSet::iterator j = i->second.begin();
j != i->second.end(); ++j)
if (inDrv.outputs.find(*j) != inDrv.outputs.end())
computeFSClosure(inDrv.outputs[*j].path, inputPaths);
computeFSClosure(inDrv.outputs[*j].path, inputPaths, false); //TODO !!!!!!!!!!!!!!!!!!!!!!!!!!! WE (MAY) ALSO NEED TO COPY STATE
else
throw BuildError(
format("derivation `%1%' requires non-existent output `%2%' from input derivation `%3%'")
@ -1326,7 +1326,7 @@ bool DerivationGoal::prepareBuild()
/* Second, the input sources. */
for (PathSet::iterator i = drv.inputSrcs.begin();
i != drv.inputSrcs.end(); ++i)
computeFSClosure(*i, inputPaths);
computeFSClosure(*i, inputPaths, false); //TODO !!!!!!!!!!!!!!!!!!!!!!!!!!! WE (MAY) ALSO NEED TO COPY STATE
debug(format("added input paths %1%") % showPaths(inputPaths));
@ -1451,7 +1451,7 @@ void DerivationGoal::startBuilder()
/* Write closure info to `fileName'. */
PathSet refs;
computeFSClosure(storePath, refs);
computeFSClosure(storePath, refs, false); //TODO !!!!!!!!!!!!!!!!!!!!!!!!!!! WE (MAY) ALSO NEED TO COPY STATE
/* !!! in secure Nix, the writing should be done on the
build uid for security (maybe). */
writeStringToFile(tmpDir + "/" + fileName,