all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build
@ 2017-02-18  0:44 huang_ying_caritas
  2017-02-18  0:44 ` [PATCH 2/2] guix: profiles: create fonts.dir/scale for all fonts directories huang_ying_caritas
  2017-02-24 12:40 ` [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build Huang, Ying
  0 siblings, 2 replies; 14+ messages in thread
From: huang_ying_caritas @ 2017-02-18  0:44 UTC (permalink / raw)
  To: guix-devel

From: Huang Ying <huang.ying.caritas@gmail.com>

* 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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-03-03  1:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-18  0:44 [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build huang_ying_caritas
2017-02-18  0:44 ` [PATCH 2/2] guix: profiles: create fonts.dir/scale for all fonts directories huang_ying_caritas
2017-02-24 12:40 ` [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build Huang, Ying
2017-02-24 13:32   ` Andy Wingo
2017-02-25  1:03     ` Huang, Ying
2017-02-24 14:02   ` Danny Milosavljevic
2017-02-24 22:13     ` Mark H Weaver
2017-02-25 12:43       ` Huang, Ying
2017-02-27  9:06       ` Danny Milosavljevic
2017-03-03  1:25         ` Mark H Weaver
2017-02-25  1:05     ` Huang, Ying
2017-02-25 12:30     ` Huang, Ying
2017-02-26  8:23       ` 宋文武
2017-02-27 11:27         ` Huang, Ying

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.