@@ -100,8 +100,8 @@ URL of the form
(match (string-split (uri-path (string->uri url)) #\/)
((_ repo . rest) repo)))
-(define (latest-released-version package-name)
- "Return a string of the newest released version name given the PACKAGE-NAME,
+(define (latest-released-version repository)
+ "Return a string of the newest released version name given the REPOSITORY,
for example, 'linuxdcpp'. Return #f if there is no releases."
(define (pre-release? x)
;; Versions containing anything other than digit characters and "." (for
@@ -112,7 +112,7 @@ for example, 'linuxdcpp'. Return #f if there is no releases."
(match (json-fetch
(string-append "https://api.launchpad.net/1.0/"
- package-name "/releases"))
+ repository "/releases"))
(#f #f) ;404 or similar
(json
(assoc-ref
@@ -129,7 +129,8 @@ for example, 'linuxdcpp'. Return #f if there is no releases."
(let* ((source-uri (origin-github-uri (package-source pkg)))
(name (package-name pkg))
- (newest-version (latest-released-version name)))
+ (repository (launchpad-repository source-uri))
+ (newest-version (latest-released-version repository)))
(if newest-version
(upstream-source
(package name)