mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
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").
This commit is contained in:
parent
87dfd45594
commit
049b2f1d7b
1 changed files with 7 additions and 5 deletions
|
@ -291,8 +291,12 @@ (define conn (ftp-open server))
|
||||||
|
|
||||||
(let loop ((directory directory))
|
(let loop ((directory directory))
|
||||||
(let* ((entries (ftp-list conn 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
|
(subdirs (filter-map (match-lambda
|
||||||
((dir 'directory . _) dir)
|
(((? contains-digit? dir) 'directory . _)
|
||||||
|
dir)
|
||||||
(_ #f))
|
(_ #f))
|
||||||
entries)))
|
entries)))
|
||||||
(match subdirs
|
(match subdirs
|
||||||
|
@ -307,10 +311,8 @@ (define conn (ftp-open server))
|
||||||
(cut cons <> directory))))
|
(cut cons <> directory))))
|
||||||
((subdirs ...)
|
((subdirs ...)
|
||||||
;; Assume that SUBDIRS correspond to versions, and jump into the
|
;; Assume that SUBDIRS correspond to versions, and jump into the
|
||||||
;; one with the highest version number. Filter out sub-directories
|
;; one with the highest version number.
|
||||||
;; that do not contain digits---e.g., /gnuzilla/lang.
|
(let ((target (reduce latest #f subdirs)))
|
||||||
(let* ((subdirs (filter contains-digit? subdirs))
|
|
||||||
(target (reduce latest #f subdirs)))
|
|
||||||
(and target
|
(and target
|
||||||
(loop (string-append directory "/" target))))))))))
|
(loop (string-append directory "/" target))))))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue