import: sourceforge: Issue error-message if version is given.

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 not
implement this.

* guix/gnu-maintenance.scm (latest-sourceforge-release): Add #:version
  argument.  Issue error-message if version is given.
This commit is contained in:
Hartmut Goebel 2022-06-29 15:02:07 +02:00
parent 21703b5120
commit abc72eeac0
No known key found for this signature in database
GPG key ID: 634A8DFFD3F631DF

View file

@ -37,6 +37,8 @@ (define-module (guix gnu-maintenance)
#:autoload (guix download) (%mirrors)
#: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)
@ -705,7 +707,7 @@ (define (latest-savannah-release package)
#:base-url %savannah-base
#:directory directory)))
(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.
@ -720,6 +722,12 @@ (define (valid-uri? uri port)
((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"))