[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/13: gnu-maintenance: 'latest-html-release' considers non-relative URL
From: |
guix-commits |
Subject: |
05/13: gnu-maintenance: 'latest-html-release' considers non-relative URLs. |
Date: |
Wed, 17 Mar 2021 07:03:54 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit db69ebb9debda9e53ebb62f5113303cd9ff8dc14
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Mar 13 12:45:13 2021 +0100
gnu-maintenance: 'latest-html-release' considers non-relative URLs.
* guix/gnu-maintenance.scm (latest-html-release): Allow for URL to be an
arbitrary URL rather than a relative URL reference.
---
guix/gnu-maintenance.scm | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index febed57..98d326e 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
@@ -479,19 +479,21 @@ return the corresponding signature URL, or #f it
signatures are unavailable."
(port (http-fetch/cached uri #:ttl 3600))
(sxml (html->sxml port)))
(define (url->release url)
- (and (string=? url (basename url)) ;relative reference?
- (release-file? package url)
- (let-values (((name version)
- (package-name->name+version
- (tarball-sans-extension url)
- #\-)))
- (upstream-source
- (package name)
- (version version)
- (urls (list (string-append base-url directory "/" url)))
- (signature-urls
- (list (file->signature
- (string-append base-url directory "/" url))))))))
+ (let* ((base (basename url))
+ (url (if (string=? base url)
+ (string-append base-url directory "/" url)
+ url)))
+ (and (release-file? package base)
+ (let-values (((name version)
+ (package-name->name+version
+ (tarball-sans-extension base)
+ #\-)))
+ (upstream-source
+ (package name)
+ (version version)
+ (urls (list url))
+ (signature-urls
+ (list (file->signature url))))))))
(define candidates
(filter-map url->release (html-links sxml)))
- branch master updated (f194fbf -> d45d779), guix-commits, 2021/03/17
- 01/13: daemon: Correctly handle '--discover' with no value., guix-commits, 2021/03/17
- 02/13: doc: Define the term "profile"., guix-commits, 2021/03/17
- 09/13: gnu-maintenance: Add 'generic-html' updater., guix-commits, 2021/03/17
- 07/13: gnu-maintenance: 'latest-html-release' can determine signature file name., guix-commits, 2021/03/17
- 05/13: gnu-maintenance: 'latest-html-release' considers non-relative URLs.,
guix-commits <=
- 10/13: gnu: hwloc: Add 'release-monitoring-url' property., guix-commits, 2021/03/17
- 04/13: gnu-maintenance: Use (htmlprag) for 'latest-html-release'., guix-commits, 2021/03/17
- 08/13: gnu-maintenance: 'latest-html-release' better computes version number., guix-commits, 2021/03/17
- 06/13: gnu-maintenance: 'release-file?' rejects checksum files., guix-commits, 2021/03/17
- 11/13: gnu-maintenance: Remove unused parameters of 'latest-ftp-release'., guix-commits, 2021/03/17
- 13/13: gnu: tig: Update to 2.5.3., guix-commits, 2021/03/17
- 03/13: maint: Check whether Guile-zlib is recent enough., guix-commits, 2021/03/17
- 12/13: gnu-maintenance: Add a timeout on FTP connection establishment., guix-commits, 2021/03/17