mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
rrs_upstream_history.py: Fix use regexes in packages
Make difference when handling suffixes or preffixes like 'nativesdk-' when try to use regexes in packages that have suffixes like '-crosssdk' it can contain the arch into it like binutils-crosssdk-x86_64. Use split method in suffixes and replace method into preffixes, this fixes issues with suffixes containing archs at end. [YOCTO #8102] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
parent
ef32d52b29
commit
32391e968a
|
@ -54,14 +54,20 @@ def set_regexes(d):
|
|||
return
|
||||
|
||||
suffixes = d.getVar('SPECIAL_PKGSUFFIX', True).split()
|
||||
suffixes.append('nativesdk-')
|
||||
prefixes = ['nativesdk-']
|
||||
|
||||
special = list(suffixes)
|
||||
special.extend(prefixes)
|
||||
|
||||
localdata = bb.data.createCopy(d)
|
||||
|
||||
pn = localdata.getVar('PN', True)
|
||||
for sfx in suffixes:
|
||||
if pn.find(sfx) != -1:
|
||||
pnstripped = pn.replace(sfx, '')
|
||||
for s in special:
|
||||
if pn.find(s) != -1:
|
||||
if s in suffixes:
|
||||
pnstripped = pn.split(s)[0]
|
||||
else:
|
||||
pnstripped = pn.replace(s, '')
|
||||
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" +
|
||||
d.getVar('OVERRIDES', True))
|
||||
bb.data.update_data(localdata)
|
||||
|
|
Loading…
Reference in New Issue
Block a user