diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-26 13:40:08 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-26 13:41:03 +0100 |
commit | dcaea042fc895667bf6f529471ff9f449629774c (patch) | |
tree | 2d2d4a897d138f1095f9a9fa06ddbd7ad6979b8e /src | |
parent | df5de9dfd72f9dc3d57157d0496443732a517491 (diff) | |
download | guix-dcaea042fc895667bf6f529471ff9f449629774c.tar.gz |
Only start download-via-ssh if it's enabled
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/globals.cc | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index f9007775a1..ccf8d4cc5e 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -71,18 +71,6 @@ void Settings::processEnvironment() nixLibexecDir = canonPath(getEnv("NIX_LIBEXEC_DIR", NIX_LIBEXEC_DIR)); nixBinDir = canonPath(getEnv("NIX_BIN_DIR", NIX_BIN_DIR)); nixDaemonSocketFile = canonPath(nixStateDir + DEFAULT_SOCKET_PATH); - - string subs = getEnv("NIX_SUBSTITUTERS", "default"); - if (subs == "default") { -#if 0 - if (getEnv("NIX_OTHER_STORES") != "") - substituters.push_back(nixLibexecDir + "/nix/substituters/copy-from-other-stores.pl"); -#endif - substituters.push_back(nixLibexecDir + "/nix/substituters/download-using-manifests.pl"); - substituters.push_back(nixLibexecDir + "/nix/substituters/download-from-binary-cache.pl"); - substituters.push_back(nixLibexecDir + "/nix/substituters/download-via-ssh"); - } else - substituters = tokenizeString<Strings>(subs, ":"); } @@ -155,6 +143,20 @@ void Settings::update() get(envKeepDerivations, "env-keep-derivations"); get(sshSubstituterHosts, "ssh-substituter-hosts"); get(useSshSubstituter, "use-ssh-substituter"); + + string subs = getEnv("NIX_SUBSTITUTERS", "default"); + if (subs == "default") { + substituters.clear(); +#if 0 + if (getEnv("NIX_OTHER_STORES") != "") + substituters.push_back(nixLibexecDir + "/nix/substituters/copy-from-other-stores.pl"); +#endif + substituters.push_back(nixLibexecDir + "/nix/substituters/download-using-manifests.pl"); + substituters.push_back(nixLibexecDir + "/nix/substituters/download-from-binary-cache.pl"); + if (useSshSubstituter) + substituters.push_back(nixLibexecDir + "/nix/substituters/download-via-ssh"); + } else + substituters = tokenizeString<Strings>(subs, ":"); } |