Skip to contentSkip to conversation

fetch2/wget: when checking latest versions, consider all numerical directories

PATCH New Alexander Kanavin 1 participant 1 message May 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2/wget: when checking latest versions, consider all numerical directories

Previously the regex was maching x.y, but wasn't matching x, which is a problem e.g. here:
https://download.gnome.org/sources/epiphany/
(the new gnome version scheme adds 40-series at the end).

---
 bitbake/lib/bb/fetch2/wget.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/wget.py +1 -1
index 6d82f3af07..784df70c9f 100644
@@ -472,7 +472,7 @@ class Wget(FetchMethod):
         version_dir = ['', '', '']
         version = ['', '', '']
 
-        dirver_regex = re.compile(r"(?P<pfx>\D*)(?P<ver>(\d+[\.\-_])+(\d+))")
+        dirver_regex = re.compile(r"(?P<pfx>\D*)(?P<ver>(\d+[\.\-_])*(\d+))")
         s = dirver_regex.search(dirver)
         if s:
             version_dir[1] = s.group('ver')
Signature · 1 line
2.31.1