GNU bug report logs - #42192
[PATCH 0/3] Improve launchpad updater

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sat, 4 Jul 2020 18:27:01 UTC

Severity: normal

Tags: patch

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 42192 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [bug#42192] [PATCH 3/3] import: launchpad: Recognize more URLs.
Date: Sun,  5 Jul 2020 00:03:32 +0530
* 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





This bug report was last modified 4 years and 259 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.