[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: guix build: Add '--keep-going'.
From: |
Ludovic Courtès |
Subject: |
02/04: guix build: Add '--keep-going'. |
Date: |
Tue, 19 Jan 2016 22:47:48 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit f495301902a398f1d7ec4ceb7b9fc262240d8c8d
Author: Ludovic Courtès <address@hidden>
Date: Tue Jan 19 21:57:40 2016 +0100
guix build: Add '--keep-going'.
* guix/scripts/build.scm (show-build-options-help)
(%standard-build-options): Add --keep-going.
* guix/scripts/build.scm (set-build-options-from-command-line): Honor
it.
* doc/guix.texi (Invoking guix build): Document it.
---
doc/guix.texi | 8 ++++++++
guix/scripts/build.scm | 10 +++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 592ec3c..a3d751a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3973,6 +3973,14 @@ Keep the build tree of failed builds. Thus, if a build
fail, its build
tree is kept under @file{/tmp}, in a directory whose name is shown at
the end of the build log. This is useful when debugging build issues.
address@hidden --keep-going
address@hidden -k
+Keep going when some of the derivations fail to build; return only once
+all the builds have either completed or failed.
+
+The default behavior is to stop as soon as one of the specified
+derivations has failed.
+
@item --dry-run
@itemx -n
Do not build the derivations.
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 9193ad3..7ca2c6e 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
;;; Copyright © 2013 Mark H Weaver <address@hidden>
;;;
;;; This file is part of GNU Guix.
@@ -153,6 +153,8 @@ options handled by 'set-build-options-from-command-line',
and listed in
(display (_ "
-K, --keep-failed keep build tree of failed builds"))
(display (_ "
+ -k, --keep-going keep going when some of the derivations fail"))
+ (display (_ "
-n, --dry-run do not build the derivations"))
(display (_ "
--fallback fall back to building when the substituter fails"))
@@ -183,6 +185,7 @@ options handled by 'set-build-options-from-command-line',
and listed in
;; TODO: Add more options.
(set-build-options store
#:keep-failed? (assoc-ref opts 'keep-failed?)
+ #:keep-going? (assoc-ref opts 'keep-going?)
#:rounds (assoc-ref opts 'rounds)
#:build-cores (or (assoc-ref opts 'cores) 0)
#:max-build-jobs (or (assoc-ref opts 'max-jobs) 1)
@@ -214,6 +217,11 @@ options handled by 'set-build-options-from-command-line',
and listed in
(apply values
(alist-cons 'keep-failed? #t result)
rest)))
+ (option '(#\k "keep-going") #f #f
+ (lambda (opt name arg result . rest)
+ (apply values
+ (alist-cons 'keep-going? #t result)
+ rest)))
(option '("rounds") #t #f
(lambda (opt name arg result . rest)
(apply values