aboutsummaryrefslogtreecommitdiff
path: root/src/build-remote
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-01-22 17:56:28 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-01-22 17:56:28 +0000
commit141cb9a706f73725fd4f8d62569f45bbbf9b6c3b (patch)
tree22f9f83cb6733da4b02348a6a783f51eb62a77ba /src/build-remote
parent5738b08233022b8cb74b1550ac0fe9d620ff52cd (diff)
Make regular `copyPaths` only copy again
The is new function parameter so just the build hook can opt into the remote-side building.
Diffstat (limited to 'src/build-remote')
-rw-r--r--src/build-remote/build-remote.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index 402754c3c..ef943ee11 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -270,9 +270,11 @@ connected:
auto substitute = settings.buildersUseSubstitutes ? Substitute : NoSubstitute;
+ auto copyStorePathImpl = sshStore2->isTrusting ? copyStorePathAdapter : copyOrBuildStorePath;
+
{
Activity act(*logger, lvlTalkative, actUnknown, fmt("copying dependencies to '%s'", storeUri));
- copyPaths(store, sshStore2, store->parseStorePathSet(inputs), NoRepair, NoCheckSigs, substitute);
+ copyPaths(store, sshStore2, store->parseStorePathSet(inputs), NoRepair, NoCheckSigs, substitute, copyStorePathImpl);
}
uploadLock = -1;
@@ -285,7 +287,7 @@ connected:
if (!result.success())
throw Error("build of '%s' on '%s' failed: %s", store->printStorePath(*drvPath), storeUri, result.errorMsg);
} else {
- copyPaths(store, sshStore2, {*drvPath}, NoRepair, NoCheckSigs, substitute);
+ copyPaths(store, sshStore2, {*drvPath}, NoRepair, NoCheckSigs, substitute, copyStorePathImpl);
sshStore2->buildPaths({{*drvPath}});
}
@@ -298,6 +300,7 @@ connected:
Activity act(*logger, lvlTalkative, actUnknown, fmt("copying outputs from '%s'", storeUri));
for (auto & i : missing)
store->locksHeld.insert(store->printStorePath(i)); /* FIXME: ugly */
+ /* No `copyStorePathImpl` because we always trust ourselves. */
copyPaths(sshStore2, store, missing, NoRepair, NoCheckSigs, NoSubstitute);
}