Archived
1
0
Fork 0

import: launchpad: Fix typo.

* guix/import/launchpad.scm (latest-release): Rename 'origin-github-uri'
to 'origin-launchpad-uri'.
This commit is contained in:
Brice Waegeneire 2021-06-19 22:21:47 +02:00
parent 9171079e51
commit 3aabe51e8c
No known key found for this signature in database
GPG key ID: A94903A166A18FAE

View file

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2020 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org> ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -122,13 +123,13 @@ for example, 'linuxdcpp'. Return #f if there is no releases."
(define (latest-release pkg) (define (latest-release pkg)
"Return an <upstream-source> for the latest release of PKG." "Return an <upstream-source> for the latest release of PKG."
(define (origin-github-uri origin) (define (origin-launchpad-uri origin)
(match (origin-uri origin) (match (origin-uri origin)
((? string? url) url) ; surely a Launchpad URL ((? string? url) url) ; surely a Launchpad URL
((urls ...) ((urls ...)
(find (cut string-contains <> "launchpad.net") urls)))) (find (cut string-contains <> "launchpad.net") urls))))
(let* ((source-uri (origin-github-uri (package-source pkg))) (let* ((source-uri (origin-launchpad-uri (package-source pkg)))
(name (package-name pkg)) (name (package-name pkg))
(repository (launchpad-repository source-uri)) (repository (launchpad-repository source-uri))
(newest-version (latest-released-version repository))) (newest-version (latest-released-version repository)))