summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/wget.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/wget.py')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 202ed0b9e1..ffae5405b0 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -420,10 +420,10 @@ class Wget(FetchMethod):
420 version_dir = ['', '', ''] 420 version_dir = ['', '', '']
421 version = ['', '', ''] 421 version = ['', '', '']
422 422
423 dirver_regex = re.compile("(\D*)((\d+[\.\-_])+(\d+))") 423 dirver_regex = re.compile("(?P<pfx>\D*)(?P<ver>(\d+[\.\-_])+(\d+))")
424 s = dirver_regex.search(dirver) 424 s = dirver_regex.search(dirver)
425 if s: 425 if s:
426 version_dir[1] = s.group(2) 426 version_dir[1] = s.group('ver')
427 else: 427 else:
428 version_dir[1] = dirver 428 version_dir[1] = dirver
429 429
@@ -438,9 +438,9 @@ class Wget(FetchMethod):
438 for line in soup.find_all('a', href=True): 438 for line in soup.find_all('a', href=True):
439 s = dirver_regex.search(line['href'].strip("/")) 439 s = dirver_regex.search(line['href'].strip("/"))
440 if s: 440 if s:
441 version_dir_new = ['', s.group(2), ''] 441 version_dir_new = ['', s.group('ver'), '']
442 if self._vercmp(version_dir, version_dir_new) <= 0: 442 if self._vercmp(version_dir, version_dir_new) <= 0:
443 dirver_new = s.group(1) + s.group(2) 443 dirver_new = s.group('pfx') + s.group('ver')
444 path = ud.path.replace(dirver, dirver_new, True) \ 444 path = ud.path.replace(dirver, dirver_new, True) \
445 .split(package)[0] 445 .split(package)[0]
446 uri = bb.fetch.encodeurl([ud.type, ud.host, path, 446 uri = bb.fetch.encodeurl([ud.type, ud.host, path,