GNU bug report logs -
#49112
[PATCH] import: launchpad: Use repository to retrieve releases.
Previous Next
Reported by: Matthew James Kraai <kraai <at> ftbfs.org>
Date: Sat, 19 Jun 2021 10:08:02 UTC
Severity: normal
Tags: patch
Done: Brice Waegeneire <brice <at> waegenei.re>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49112 in the body.
You can then email your comments to 49112 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#49112
; Package
guix-patches
.
(Sat, 19 Jun 2021 10:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Matthew James Kraai <kraai <at> ftbfs.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 19 Jun 2021 10:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49112
; Package
guix-patches
.
(Sat, 19 Jun 2021 20:40:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 49112 <at> debbugs.gnu.org (full text, mbox):
Hello Matthew,
Thank you for the patch!
Matthew James Kraai <kraai <at> ftbfs.org> writes:
> * guix/import/launchpad.scm (latest-released-version): Use repository instead
> of package name.
> (latest-release): Pass repository to latest-released-version.
I had a patch for this, but yours is cleaner, using
'launchpad-directory'. I have added a copyright line and pushed as 9171079e515289120405c70c143445df2a35db1c.
Cheers,
- Brice
bug closed, send any further explanations to
49112 <at> debbugs.gnu.org and Matthew James Kraai <kraai <at> ftbfs.org>
Request was from
Brice Waegeneire <brice <at> waegenei.re>
to
control <at> debbugs.gnu.org
.
(Sat, 19 Jun 2021 20:40:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 18 Jul 2021 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 332 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.