build-remote: Don't use a SSH master
This is unnecessary because we make only one connection.
This commit is contained in:
parent
d140c75530
commit
d3eb1cf3bb
|
@ -233,7 +233,9 @@ int main (int argc, char * * argv)
|
||||||
lock = -1;
|
lock = -1;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sshStore = openStore("ssh://" + bestMachine->hostName + "?ssh-key=" + bestMachine->sshKey);
|
sshStore = openStore("ssh://" + bestMachine->hostName,
|
||||||
|
{ {"ssh-key", bestMachine->sshKey },
|
||||||
|
{"max-connections", "1" } });
|
||||||
hostName = bestMachine->hostName;
|
hostName = bestMachine->hostName;
|
||||||
} catch (std::exception & e) {
|
} catch (std::exception & e) {
|
||||||
printError("unable to open SSH connection to ‘%s’: %s; trying other available machines...",
|
printError("unable to open SSH connection to ‘%s’: %s; trying other available machines...",
|
||||||
|
|
|
@ -708,7 +708,11 @@ ref<Store> openStore(const std::string & uri_)
|
||||||
}
|
}
|
||||||
uri = uri_.substr(0, q);
|
uri = uri_.substr(0, q);
|
||||||
}
|
}
|
||||||
|
return openStore(uri, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
ref<Store> openStore(const std::string & uri, const Store::Params & params)
|
||||||
|
{
|
||||||
for (auto fun : *RegisterStoreImplementation::implementations) {
|
for (auto fun : *RegisterStoreImplementation::implementations) {
|
||||||
auto store = fun(uri, params);
|
auto store = fun(uri, params);
|
||||||
if (store) return ref<Store>(store);
|
if (store) return ref<Store>(store);
|
||||||
|
|
|
@ -642,6 +642,8 @@ void removeTempRoots();
|
||||||
set to true *unless* you're going to collect garbage. */
|
set to true *unless* you're going to collect garbage. */
|
||||||
ref<Store> openStore(const std::string & uri = getEnv("NIX_REMOTE"));
|
ref<Store> openStore(const std::string & uri = getEnv("NIX_REMOTE"));
|
||||||
|
|
||||||
|
ref<Store> openStore(const std::string & uri, const Store::Params & params);
|
||||||
|
|
||||||
|
|
||||||
void copyPaths(ref<Store> from, ref<Store> to, const Paths & storePaths, bool substitute = false);
|
void copyPaths(ref<Store> from, ref<Store> to, const Paths & storePaths, bool substitute = false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue