mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-28 07:12:30 -05:00
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:
parent
21703b5120
commit
abc72eeac0
1 changed files with 9 additions and 1 deletions
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue