summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-27 01:30:57 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-27 01:30:57 +0200
commit2442257f2d0ca5ef84915f88eeadd4c26cc84ee8 (patch)
tree9151cbc1908bac9f1c00f252285bb7eaf68e0932 /guix
parent1bb9900a2a2fccfca3aa2ebb26dcc20095d230e5 (diff)
parent7facbf2b58f80afffedbb9230ec7ab9b61232dfe (diff)
downloadgnu-guix-2442257f2d0ca5ef84915f88eeadd4c26cc84ee8.tar
gnu-guix-2442257f2d0ca5ef84915f88eeadd4c26cc84ee8.tar.gz
Merge branch 'core-updates'
Diffstat (limited to 'guix')
-rw-r--r--guix/build/utils.scm39
-rw-r--r--guix/scripts/pull.scm4
2 files changed, 22 insertions, 21 deletions
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 06e88b1ff8..8cc9c1ee1f 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -185,29 +185,32 @@ but ignore errors."
lstat))
(define (find-files dir regexp)
- "Return the list of files under DIR whose basename matches REGEXP."
+ "Return the lexicographically sorted list of files under DIR whose basename
+matches REGEXP."
(define file-rx
(if (regexp? regexp)
regexp
(make-regexp regexp)))
- (file-system-fold (const #t)
- (lambda (file stat result) ; leaf
- (if (regexp-exec file-rx (basename file))
- (cons file result)
- result))
- (lambda (dir stat result) ; down
- result)
- (lambda (dir stat result) ; up
- result)
- (lambda (file stat result) ; skip
- result)
- (lambda (file stat errno result)
- (format (current-error-port) "find-files: ~a: ~a~%"
- file (strerror errno))
- #f)
- '()
- dir))
+ ;; Sort the result to get deterministic results.
+ (sort (file-system-fold (const #t)
+ (lambda (file stat result) ; leaf
+ (if (regexp-exec file-rx (basename file))
+ (cons file result)
+ result))
+ (lambda (dir stat result) ; down
+ result)
+ (lambda (dir stat result) ; up
+ result)
+ (lambda (file stat result) ; skip
+ result)
+ (lambda (file stat errno result)
+ (format (current-error-port) "find-files: ~a: ~a~%"
+ file (strerror errno))
+ #f)
+ '()
+ dir)
+ string<?))
;;;
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index a1b5cdc991..023b83e6a3 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -115,9 +115,7 @@ files."
;; download), we must build it first to avoid errors since
;; (gnutls) is unavailable.
(cons (string-append out "/guix/build/download.scm")
-
- ;; Sort the file names to get deterministic results.
- (sort (find-files out "\\.scm") string<?)))
+ (find-files out "\\.scm")))
;; Remove the "fake" (guix config).
(delete-file (string-append out "/guix/config.scm"))