gnu-maintenance: Adjust 'latest-release' to filter Bash's patch directories.
* guix/gnu-maintenance.scm (latest-release)[patch-directory-name?]: New procedure. <subdirs>: Use it to filter out Bash-like patch directories.
This commit is contained in:
parent
65f7c35d02
commit
a74da6b015
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2010, 2011, 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2010, 2011, 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -275,6 +275,10 @@ open (resp. close) FTP connections; this can be useful to reuse connections."
|
||||||
(define contains-digit?
|
(define contains-digit?
|
||||||
(cut string-any char-set:digit <>))
|
(cut string-any char-set:digit <>))
|
||||||
|
|
||||||
|
(define patch-directory-name?
|
||||||
|
;; Return #t for patch directory names such as 'bash-4.2-patches'.
|
||||||
|
(cut string-suffix? "patches" <>))
|
||||||
|
|
||||||
(let-values (((server directory) (ftp-server/directory project)))
|
(let-values (((server directory) (ftp-server/directory project)))
|
||||||
(define conn (ftp-open server))
|
(define conn (ftp-open server))
|
||||||
|
|
||||||
|
@ -284,6 +288,9 @@ open (resp. close) FTP connections; this can be useful to reuse connections."
|
||||||
;; Filter out sub-directories that do not contain digits---e.g.,
|
;; Filter out sub-directories that do not contain digits---e.g.,
|
||||||
;; /gnuzilla/lang and /gnupg/patches.
|
;; /gnuzilla/lang and /gnupg/patches.
|
||||||
(subdirs (filter-map (match-lambda
|
(subdirs (filter-map (match-lambda
|
||||||
|
(((? patch-directory-name? dir)
|
||||||
|
'directory . _)
|
||||||
|
#f)
|
||||||
(((? contains-digit? dir) 'directory . _)
|
(((? contains-digit? dir) 'directory . _)
|
||||||
dir)
|
dir)
|
||||||
(_ #f))
|
(_ #f))
|
||||||
|
|
Loading…
Reference in New Issue