From bb640d6133dea0ede7e80db9ca64a9b2e451317a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 24 Nov 2018 15:59:26 +0100 Subject: daemon: Ignore '--keep-failed' for TCP/IP clients. * nix/nix-daemon/nix-daemon.cc (performOp) : When 'isRemoteConnection' is true, set 'settings.keepFailed' to zero. * doc/guix.texi (Common Build Options): Document this behavior. --- nix/nix-daemon/nix-daemon.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nix/nix-daemon') diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index 2939422172..6ce475a26c 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -565,6 +565,12 @@ static void performOp(bool trusted, unsigned int clientVersion, case wopSetOptions: { settings.keepFailed = readInt(from) != 0; + if (isRemoteConnection) + /* When the client is remote, don't keep the failed build tree as + it is presumably inaccessible to the client and could fill up + our disk. */ + settings.keepFailed = 0; + settings.keepGoing = readInt(from) != 0; settings.set("build-fallback", readInt(from) ? "true" : "false"); verbosity = (Verbosity) readInt(from); -- cgit v1.2.3