diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-07-16 09:37:33 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-07-22 09:59:51 +0200 |
commit | e9848beca704d27a13e28b4403251725bd485bb2 (patch) | |
tree | 560b21607427e1a4c8af5a06f5391f7dfb7bf15d /src/libcmd | |
parent | 2ff3035cf4d5167d180878d69cb47b31890a24c4 (diff) |
nix-build: Copy drv closure between eval store and build store
Diffstat (limited to 'src/libcmd')
-rw-r--r-- | src/libcmd/installables.cc | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index ca4d509c2..124df34ea 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -12,7 +12,6 @@ #include "eval-cache.hh" #include "url.hh" #include "registry.hh" -#include "remote-store.hh" #include <regex> #include <queue> @@ -393,31 +392,7 @@ DerivedPaths InstallableValue::toDerivedPaths() for (auto & i : drvsToOutputs) res.push_back(DerivedPath::Built { i.first, i.second }); - // FIXME: Temporary hack - if (state->store != state->buildStore) { - RealisedPath::Set closure; - RealisedPath::closure(*state->store, drvsToCopy, closure); - - if (dynamic_cast<RemoteStore *>(&*state->buildStore)) { - StorePathSet closure2; - for (auto & p : closure) - closure2.insert(p.path()); - - auto valid = state->buildStore->queryValidPaths(closure2); - StorePathSet missing; - for (auto & p : closure2) - if (!valid.count(p)) missing.insert(p); - - if (!missing.empty()) { - auto source = sinkToSource([&](Sink & sink) { - state->store->exportPaths(missing, sink); - }); - state->buildStore->importPaths(*source, NoCheckSigs); - } - - } else - copyPaths(state->store, state->buildStore, closure); - } + copyClosure(state->store, state->buildStore, drvsToCopy); return res; } |