Yes, having two recipes that inherit this running at the same time would 
potentially write the same index files. I'm not sure that's actually a problem 
other than the same thing being done twice.
As long as at least one of the package index steps runs after all packages have 
been written, the index files will be up-to-date. Since I've made the task 
recursively depend on the tasks that create packages, I think it's fine.

That being said, if there's a way to both add it to recipes and ensure that the 
task only runs once per bitbake command I would be open to moving towards that. 
Is there anything like that?

Thanks,
Charlie

On Thu, May 25, 2023 at 03:47 AM, Alexander Kanavin wrote:

> 
> What happens if several recipes inherit this class, and are processed
> at the same time? Won't they step on each other, writing the same
> index files into the deploy directory? I think package-index recipe is
> deliberately standalone for that reason: you have to build it in a
> separate step.
> 
> Alex
> 
> On Wed, 24 May 2023 at 23:55, Charlie Johnston <[email protected]>
> wrote:
> 
>> 
>> Added a new packagefeed class that contains both a
>> packagegroup and the package index builds. This allows a
>> one-line bitbake for a packagegroup that defines a feed
>> without explicitly needing to run the package-index recipe.
>> 
>> Signed-off-by: Charlie Johnston <[email protected]>
>> ---
>> meta/classes/packagefeed.bbclass | 5 +++++
>> 1 file changed, 5 insertions(+)
>> create mode 100644 meta/classes/packagefeed.bbclass
>> 
>> diff --git a/meta/classes/packagefeed.bbclass
>> b/meta/classes/packagefeed.bbclass
>> new file mode 100644
>> index 0000000000..b83ac54f21
>> --- /dev/null
>> +++ b/meta/classes/packagefeed.bbclass
>> @@ -0,0 +1,5 @@
>> +#
>> +# Special case of packagegroup that includes package index builds.
>> +#
>> +
>> +inherit packagegroup package_index
>> --
>> 2.30.2
>> 
>> 
>> 
>> 
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181715): 
https://lists.openembedded.org/g/openembedded-core/message/181715
Mute This Topic: https://lists.openembedded.org/mt/99118888/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to