diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-26T12·40+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-26T12·41+0100 |
commit | dcaea042fc895667bf6f529471ff9f449629774c (patch) | |
tree | 2d2d4a897d138f1095f9a9fa06ddbd7ad6979b8e /src/libstore/globals.cc | |
parent | df5de9dfd72f9dc3d57157d0496443732a517491 (diff) |
Only start download-via-ssh if it's enabled
Diffstat (limited to 'src/libstore/globals.cc')
-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 f9007775a12e..ccf8d4cc5e65 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, ":"); } |