aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-27 22:35:34 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-27 23:56:47 +0100
commit968e84a6cf9941963df0437d9e99adad805e8143 (patch)
tree4dd0f6754652697128850a5d1c35e6b1d4225bb4
parentad0ab74eefcd2f5f3837635a0487280775a0a3a7 (diff)
downloadgnu-guix-968e84a6cf9941963df0437d9e99adad805e8143.tar
gnu-guix-968e84a6cf9941963df0437d9e99adad805e8143.tar.gz
daemon: Clear $NIX_SUBSTITUTERS when passed '--no-substitutes'.
* nix/nix-daemon/guix-daemon.cc (main): When --no-substitutes is used, clear NIX_SUBSTITUTERS. Before that, and after 89faa5c75cb3a419c6d02c51f56955275b7ae351, '--no-substitutes' would lead to attempts to use 'download-using-manifests.pl', which in practice would gracelessly fail.
-rw-r--r--nix/nix-daemon/guix-daemon.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index b083fc2a44..71815169f7 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -296,6 +296,13 @@ main (int argc, char *argv[])
setenv ("NIX_SUBSTITUTERS", subst.c_str (), 1);
}
}
+ else
+ /* Clear the substituter list to make sure nothing ever gets
+ substituted, regardless of the client's settings. */
+ setenv ("NIX_SUBSTITUTERS", "", 1);
+
+ /* Effect the $NIX_SUBSTITUTERS change. */
+ settings.update ();
if (geteuid () == 0 && settings.buildUsersGroup.empty ())
fprintf (stderr, "warning: daemon is running as root, so "