Skip to contentSkip to conversation

wget.py: use BPN when parsing upstream directory paths

PATCH In review Alexander Kanavin 2 participants 2 messages Sep 3, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 wget.py: use BPN when parsing upstream directory paths

PN in this context may contain bogus suffixes like -native etc.

---
 bitbake/lib/bb/fetch2/wget.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/bb/fetch2/wget.py +2 -2
index bd2a897..d32f5d0 100644
@@ -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
#2 lore raw
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