summaryrefslogtreecommitdiff
path: root/guix/gnu-maintenance.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-04-27 16:26:48 +0200
committerLudovic Courtès <ludo@gnu.org>2013-04-27 16:26:48 +0200
commit049b2f1d7b651f0dce3048bf36c43e2039fdf271 (patch)
tree14d2b7a558a1c0f3c538af01e06f6e4b4e51e265 /guix/gnu-maintenance.scm
parent87dfd45594e6e1f6d4ab790412b4fe0a607f30cd (diff)
downloadguix-patches-049b2f1d7b651f0dce3048bf36c43e2039fdf271.tar
guix-patches-049b2f1d7b651f0dce3048bf36c43e2039fdf271.tar.gz
gnu-maintenance: Fix `latest-release' for GnuPG.
* guix/gnu-maintenance.scm (latest-release): Filter out directories whose name does not contain digits early in the process. This fixes (latest-release "gnupg").
Diffstat (limited to 'guix/gnu-maintenance.scm')
-rw-r--r--guix/gnu-maintenance.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index be739e34a3..c66d5f75ca 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -291,8 +291,12 @@ pairs. Example: (\"mit-scheme-9.0.1\" . \"/gnu/mit-scheme/stable.pkg/9.0.1\").
(let loop ((directory directory))
(let* ((entries (ftp-list conn directory))
+
+ ;; Filter out sub-directories that do not contain digits---e.g.,
+ ;; /gnuzilla/lang and /gnupg/patches.
(subdirs (filter-map (match-lambda
- ((dir 'directory . _) dir)
+ (((? contains-digit? dir) 'directory . _)
+ dir)
(_ #f))
entries)))
(match subdirs
@@ -307,10 +311,8 @@ pairs. Example: (\"mit-scheme-9.0.1\" . \"/gnu/mit-scheme/stable.pkg/9.0.1\").
(cut cons <> directory))))
((subdirs ...)
;; Assume that SUBDIRS correspond to versions, and jump into the
- ;; one with the highest version number. Filter out sub-directories
- ;; that do not contain digits---e.g., /gnuzilla/lang.
- (let* ((subdirs (filter contains-digit? subdirs))
- (target (reduce latest #f subdirs)))
+ ;; one with the highest version number.
+ (let ((target (reduce latest #f subdirs)))
(and target
(loop (string-append directory "/" target))))))))))