After this patch got merged I notice some "noise" in my builds.
For bbappends which inherit unrelated classes I get a lot of warning like
Issue: nativesdk-openssh: native/nativesdk class is not inherited last,
this can result in unexpected behaviour. Classes inherited after
native/nativesdk: my-custom-class.bbclass [native-last]
First it doesn't give any hint that this is caused by the bbappend and
secondly I have no idea how to fix that (if that is even possible).
So I would like to have at least an option to ignore these warnings for
classes I'm sure don't cause any conflict - something more granular then
just to deactivate this pretty useful check.
Thoughts?
On 24.01.21 10:55, Tomasz Dziendzielski wrote:
Classes native/nativesdk should be inherited last to prevent unexpected
behaviour.
[YOCTO #5729]
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendziel...@gmail.com>
---
meta/classes/insane.bbclass | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 105d2a5ce8..3597943ddd 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -27,7 +27,7 @@ WARN_QA ?= " libdir xorg-driver-abi \
infodir build-deps src-uri-bad symlink-to-sysroot multilib \
invalid-packageconfig host-user-contaminated uppercase-pn
patch-fuzz \
mime mime-xdg unlisted-pkg-lics unhandled-features-check \
- missing-update-alternatives \
+ missing-update-alternatives native-last \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -1366,6 +1366,32 @@ python () {
d.setVarFlag('do_package_qa', 'rdeptask', '')
for i in issues:
package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package
specific, please fix this." % (d.getVar("FILE"), i), d)
+
+ for native_class in ['native', 'nativesdk']:
+ if bb.data.inherits_class(native_class, d):
+
+ inherited_classes = d.getVar('__inherit_cache', False) or []
+ needle = os.path.join('classes', native_class)
+
+ bbclassextend = (d.getVar('BBCLASSEXTEND') or '').split()
+ # BBCLASSEXTEND items are always added in the end
+ skip_classes = bbclassextend
+ if bb.data.inherits_class('native', d) or 'native' in
bbclassextend:
+ # native also inherits nopackages and relocatable bbclasses
+ skip_classes.extend(['nopackages', 'relocatable'])
+
+ 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:
+ 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
+ else:
+ break
+
qa_sane = d.getVar("QA_SANE")
if not qa_sane:
bb.fatal("Fatal QA errors found, failing task.")
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#147942):
https://lists.openembedded.org/g/openembedded-core/message/147942
Mute This Topic: https://lists.openembedded.org/mt/80075083/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-