From 405c52b589e735c01d299aef5ac78cf5ddd53a99 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 27 Aug 2020 17:46:36 +0200 Subject: [PATCH] Fix build --- src/hydra-eval-jobs/hydra-eval-jobs.cc | 2 +- src/hydra-queue-runner/build-remote.cc | 18 +++++++++++------- src/hydra-queue-runner/queue-monitor.cc | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/hydra-eval-jobs/hydra-eval-jobs.cc b/src/hydra-eval-jobs/hydra-eval-jobs.cc index cf7d98b7..81012b56 100644 --- a/src/hydra-eval-jobs/hydra-eval-jobs.cc +++ b/src/hydra-eval-jobs/hydra-eval-jobs.cc @@ -473,7 +473,7 @@ int main(int argc, char * * argv) auto outPath = store->makeOutputPath("out", h, drvName); drv.env["out"] = store->printStorePath(outPath); drv.outputs.insert_or_assign("out", DerivationOutput { .output = DerivationOutputInputAddressed { .path = outPath } }); - auto newDrvPath = store->printStorePath(writeDerivation(store, drv, drvName)); + auto newDrvPath = store->printStorePath(writeDerivation(*store, drv)); debug("rewrote aggregate derivation %s -> %s", store->printStorePath(drvPath), newDrvPath); diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 1d12331e..152bdd13 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -445,16 +445,20 @@ void State::buildRemote(ref destStore, while (true) { auto storePathS = readString(from); if (storePathS == "") break; - ValidPathInfo info(localStore->parseStorePath(storePathS)); - assert(outputs.count(info.path)); readString(from); // deriver - info.references = readStorePaths(*localStore, from); + auto references = readStorePaths(*localStore, from); readLongLong(from); // download size - info.narSize = readLongLong(from); - totalNarSize += info.narSize; - info.narHash = Hash::parseAny(readString(from), htSHA256); - info.ca = parseContentAddressOpt(readString(from)); + auto narSize = readLongLong(from); + auto narHash = Hash::parseAny(readString(from), htSHA256); + auto ca = parseContentAddressOpt(readString(from)); readStrings(from); // sigs + ValidPathInfo info(localStore->parseStorePath(storePathS), narHash); + assert(outputs.count(info.path)); + info.references = references; + info.narSize = narSize; + totalNarSize += info.narSize; + info.narHash = narHash; + info.ca = ca; infos.insert_or_assign(info.path, info); } diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc index ddb85f0a..257f2f0d 100644 --- a/src/hydra-queue-runner/queue-monitor.cc +++ b/src/hydra-queue-runner/queue-monitor.cc @@ -430,7 +430,7 @@ Step::ptr State::createStep(ref destStore, step->drv = std::make_unique(localStore->readDerivation(drvPath)); step->parsedDrv = std::make_unique(drvPath, *step->drv); - step->preferLocalBuild = step->parsedDrv->willBuildLocally(); + step->preferLocalBuild = step->parsedDrv->willBuildLocally(*localStore); step->isDeterministic = get(step->drv->env, "isDetermistic").value_or("0") == "1"; step->systemType = step->drv->platform;