insane: native-last: Only print classes inherited after native/nativesdk

For usability, only print the classes inherited after native/nativesdk
which makes it easier for the user to see where the problem is.

Realted to [YOCTO #5729].

(From OE-Core rev: 78f7cf59783faab6ef8d4f4fde774754db946519)

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Tomasz Dziendzielski
2021-01-27 22:33:11 +01:00
committed by Richard Purdie
parent eb604952d5
commit 24e95b9a0b

View File

@@ -1381,6 +1381,7 @@ python () {
# native also inherits nopackages and relocatable bbclasses
skip_classes.extend(['nopackages', 'relocatable'])
broken_order = []
for class_item in reversed(inherited_classes):
if needle not in class_item:
for extend_item in skip_classes:
@@ -1388,10 +1389,13 @@ python () {
break
else:
pn = d.getVar('PN')
package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " % pn, d)
break
broken_order.append(os.path.basename(class_item))
else:
break
if broken_order:
package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. "
"Classes inherited after native/nativesdk: %s" % (pn, " ".join(broken_order)), d)
qa_sane = d.getVar("QA_SANE")
if not qa_sane: