insane: Update to allow for class layout changes

Make the code more generic to allow for the potential incomming class
layout changes.

(From OE-Core rev: 7c6c717a54423480c0ac9ed13861e3c1cc47e2b2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-08-11 15:17:07 +01:00
parent ce08cf4825
commit 10317912ee

View File

@@ -1425,7 +1425,7 @@ python () {
if bb.data.inherits_class(native_class, d):
inherited_classes = d.getVar('__inherit_cache', False) or []
needle = os.path.join('classes', native_class)
needle = "/" + native_class
bbclassextend = (d.getVar('BBCLASSEXTEND') or '').split()
# BBCLASSEXTEND items are always added in the end
@@ -1438,7 +1438,7 @@ python () {
for class_item in reversed(inherited_classes):
if needle not in class_item:
for extend_item in skip_classes:
if os.path.join('classes', '%s.bbclass' % extend_item) in class_item:
if '/%s.bbclass' % extend_item in class_item:
break
else:
pn = d.getVar('PN')