diff options
author | Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> | 2021-01-27 22:33:11 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-28 23:12:05 +0000 |
commit | 24e95b9a0b0610dd82aa85f0c0c6fb4f347bc3e9 (patch) | |
tree | d477118d60bf54d25ff2209962722b65f645dcc4 /meta | |
parent | eb604952d5a0e1a4554432efc364972f083cf69d (diff) | |
download | poky-24e95b9a0b0610dd82aa85f0c0c6fb4f347bc3e9.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/insane.bbclass | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index e371c1c71f..53230fc667 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -1381,6 +1381,7 @@ python () { | |||
1381 | # native also inherits nopackages and relocatable bbclasses | 1381 | # native also inherits nopackages and relocatable bbclasses |
1382 | skip_classes.extend(['nopackages', 'relocatable']) | 1382 | skip_classes.extend(['nopackages', 'relocatable']) |
1383 | 1383 | ||
1384 | broken_order = [] | ||
1384 | for class_item in reversed(inherited_classes): | 1385 | for class_item in reversed(inherited_classes): |
1385 | if needle not in class_item: | 1386 | if needle not in class_item: |
1386 | for extend_item in skip_classes: | 1387 | for extend_item in skip_classes: |
@@ -1388,10 +1389,13 @@ python () { | |||
1388 | break | 1389 | break |
1389 | else: | 1390 | else: |
1390 | pn = d.getVar('PN') | 1391 | pn = d.getVar('PN') |
1391 | package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " % pn, d) | 1392 | broken_order.append(os.path.basename(class_item)) |
1392 | break | ||
1393 | else: | 1393 | else: |
1394 | break | 1394 | break |
1395 | if broken_order: | ||
1396 | package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " | ||
1397 | "Classes inherited after native/nativesdk: %s" % (pn, " ".join(broken_order)), d) | ||
1398 | |||
1395 | 1399 | ||
1396 | qa_sane = d.getVar("QA_SANE") | 1400 | qa_sane = d.getVar("QA_SANE") |
1397 | if not qa_sane: | 1401 | if not qa_sane: |