From 968e84a6cf9941963df0437d9e99adad805e8143 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 27 Mar 2014 22:35:34 +0100 Subject: 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. --- nix/nix-daemon/guix-daemon.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nix') 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 " -- cgit v1.2.3