]> code.ossystems Code Review - openembedded-core.git/commitdiff
insane: native-last: Only print classes inherited after native/nativesdk
authorTomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Wed, 27 Jan 2021 21:33:11 +0000 (22:33 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Jan 2021 23:10:16 +0000 (23:10 +0000)
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].

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass

index e371c1c71fbdef7ec17077352c9c776e709ffee4..53230fc66704378190143ddd86289310d2f5a370 100644 (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: