aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/wget.py
diff options
context:
space:
mode:
authorAníbal Limón <limon.anibal@gmail.com>2016-03-24 12:08:18 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-28 15:55:51 +0100
commit45ee2b1079e8a6225a95c9e97791908fb6971ca0 (patch)
tree7d0d752fcdb06fee06be417515cfd38c2018d76e /bitbake/lib/bb/fetch2/wget.py
parent55cd35bd1802498240878b24f40f558fb807e881 (diff)
downloadopenembedded-core-contrib-45ee2b1079e8a6225a95c9e97791908fb6971ca0.tar.gz
bitbake: fetch2/wget.py: _check_latest_version_by_dir use group names
Little improvement for reference tokens by names instead of index. (Bitbake rev: e8ea15eeb1857ed4bb6337836bd2fb1f5dbb1bdf) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
version_dir = ['', '', '']
version = ['', '', '']
- dirver_regex = re.compile("(\D*)((\d+[\.\-_])+(\d+))")
+ dirver_regex = re.compile("(?P<pfx>\D*)(?P<ver>(\d+[\.\-_])+(\d+))")
s = dirver_regex.search(dirver)
if s:
- version_dir[1] = s.group(2)
+ version_dir[1] = s.group('ver')
else:
version_dir[1] = dirver
@@ -438,9 +438,9 @@ class Wget(FetchMethod):
for line in soup.find_all('a', href=True):
s = dirver_regex.search(line['href'].strip("/"))
if s:
- version_dir_new = ['', s.group(2), '']
+ version_dir_new = ['', s.group('ver'), '']
if self._vercmp(version_dir, version_dir_new) <= 0:
- dirver_new = s.group(1) + s.group(2)
+ dirver_new = s.group('pfx') + s.group('ver')
path = ud.path.replace(dirver, dirver_new, True) \
.split(package)[0]
uri = bb.fetch.encodeurl([ud.type, ud.host, path,