13:48 < JaMa> would it make sense to implement something like DISTRO_FEATURES_FILTER_NATIVE from https://git.openembedded.org/openembedded-core/commit/?id=731744d5538e315702be828e6f2bd556309dee07 but for ERROR_QA and WARN_QA? I have DISTROs with different ERROR_QA and they don's share -native sstate, because do_recipe_qa is different 13:50 < JaMa> when it was only used in do_package_qa then it was fine (as it didn't affect -native), but now with meta/classes-global/insane.bbclass:addtask do_recipe_qa before do_fetch do_package_qa do_build it affects everything 13:54 < JaMa> or change it similarly as DISTRO_FEATURES that it changes signature only when one of the currently used ones is or isn't in ERROR_QA (currently it uses missing-metadata, missing-maintainer, src-uri-bad) 13:55 < RP> JaMa: the latter sounds more attractive 13:55 < JaMa> if error_class in (d.getVar("ERROR_QA") or "").split() replacing this with contains might help, right? 13:56 < JaMa> in meta/lib/oe/qa.py handle_error 13:56 < RP> JaMa: yes, that would be the right direction 13:56 < JaMa> ok, will add it to my TODO list
I've updated 2 WIP commits in: https://git.openembedded.org/openembedded-core-contrib/log/?h=jansa/master-qa Unfortunately this still isn't enough, with this applied I still see in bitbake-diffsigs output: List of dependencies for variable ERROR_QA is [] List of dependencies for variable oe.qa.handle_error is ['ERROR_QA', 'oe.qa.write_error'] Variable ERROR_QA value is dev-so debug-deps Variable oe.qa.handle_error value is Need to debug the parser a bit to find why it still tracks whole ERROR_QA.
With some debug output added to codeparser.py I've found that bb.utils.contains correctly ends in def visit_Call(self, node): https://git.openembedded.org/bitbake/tree/lib/bb/codeparser.py?id=89712949de9476e4674864a8dcd6862fefe92eae#n261 if name in self.containsfuncs and isinstance(node.args[1], ast.Constant): if varname not in self.contains: self.contains[varname] = set() self.contains[varname].add(node.args[1].value) But error_class variable isn't ast.Constant so it doesn't use this optimization and instead just adds whole ERROR_QA varname in: https://git.openembedded.org/bitbake/tree/lib/bb/codeparser.py?id=89712949de9476e4674864a8dcd6862fefe92eae#n275 Not sure what we can do in this case without bigger changes to codeparser or how handle_error used (e.g. doing the contains first and then calling handle_error or handle_warn or handle_note, but that would make instane.bbclass terrible and won't even work in cases like: meta/classes-global/insane.bbclass: oe.qa.handle_error(w, warnings[w], d) meta/classes-global/insane.bbclass: oe.qa.handle_error(e, errors[e], d) Please suggest if there is better way how to fix this (or to close as Won't Fix).
Richard will take a deeper look at this but maybe not for 5.1.
I've added some code to bitbake which allows handle_error to be specially handled. This solves some of the issues in do_recipe_qa and do_populate_sysroot but we'll still have to rework insane to use string constants in the calls if we want things to work there.
https://lists.openembedded.org/g/bitbake-devel/message/16523 https://lists.openembedded.org/g/openembedded-core/message/203881 https://lists.openembedded.org/g/openembedded-core/message/203880 are the related changes now on ML. Thanks RP!
https://git.yoctoproject.org/poky/commit/?id=be6a4145ea02bc472688a1e4b38a1d0b1f3b0d50 and the preceding patches mean ERROR_QA no longer causes unnecessary task rebuilds.