[bitbake-devel] [PATCH 1/3] recipes: anonymous functions with priorities
Patrick Ohly
patrick.ohly at intel.com
Mon Jan 9 11:03:21 UTC 2017
On Fri, 2017-01-06 at 10:50 +0100, Patrick Ohly wrote:
> The default priority is 100. Functions with higher values run later.
>
> For example, rm_work.bbclass can use this to ensure that it runs
> later than other anonymous functions:
>
> python __anonymous_rm_work() {
> bb.build.addtask(....)
> }
> __anonymous_rm_work[priority] = "1000"
We discussed this a bit on chat, and there were concerns that priorities
are not defined well enough and will cause maintenance problems. Let me
add here that this was partly intentional: bitbake doesn't need to care
about specific priorities, that's something that the users of bitbake
(like OE-core) need to define. Admittedly my OE-core patch set did not
address that either, although it could be added with a documentation
patch.
As alternative, Richard suggested to add more events that will emit at
well-defined points in the processing of a recipe. However, as he said
himself, that then leads to the problem of ordering event handlers once
there is more then one handler who wants to run for a certain event.
IMHO that just reduces the scope of the problem, but does not really
solve it.
Basically, there would have to be a dedicated event for use only by
rm_work and nothing else, which kind of breaks the separation between
bitbake mechanisms and their use in meta data. Each time meta data needs
a new separate "slot", bitbake would have to be extended, which isn't
the case with the priority approach where each priority value already is
a separate slot.
Having said that, I don't have any strong opinion about this, I just
wanted to share some more thoughts on this.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
More information about the bitbake-devel
mailing list