From: Matthew James Kraai <kraai@ftbfs.org>
To: 49112@debbugs.gnu.org
Cc: Matthew James Kraai <kraai@ftbfs.org>
Subject: [bug#49112] [PATCH] import: launchpad: Use repository to retrieve releases.
Date: Sat, 19 Jun 2021 03:07:39 -0700 [thread overview]
Message-ID: <20210619100739.11713-1-kraai@ftbfs.org> (raw)
* guix/import/launchpad.scm (latest-released-version): Use repository instead
of package name.
(latest-release): Pass repository to latest-released-version.
---
guix/import/launchpad.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm
index a52b39a085..23ac6a3c7b 100644
--- a/guix/import/launchpad.scm
+++ b/guix/import/launchpad.scm
@@ -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)
--
2.32.0
next reply other threads:[~2021-06-19 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-19 10:07 Matthew James Kraai [this message]
2021-06-19 20:38 ` [bug#49112] [PATCH] import: launchpad: Use repository to retrieve releases Brice Waegeneire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210619100739.11713-1-kraai@ftbfs.org \
--to=kraai@ftbfs.org \
--cc=49112@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.