[oe] avoid addtask?

Chris Larson kergoth at gmail.com
Fri Dec 24 15:51:16 UTC 2010


On Fri, Dec 24, 2010 at 8:21 AM, Khem Raj <raj.khem at gmail.com> wrote:
> On Fri, Dec 24, 2010 at 12:33 AM, Frans Meulenbroeks
> <fransmeulenbroeks at gmail.com> wrote:
>> I was wondering whether it is better to avoid addtask where easily possible.
>>
>
> If the tasks are logically inline in existing tasks then it would be
> ok. Although I dont know the big O notation of
> runqueue algorithm to ascertain the gain.

Personally, I'd rather recipes stuck 100% to setting variables and
including files and inheriting classes, as simple and declarative as
possible, rather than changing behavior.  It shouldn't be their
responsibility.  I'd rather see the classes define tasks for common
things and let the recipes create the definitions for those tasks than
actually add their own, personally.

>> E.g. from one recipe:
>>
>> do_postpatch() {
>>        rm -rf patches && rm -rf .pc && mv -f debian/patches patches
>> && quilt push -av
>> }
>> addtask postpatch after do_patch before do_configure
>>
>>
>> Wouldn't it be simpler and probably even a little bit faster just to say:
>>
>> do_configure_prepend() {
>>        rm -rf patches && rm -rf .pc && mv -f debian/patches patches
>> && quilt push -av
>> }
>>
>
> Well this seems more like a patching task then configure to me.

I agree, this should likely just replace the patch task with its own
implementation.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics




More information about the Openembedded-devel mailing list