diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-03-02 21:15:24 +0900 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-03-03 00:31:46 +0900 |
commit | 3088e5ee53c3b939972edd48a7f626a899751575 (patch) | |
tree | 168a711c2bfacf628614e3940fa5712f69cc7d69 | |
parent | dd64f441d3dcff9165927b821da2b69b1fc6a24f (diff) |
Extend a few more importers with support for #:partial-version?.
This fixes a few omissions in commit f13f076968 ("refresh: Add support for
partial target versions.").
* guix/gnu-maintenance.scm
(import-kernel.org-release): Add #:partial-version? argument.
* guix/gnu-maintenance.scm (import-savannah-release): Likewise.
(import-xorg-release): Likewise.
(import-kernel.org-release): Likewise.
(latest-sourceforge-release): Likewise (reporting an error). Use report-error
instead of error directly.
Change-Id: I188fa8fa7250a7165410b8d5c4870f428ea228af
-rw-r--r-- | guix/gnu-maintenance.scm | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 1b628a772f..555fd9e8cd 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -867,9 +867,10 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org." ;; HTML (unlike <https://download.savannah.nongnu.org/releases>.) "https://de.freedif.org/savannah/") -(define* (import-savannah-release package #:key (version #f)) +(define* (import-savannah-release package #:key version partial-version?) "Return the latest release of PACKAGE. Optionally include a VERSION string -to fetch a specific version." +to fetch a specific version, which may be partially provided when +PARTIAL-VERSION? is #t." (let* ((uri (string->uri (match (origin-uri (package-source package)) ((? string? uri) uri) @@ -879,9 +880,10 @@ to fetch a specific version." ;; or whichever detached signature naming scheme PACKAGE uses. (import-html-release %savannah-base package #:version version + #:partial-version? partial-version? #:directory directory))) -(define* (latest-sourceforge-release package #:key (version #f)) +(define* (latest-sourceforge-release package #:key version partial-version?) "Return the latest release of PACKAGE. Optionally include a VERSION string to fetch a specific version." (define (uri-append uri extension) @@ -898,10 +900,12 @@ to fetch a specific version." (else #f)))) (when version - (error - (formatted-message - (G_ "Updating to a specific version is not yet implemented for ~a, sorry.") - "sourceforge"))) + (report-error + (G_ "Updating to a specific version is not yet implemented for SourceForge."))) + + (when partial-version? + (report-error + (G_ "Updating to a partial version is not yet implemented for SourceForge."))) (let* ((name (package-upstream-name package)) (base (string-append "https://sourceforge.net/projects/" @@ -941,22 +945,25 @@ to fetch a specific version." (when port (close-port port)))))) -(define* (import-xorg-release package #:key (version #f)) +(define* (import-xorg-release package #:key version partial-version?) "Return the latest release of PACKAGE. Optionally include a VERSION string -to fetch a specific version." +to fetch a specific version, which may be partially provided when +PARTIAL-VERSION? is #t." (let ((uri (string->uri (origin-uri (package-source package))))) (false-if-networking-error (false-if-ftp-error (import-ftp-release (package-name package) #:version version + #:partial-version? partial-version? #:server "ftp.freedesktop.org" #:directory (string-append "/pub/xorg/" (dirname (uri-path uri)))))))) -(define* (import-kernel.org-release package #:key (version #f)) +(define* (import-kernel.org-release package #:key version partial-version?) "Return the latest release of PACKAGE, a Linux kernel package. -Optionally include a VERSION string to fetch a specific version." +Optionally include a VERSION string to fetch a specific version, which may be +partially provided when PARTIAL-VERSION? is #t." (define %kernel.org-base ;; This URL and sub-directories thereof are nginx-generated directory ;; listings suitable for 'import-html-release'. @@ -972,6 +979,7 @@ Optionally include a VERSION string to fetch a specific version." (directory (dirname (uri-path uri)))) (import-html-release %kernel.org-base package #:version version + #:partial-version? partial-version? #:directory directory #:file->signature file->signature))) |