mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
When using a build hook, only copy missing paths
This commit is contained in:
parent
69fe6c58fa
commit
71adb090f0
1 changed files with 6 additions and 9 deletions
|
@ -1240,8 +1240,7 @@ void DerivationGoal::tryToBuild()
|
||||||
build this derivation, so no further checks are necessary. */
|
build this derivation, so no further checks are necessary. */
|
||||||
validPaths = checkPathValidity(true, repair);
|
validPaths = checkPathValidity(true, repair);
|
||||||
if (validPaths.size() == drv.outputs.size()) {
|
if (validPaths.size() == drv.outputs.size()) {
|
||||||
debug(format("skipping build of derivation `%1%', someone beat us to it")
|
debug(format("skipping build of derivation `%1%', someone beat us to it") % drvPath);
|
||||||
% drvPath);
|
|
||||||
outputLocks.setDeletion(true);
|
outputLocks.setDeletion(true);
|
||||||
amDone(ecSuccess);
|
amDone(ecSuccess);
|
||||||
return;
|
return;
|
||||||
|
@ -1525,8 +1524,7 @@ HookReply DerivationGoal::tryBuildHook()
|
||||||
else if (reply != "accept")
|
else if (reply != "accept")
|
||||||
throw Error(format("bad hook reply `%1%'") % reply);
|
throw Error(format("bad hook reply `%1%'") % reply);
|
||||||
|
|
||||||
printMsg(lvlTalkative, format("using hook to build path(s) %1%")
|
printMsg(lvlTalkative, format("using hook to build path(s) %1%") % showPaths(missingPaths));
|
||||||
% showPaths(outputPaths(drv.outputs)));
|
|
||||||
|
|
||||||
hook = worker.hook;
|
hook = worker.hook;
|
||||||
worker.hook.reset();
|
worker.hook.reset();
|
||||||
|
@ -1541,14 +1539,13 @@ HookReply DerivationGoal::tryBuildHook()
|
||||||
computeFSClosure(worker.store, drvPath, allInputs);
|
computeFSClosure(worker.store, drvPath, allInputs);
|
||||||
|
|
||||||
string s;
|
string s;
|
||||||
foreach (PathSet::iterator, i, allInputs) s += *i + " ";
|
foreach (PathSet::iterator, i, allInputs) { s += *i; s += ' '; }
|
||||||
writeLine(hook->toHook.writeSide, s);
|
writeLine(hook->toHook.writeSide, s);
|
||||||
|
|
||||||
/* Tell the hooks the outputs that have to be copied back from the
|
/* Tell the hooks the missing outputs that have to be copied back
|
||||||
remote system. */
|
from the remote system. */
|
||||||
s = "";
|
s = "";
|
||||||
foreach (DerivationOutputs::iterator, i, drv.outputs)
|
foreach (PathSet::iterator, i, missingPaths) { s += *i; s += ' '; }
|
||||||
s += i->second.path + " ";
|
|
||||||
writeLine(hook->toHook.writeSide, s);
|
writeLine(hook->toHook.writeSide, s);
|
||||||
|
|
||||||
hook->toHook.writeSide.close();
|
hook->toHook.writeSide.close();
|
||||||
|
|
Loading…
Reference in a new issue