guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: daemon: Ignore '--keep-failed' for TCP/IP clients.


From: guix-commits
Subject: 01/05: daemon: Ignore '--keep-failed' for TCP/IP clients.
Date: Sat, 24 Nov 2018 17:25:43 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit bb640d6133dea0ede7e80db9ca64a9b2e451317a
Author: Ludovic Courtès <address@hidden>
Date:   Sat Nov 24 15:59:26 2018 +0100

    daemon: Ignore '--keep-failed' for TCP/IP clients.
    
    * nix/nix-daemon/nix-daemon.cc (performOp) <wopSetOptions>: When
    'isRemoteConnection' is true, set 'settings.keepFailed' to zero.
    * doc/guix.texi (Common Build Options): Document this behavior.
---
 doc/guix.texi                | 4 ++++
 nix/nix-daemon/nix-daemon.cc | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index e783c16..a2af1e9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6229,6 +6229,10 @@ the end of the build log.  This is useful when debugging 
build issues.
 @xref{Debugging Build Failures}, for tips and tricks on how to debug
 build issues.
 
+This option has no effect when connecting to a remote daemon with a
address@hidden://} URI (@pxref{The Store, the @code{GUIX_DAEMON_SOCKET}
+variable}).
+
 @item --keep-going
 @itemx -k
 Keep going when some of the derivations fail to build; return only once
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc
index 2939422..6ce475a 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]