[oe] how to add file to SRC_URI for target only

Chris Larson clarson at kergoth.com
Mon Aug 30 18:31:28 UTC 2010


On Mon, Aug 30, 2010 at 11:18 AM, Esben Haabendal
<esbenhaabendal at gmail.com>wrote:

> On Mon, Aug 30, 2010 at 7:07 PM, Chris Larson <clarson at kergoth.com> wrote:
> > On Mon, Aug 30, 2010 at 9:52 AM, Esben Haabendal
> > <esbenhaabendal at gmail.com>wrote:
> >
> >> On Thu, Aug 26, 2010 at 4:27 PM, Chris Larson <clarson at kergoth.com>
> wrote:
> >>
> >> > Okay, how about..
> >> >
> >> > OVERRIDES =. "${@['', 'target:']['${BPN}' == '${PN}']}"
> >>
> >> I can also think of at least one way to do this without using anonymous
> >> code.
> >>
> >> In base.bbclass:
> >> RECIPE_TYPE = "target"
> >> OVERRIDES =. "${RECIPE_TYPE}"
> >>
> >> In native.bbclass:
> >> RECIPE_TYPE = "native"
> >>
> >> In cross.bbclass:
> >> RECIPE_TYPE = "cross"
> >
> >
> > And nativesdk, and sdk, and crosssdk, and cross-canadian, and.. ;)
>
> Exactly.  But that is about it. The number of recipe types are really
> quite limited.
>
> This type of override is quite similar to the virtclass-* overrides,
> just that it can be used independent on what recipe type is the
> original one (not virtual).
>
> Anyway, I were merely illustrating that a more efficient solution is
> there, and could even be argued to be "cleaner" than the alternative.
> Of-course, the last part is quite subjective, so anyone is free to
> disagree.


The logic already exists.  SPECIAL_PKGSUFFIX has to have current information
about the suffixes in order for BPN to be correct.  It seems pretty silly to
duplicate it, but whatever works.
-- 
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