]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Better way to work with github links (like /path/0.1.2.tar.gz) eg psi-plus.spec
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 25 Mar 2015 09:25:01 +0000 (10:25 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 25 Mar 2015 09:25:01 +0000 (10:25 +0100)
pldnotify.awk

index 7d1f86e2b2e64aa8a30fff2a58a21057a9f05526..291527771c4ea23c43041d2101594229f40d831a 100755 (executable)
@@ -586,11 +586,11 @@ function process_source(number, lurl, name, version) {
 
                        d("Found link: " addr)
 
-                       # github has very different tarball links that clash with this safe check
-                       if (!(newurl ~/^(http|https):\/\/github.com\/.*\/tarball/)) {
-                               if (addr ~ "[-_.0-9A-Za-z~]" filenameexp) {
-                                       continue
-                               }
+                       # Try not to treat foobar or foo-bar as (possibly newer) version of bar
+                       # (practical cases: KXL, lineakconfig, mhash...)
+                       # but don't skip cases where name is like "/some/link/0.12.2.tar.gz"
+                       if ((addr ~ "[-_.0-9A-Za-z~]" filenameexp) && addr !~ "[-_.0-9A-Za-z~]/" filenameexp)  {
+                               continue
                        }
 
                        if (addr ~ filenameexp) {
This page took 0.079754 seconds and 4 git commands to generate.