[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57460] [PATCH 04/20] import: sourceforge: Issue error-message if ve
From: |
Hartmut Goebel |
Subject: |
[bug#57460] [PATCH 04/20] import: sourceforge: Issue error-message if version is given. |
Date: |
Sun, 28 Aug 2022 15:18:30 +0200 |
Due to the complicated directory structure at sourceforce,
enabling the sourceforge importer to update to a specific version
is very complicated to implement. Since only 2.0% of the
packages in guix are covered by this updater I dedided to now
implement this.
* guix/gnu-maintenance.scm(latest-sourceforge-release): Issue
error-message if version is given.
---
guix/gnu-maintenance.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index a278903a8d..8446a59fb5 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -34,6 +34,8 @@
#:use-module ((guix http-client) #:hide (open-socket-for-uri))
#:use-module (guix ftp-client)
#:use-module (guix utils)
+ #:use-module (guix diagnostics)
+ #:use-module (guix i18n)
#:use-module (guix memoization)
#:use-module (guix records)
#:use-module (guix upstream)
@@ -683,7 +685,7 @@ GNOME packages; EMMS is included though, because its
releases are on gnu.org."
#:directory directory)
(cut adjusted-upstream-source <> rewrite))))
-(define (latest-sourceforge-release package)
+(define* (latest-sourceforge-release package #:key (version #f))
"Return the latest release of PACKAGE."
(define (uri-append uri extension)
;; Return URI with EXTENSION appended.
@@ -698,6 +700,12 @@ GNOME packages; EMMS is included though, because its
releases are on gnu.org."
((200 302) #t)
(else #f))))
+ (when version
+ (error
+ (formatted-message
+ (G_ "Updating to a specific version is not yet implemented for ~a,
sorry.")
+ "sourceforge")))
+
(let* ((name (package-upstream-name package))
(base (string-append "https://sourceforge.net/projects/"
name "/files"))
--
2.30.4
- [bug#57460] [PATCH 00/19] Refresh to specific version, Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 01/20] upstream-updater: Rename record field., Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 02/20] import: cpan: Remove unused exports., Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 04/20] import: sourceforge: Issue error-message if version is given.,
Hartmut Goebel <=
- [bug#57460] [PATCH 03/20] updaters: Issue error-message if version is given:, Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 05/20] refresh: Allow updating to a specific version (gnu-maintenance), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 06/20] refresh: Allow updating to a specific version (crate), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 07/20] refresh: Allow updating to a specific version (egg), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 10/20] refresh: Allow updating to a specific version (gnome), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 11/20] refresh: Allow updating to a specific version (hexpm), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 12/20] refresh: Allow updating to a specific version (kde), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 14/20] refresh: Allow updating to a specific version (pypi), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 15/20] refresh: Allow updating to a specific version (script), Hartmut Goebel, 2022/08/28