summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-10-27 10:17:14 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-10-27 10:17:14 +0100
commita557810ac72effd6841b76772195b10c03dee345 (patch)
tree26a4d7c1684d4c6fea155bfe05aa3b305499e36f /guix
parent4c1918db34e09f0da793c607acc161bdf9ec5535 (diff)
parent2a19c0deb1da3a9afa8960367a5b84321386ceae (diff)
downloadguix-patches-a557810ac72effd6841b76772195b10c03dee345.tar
guix-patches-a557810ac72effd6841b76772195b10c03dee345.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/build.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 3ee0b737fe..9ad7379bbe 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -522,7 +522,20 @@ options handled by 'set-build-options-from-command-line', and listed in
(define (set-build-options-from-command-line store opts)
"Given OPTS, an alist as returned by 'args-fold' given
'%standard-build-options', set the corresponding build options on STORE."
- ;; TODO: Add more options.
+
+ ;; '--keep-failed' has no effect when talking to a remote daemon. Catch the
+ ;; case where GUIX_DAEMON_SOCKET=guix://….
+ (when (and (assoc-ref opts 'keep-failed?)
+ (let* ((socket (store-connection-socket store))
+ (peer (catch 'system-error
+ (lambda ()
+ (and (file-port? socket)
+ (getpeername socket)))
+ (const #f))))
+ (and peer (not (= AF_UNIX (sockaddr:fam peer))))))
+ (warning (G_ "'--keep-failed' ignored since you are \
+talking to a remote daemon\n")))
+
(set-build-options store
#:keep-failed? (assoc-ref opts 'keep-failed?)
#:keep-going? (assoc-ref opts 'keep-going?)