guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/04: utils: Add #:copy-file parameter to 'copy-recursively'.


From: guix-commits
Subject: 02/04: utils: Add #:copy-file parameter to 'copy-recursively'.
Date: Thu, 19 Nov 2020 16:37:05 -0500 (EST)

civodul pushed a commit to branch core-updates
in repository guix.

commit edbd8f3f7eeb0e49c03ca611e43b5a777bd0c762
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Nov 19 18:17:26 2020 +0100

    utils: Add #:copy-file parameter to 'copy-recursively'.
    
    * guix/build/utils.scm (copy-recursively): Add #:copy-file and honor it.
    * doc/guix.texi (Build Utilities): Adjust accordingly.
---
 doc/guix.texi        | 11 ++++++-----
 guix/build/utils.scm |  7 ++++---
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6f4a3ac..84e5691 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7778,12 +7778,13 @@ Make @var{file} writable for its owner.
 @end deffn
 
 @deffn {Scheme Procedure} copy-recursively @var{source} @var{destination} @
-  [#:log (current-output-port)] [#:follow-symlinks? #f] [#:keep-mtime? #f]
+  [#:log (current-output-port)] [#:follow-symlinks? #f] @
+  [#:copy-file copy-file] [#:keep-mtime? #f]
 Copy @var{source} directory to @var{destination}.  Follow symlinks if
-@var{follow-symlinks?}  is true; otherwise, just preserve them.  When
-@var{keep-mtime?} is true, keep the modification time of the files in
-@var{source} on those of @var{destination}.  Write verbose output to the
-@var{log} port.
+@var{follow-symlinks?}  is true; otherwise, just preserve them.  Call
+@var{copy-file} to copy regular files.  When @var{keep-mtime?} is true,
+keep the modification time of the files in @var{source} on those of
+@var{destination}.  Write verbose output to the @var{log} port.
 @end deffn
 
 @deffn {Scheme Procedure} delete-file-recursively @var{dir} @
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 443a820..470e5cf 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -343,11 +343,12 @@ name."
                            #:key
                            (log (current-output-port))
                            (follow-symlinks? #f)
+                           (copy-file copy-file)
                            keep-mtime?)
   "Copy SOURCE directory to DESTINATION.  Follow symlinks if FOLLOW-SYMLINKS?
-is true; otherwise, just preserve them.  When KEEP-MTIME? is true, keep the
-modification time of the files in SOURCE on those of DESTINATION.  Write
-verbose output to the LOG port."
+is true; otherwise, just preserve them.  Call COPY-FILE to copy regular files.
+When KEEP-MTIME? is true, keep the modification time of the files in SOURCE on
+those of DESTINATION.  Write verbose output to the LOG port."
   (define strip-source
     (let ((len (string-length source)))
       (lambda (file)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]