wget.py: use BPN when parsing upstream directory paths
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 wget.py: use BPN when parsing upstream directory paths
PN in this context may contain bogus suffixes like -native etc.
Signed-off-by Alexander Kanavin <[email protected]>
--- bitbake/lib/bb/fetch2/wget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/bb/fetch2/wget.py +2 -2
@@ -521,11 +521,11 @@ class Wget(FetchMethod): path = ud.path.split(package)[0] # search for version matches on folders inside the path, like: - # "5.7" in http://download.gnome.org/sources/${PN}/5.7/${PN}-${PV}.tar.gz + # "5.7" in http://download.gnome.org/sources/${BPN}/5.7/${BPN}-${PV}.tar.gz dirver_regex = re.compile("(?P<dirver>[^/]*(\d+\.)*\d+([-_]r\d+)*)/") m = dirver_regex.search(path) if m: - pn = d.getVar('PN', True) + pn = d.getVar('BPN', True) dirver = m.group('dirver') dirver_pn_regex = re.compile("%s\d?" % (re.escape(pn)))
Signature · 1 line
2.1.4
Quoted 1 line · Alexander Kanavin
PN in this context may contain bogus suffixes like -native etc.
This is not that simple sadly. Bitbake has no knowledge of BPN, not should it have really :/. This suggests we have a bit of an API problem...
At the very least we should fallback to PN here is BPN isn't set.
Cheers,
Richard