From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 27664@debbugs.gnu.org
Cc: Mathieu Othacehe <mathieu.othacehe@parrot.com>
Subject: [bug#27664] [PATCH] cuirass: Add fallback parameter.
Date: Wed, 12 Jul 2017 10:24:46 +0200 [thread overview]
Message-ID: <20170712082446.24427-1-m.othacehe@gmail.com> (raw)
From: Mathieu Othacehe <mathieu.othacehe@parrot.com>
* src/cuirass/base.scm (%fallback?): New exported parameter.
(process-specs)[set-build-options]: Pass fallback parameter.
* bin/cuirass.in (%options): Add fallback.
(main): Set %fallback? parameter.
(show-help): Update.
---
bin/cuirass.in | 5 ++++-
src/cuirass/base.scm | 8 +++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/bin/cuirass.in b/bin/cuirass.in
index 61b9dd8..18edf1e 100644
--- a/bin/cuirass.in
+++ b/bin/cuirass.in
@@ -35,6 +35,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
--one-shot Evaluate and build jobs only once
--cache-directory=DIR Use DIR for storing repository data
+ --fallback Fall back to building when the substituter fails.
-L --load-path=DIR Prepend DIR to Guix package module search path.
-S --specifications=SPECFILE
Add specifications from SPECFILE to database.
@@ -56,6 +57,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(port (single-char #\p) (value #t))
(interval (single-char #\I) (value #t))
(use-substitutes (value #f))
+ (fallback (value #f))
(version (single-char #\V) (value #f))
(help (single-char #\h) (value #f))))
@@ -73,7 +75,8 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(option-ref opts 'cache-directory (%package-cachedir)))
(%guix-package-path
(option-ref opts 'load-path (%guix-package-path)))
- (%use-substitutes? (option-ref opts 'use-substitutes #f)))
+ (%use-substitutes? (option-ref opts 'use-substitutes #f))
+ (%fallback? (option-ref opts 'fallback #f)))
(cond
((option-ref opts 'help #f)
(show-help)
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index d0e77d9..b84cab7 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -43,7 +43,8 @@
;; Parameters.
%guix-package-path
%package-cachedir
- %use-substitutes?))
+ %use-substitutes?
+ %fallback?))
(cond-expand
(guile-2.2
@@ -56,6 +57,10 @@
;; Define whether to use substitutes
(make-parameter #f))
+(define %fallback?
+ ;; Define whether to fall back to building when the substituter fails.
+ (make-parameter #f))
+
(define %package-cachedir
;; Define to location of cache directory of this package.
(make-parameter (or (getenv "CUIRASS_CACHEDIR")
@@ -210,6 +215,7 @@ directory and the sha1 of the top level commit in this directory."
;; failure.
(set-build-options store
#:use-substitutes? (%use-substitutes?)
+ #:fallback? (%fallback?)
#:keep-going? #t)
(let* ((spec* (acons #:current-commit commit spec))
--
2.13.1
next reply other threads:[~2017-07-12 8:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 8:24 Mathieu Othacehe [this message]
2017-07-12 8:39 ` [bug#27664] [PATCH] cuirass: Add fallback parameter Danny Milosavljevic
2017-07-12 12:26 ` Ludovic Courtès
2017-07-12 17:05 ` bug#27664: " Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170712082446.24427-1-m.othacehe@gmail.com \
--to=m.othacehe@gmail.com \
--cc=27664@debbugs.gnu.org \
--cc=mathieu.othacehe@parrot.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.