aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-09-11 11:45:30 +0200
committerLudovic Courtès <ludo@gnu.org>2017-09-11 11:51:39 +0200
commit1b3ebae4f1b1c1f34a825200440752e6ee8c8a7a (patch)
tree1bbc8ffed964bd2e26df699575985228467892da /guix
parente9f38113908414792ce2e5c1d3203cc8e5cb938b (diff)
downloadgnu-guix-1b3ebae4f1b1c1f34a825200440752e6ee8c8a7a.tar
gnu-guix-1b3ebae4f1b1c1f34a825200440752e6ee8c8a7a.tar.gz
gnu-maintenance: Return all the latest tarballs, not just one.
* guix/gnu-maintenance.scm (latest-gnu-release): Return a list of matching tarballs instead of just the first one. This gives us .tar.gz, .tar.xz, etc.
Diffstat (limited to 'guix')
-rw-r--r--guix/gnu-maintenance.scm26
1 files changed, 19 insertions, 7 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index c903b740ba..62f817347f 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -471,18 +471,30 @@ list available from %GNU-FILE-LIST-URI over HTTP(S)."
(package-upstream-name package)))
(let* ((files (ftp.gnu.org-files))
(relevant (filter (lambda (file)
- (and (string-contains file directory)
+ (and (string-prefix? "/gnu" file)
+ (string-contains file directory)
(release-file? name (basename file))))
files)))
(match (sort relevant (lambda (file1 file2)
(version>? (sans-extension (basename file1))
(sans-extension (basename file2)))))
- ((tarball _ ...)
- (upstream-source
- (package name)
- (version (tarball->version tarball))
- (urls (list (string-append "mirror://gnu/" tarball)))
- (signature-urls (map (cut string-append <> ".sig") urls))))
+ ((and tarballs (reference _ ...))
+ (let* ((version (tarball->version reference))
+ (tarballs (filter (lambda (file)
+ (string=? (sans-extension
+ (basename file))
+ (sans-extension
+ (basename reference))))
+ tarballs)))
+ (upstream-source
+ (package name)
+ (version version)
+ (urls (map (lambda (file)
+ (string-append "mirror://gnu/"
+ (string-drop file
+ (string-length "/gnu/"))))
+ tarballs))
+ (signature-urls (map (cut string-append <> ".sig") urls)))))
(()
#f)))))