From: Arun Isaac <arunisaac@systemreboot.net>
To: 42192@debbugs.gnu.org
Cc: Arun Isaac <arunisaac@systemreboot.net>
Subject: [bug#42192] [PATCH 3/3] import: launchpad: Recognize more URLs.
Date: Sun, 5 Jul 2020 00:03:32 +0530 [thread overview]
Message-ID: <20200704183332.25445-3-arunisaac@systemreboot.net> (raw)
In-Reply-To: <20200704183332.25445-1-arunisaac@systemreboot.net>
* guix/import/launchpad.scm (updated-launchpad-url): Recognize more URLs.
---
guix/import/launchpad.scm | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm
index c991ccfe6e..fd3cfa8444 100644
--- a/guix/import/launchpad.scm
+++ b/guix/import/launchpad.scm
@@ -46,15 +46,35 @@ false if none is recognized"
(version (package-version old-package))
(repo (launchpad-repository url)))
(cond
- ((and
- (>= (length (string-split version #\.)) 2)
- (string=? (string-append "https://launchpad.net/"
- repo "/" (version-major+minor version)
- "/" version "/+download/" repo "-" version ext)
- url))
+ ((< (length (string-split version #\.)) 2) #f)
+ ((string=? (string-append "https://launchpad.net/"
+ repo "/" (version-major+minor version)
+ "/" version "/+download/" repo "-" version ext)
+ url)
(string-append "https://launchpad.net/"
repo "/" (version-major+minor new-version)
"/" new-version "/+download/" repo "-" new-version ext))
+ ((string=? (string-append "https://launchpad.net/"
+ repo "/" (version-major+minor version)
+ "/" version "/+download/" repo "_" version ext)
+ url)
+ (string-append "https://launchpad.net/"
+ repo "/" (version-major+minor new-version)
+ "/" new-version "/+download/" repo "-" new-version ext))
+ ((string=? (string-append "https://launchpad.net/"
+ repo "/trunk/" version "/+download/"
+ repo "-" version ext)
+ url)
+ (string-append "https://launchpad.net/"
+ repo "/trunk/" new-version
+ "/+download/" repo "-" new-version ext))
+ ((string=? (string-append "https://launchpad.net/"
+ repo "/trunk/" version "/+download/"
+ repo "_" version ext)
+ url)
+ (string-append "https://launchpad.net/"
+ repo "/trunk/" new-version
+ "/+download/" repo "_" new-version ext))
(#t #f))))) ; Some URLs are not recognised.
(match (package-source old-package)
--
2.26.2
next prev parent reply other threads:[~2020-07-04 18:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-04 18:25 [bug#42192] [PATCH 0/3] Improve launchpad updater Arun Isaac
2020-07-04 18:33 ` [bug#42192] [PATCH 1/3] import: launchpad: Handle list of source URLs correctly Arun Isaac
2020-07-04 18:33 ` [bug#42192] [PATCH 2/3] import: launchpad: Recognize the .orig.tar.gz extension Arun Isaac
2020-07-04 18:33 ` Arun Isaac [this message]
2020-08-31 13:29 ` [bug#42192] [PATCH 0/3] Improve launchpad updater Ludovic Courtès
2020-09-01 17:20 ` bug#42192: " Arun Isaac
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200704183332.25445-3-arunisaac@systemreboot.net \
--to=arunisaac@systemreboot.net \
--cc=42192@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).