diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-05-01 15:00:39 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-05-01 17:30:16 +0200 |
commit | ca9f589a93309ca548d772f1634169007568d6a0 (patch) | |
tree | a6f38ee0777f6de398c2677bd8f1ca9f08b53131 /src/libstore/build.cc | |
parent | b986c7f8b14c1270e012f22183737ebbaa33173d (diff) |
build-remote: Don't copy the .drv closure
Since build-remote uses buildDerivation() now, we don't need to copy
the .drv file anymore. This greatly reduces the set of input paths
copied to the remote side (e.g. from 392 to 51 store paths for GNU
hello on x86_64-darwin).
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 8b869063d..a0efd8804 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1622,23 +1622,12 @@ HookReply DerivationGoal::tryBuildHook() hook = std::move(worker.hook); /* Tell the hook all the inputs that have to be copied to the - remote system. This unfortunately has to contain the entire - derivation closure to ensure that the validity invariant holds - on the remote system. (I.e., it's unfortunate that we have to - list it since the remote system *probably* already has it.) */ - PathSet allInputs; - allInputs.insert(inputPaths.begin(), inputPaths.end()); - worker.store.computeFSClosure(drvPath, allInputs); - - string s; - for (auto & i : allInputs) { s += i; s += ' '; } - writeLine(hook->toHook.writeSide.get(), s); + remote system. */ + writeLine(hook->toHook.writeSide.get(), concatStringsSep(" ", inputPaths)); /* Tell the hooks the missing outputs that have to be copied back from the remote system. */ - s = ""; - for (auto & i : missingPaths) { s += i; s += ' '; } - writeLine(hook->toHook.writeSide.get(), s); + writeLine(hook->toHook.writeSide.get(), concatStringsSep(" ", missingPaths)); hook->toHook.writeSide = -1; |