Merge pull request #4342 from tweag/fix-remote-build-hook

fix remote build hook
This commit is contained in:
Eelco Dolstra
2020-12-09 12:40:00 +01:00
committed by GitHub
3 changed files with 35 additions and 4 deletions
+4 -4
View File
@@ -899,10 +899,8 @@ void DerivationGoal::buildDone()
Logger::Fields{worker.store.printStorePath(drvPath)});
PushActivity pact(act.id);
StorePathSet outputPaths;
for (auto& [_, maybeOutPath] :
worker.store.queryPartialDerivationOutputMap(drvPath)) {
if (maybeOutPath)
outputPaths.insert(*maybeOutPath);
for (auto i : drv->outputs) {
outputPaths.insert(finalOutputs.at(i.first));
}
std::map<std::string, std::string> hookEnvironment = getEnv();
@@ -2874,6 +2872,8 @@ void DerivationGoal::registerOutputs()
for (auto & i : drv->outputsAndOptPaths(worker.store)) {
if (!i.second.second || !worker.store.isValidPath(*i.second.second))
allValid = false;
else
finalOutputs.insert_or_assign(i.first, *i.second.second);
}
if (allValid) return;
}