[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] build: union: Add create-all-directory? parameter to union-b
From: |
huang_ying_caritas |
Subject: |
[PATCH 1/2] build: union: Add create-all-directory? parameter to union-build |
Date: |
Sat, 18 Feb 2017 08:44:26 +0800 |
From: Huang Ying <address@hidden>
* guix/build/union.scm (union-build): Add create-all-directory? keyword
parameter. To add/remove some files from the directory.
---
guix/build/union.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/guix/build/union.scm b/guix/build/union.scm
index 6640b5652..4783066be 100644
--- a/guix/build/union.scm
+++ b/guix/build/union.scm
@@ -73,7 +73,8 @@ identical, #f otherwise."
(loop)))))))))))))
(define* (union-build output inputs
- #:key (log-port (current-error-port)))
+ #:key (log-port (current-error-port))
+ (create-all-directory? #f))
"Build in the OUTPUT directory a symlink tree that is the union of all
the INPUTS."
@@ -104,8 +105,10 @@ the INPUTS."
(define (union output inputs)
(match inputs
((input)
- ;; There's only one input, so just make a link.
- (symlink* input output))
+ ;; There's only one input, so just make a link unless
create-all-directory?
+ (if (and create-all-directory? (file-is-directory? input))
+ (union-of-directories output inputs)
+ (symlink* input output)))
(_
(call-with-values (lambda () (partition file-is-directory? inputs))
(match-lambda*
--
2.11.1
- [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build,
huang_ying_caritas <=
- [PATCH 2/2] guix: profiles: create fonts.dir/scale for all fonts directories, huang_ying_caritas, 2017/02/17
- Re: [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build, Huang\, Ying, 2017/02/24
- Re: [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build, Andy Wingo, 2017/02/24
- Re: [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build, Danny Milosavljevic, 2017/02/24
- Re: [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build, Huang\, Ying, 2017/02/24
- Re: [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build, Huang\, Ying, 2017/02/25