Reputation: 61
For the given example:
Existing recipe: [some-yocto-upstream-thing_1.0.bb]
do_configure_prepend () {
<necessary logic>
}
BBCLASSEXTEND = "native nativesdk"
I'm creating a bbappend to this recipe which needs to have a function I wrote be called before the do_configure_prepend gets called. But I only want this function called for the class-target and not for class-native build.
I can create a do_configure_prepend_class-target, but that overrides the recipe version (during class-target builds). But then the existing needed logic won't be run.
I can create a custom task to be called before do_configure_prepend (via addtask) but this is then called for class-native, too (unwanted).
Any ideas? I'd prefer to avoid just overriding an earlier built-in task (do_patch, etc.) since the upstream recipe could eventually define one and I'd be breaking it.
Upvotes: 4
Views: 3082
Reputation: 8981
No, using
do_configure_prepend_class-target () {
<necessary logic>
}
should work. For class-target
, do_configure
will be prepended by your code.
One example of such a prepend with override is in OE-Core/go.inc.
Upvotes: 2