[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27284: [PATCH 7/8] gexp: 'directory-union' has a #:quiet? parameter.
From: |
Ludovic Courtès |
Subject: |
bug#27284: [PATCH 7/8] gexp: 'directory-union' has a #:quiet? parameter. |
Date: |
Fri, 20 Oct 2017 18:05:56 +0200 |
* guix/gexp.scm (directory-union): Add #:quiet? and honor it.
---
guix/gexp.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/guix/gexp.scm b/guix/gexp.scm
index e8ac3dcdc..3781a1e6e 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -1205,7 +1205,7 @@ This yields an 'etc' directory containing these two
files."
files))))))
(define* (directory-union name things
- #:key (copy? #f))
+ #:key (copy? #f) (quiet? #f))
"Return a directory that is the union of THINGS, where THINGS is a list of
file-like objects denoting directories. For example:
@@ -1213,7 +1213,8 @@ file-like objects denoting directories. For example:
yields a directory that is the union of the 'guile' and 'emacs' packages.
-When COPY? is true, copy files instead of creating symlinks."
+When HARD-LINKS? is true, create hard links instead of symlinks. When QUIET?
+is true, the derivation will not print anything."
(define symlink
(if copy?
(gexp (lambda (old new)
@@ -1222,6 +1223,11 @@ When COPY? is true, copy files instead of creating
symlinks."
(copy-file old new))))
(gexp symlink)))
+ (define log-port
+ (if quiet?
+ (gexp (%make-void-port "w"))
+ (gexp (current-error-port))))
+
(match things
((one)
;; Only one thing; return it.
@@ -1234,6 +1240,7 @@ When COPY? is true, copy files instead of creating
symlinks."
(union-build (ungexp output)
'(ungexp things)
+ #:log-port (ungexp log-port)
#:symlink (ungexp symlink)))))))))
--
2.14.2
- bug#27284: [PATCH 0/8] 'guix pull' creates several derivations, Ludovic Courtès, 2017/10/20
- bug#27284: [PATCH 3/8] discovery: Move 'file-name->module-name' to (guix modules)., Ludovic Courtès, 2017/10/20
- bug#27284: [PATCH 2/8] build: Honor make's '-j' flag., Ludovic Courtès, 2017/10/20
- bug#27284: [PATCH 4/8] gexp: Add 'file-union'., Ludovic Courtès, 2017/10/20
- bug#27284: [PATCH 7/8] gexp: 'directory-union' has a #:quiet? parameter.,
Ludovic Courtès <=
- bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile)., Ludovic Courtès, 2017/10/20
- bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile)., Maxim Cournoyer, 2017/10/22
- bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile)., Ludovic Courtès, 2017/10/22
- bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile)., Eric Bavier, 2017/10/22
- bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile)., Ludovic Courtès, 2017/10/22
- bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile)., Eric Bavier, 2017/10/22
- bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile)., Ludovic Courtès, 2017/10/23
bug#27284: [PATCH 5/8] gexp: Add 'directory-union'., Ludovic Courtès, 2017/10/20
bug#27284: [PATCH 6/8] union: Parametrize the symlink procedure ., Ludovic Courtès, 2017/10/20
bug#27284: [PATCH 8/8] DRAFT Add (guix self) and use it when pulling., Ludovic Courtès, 2017/10/20