All of lore.kernel.org
 help / color / mirror / Atom feed
* Using PACKAGECONFIG
@ 2015-04-09 13:45 Gary Thomas
  2015-04-09 14:16 ` Paul Eggleton
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-04-09 13:45 UTC (permalink / raw)
  To: Yocto Project

I'm trying to extend PACKAGECONFIG for a recipe (vlc).  The
main recipe contains this:
   PACKAGECONFIG ?= " live555"
   PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
   PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
   PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
   PACKAGECONFIG[live555] = "--enable-live555,--disable-live555,live555"
   PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
   PACKAGECONFIG[mkv] = "--enable-mkv,--disable-mkv,libmatroska libebml"
   PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc,libpostproc"
   PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv"
   PACKAGECONFIG[libva] = "--enable-libva --enable-avcodec,--disable-libva --disable-avcodec,libva libav"

I'd like to only add "libva" to the default, so I wrote this
in my local.conf:
   PACKAGECONFIG_pn-vlc_append = " libva"
Inspecting it
   $ bitbake vlc -e | grep ^PACKAGECONFIG
   PACKAGECONFIG=" libva"

Oops.  Just to be sure, I tried
   PACKAGECONFIG_pn-vlc = "live555 libva"
which gives
   $ bitbake vlc -e | grep ^PACKAGECONFIG
   PACKAGECONFIG="live555 libva"

Note: I tried
   PACKAGECONFIG_append_pn-vlc = " libva"
which does work.  However, I've also used
   PACKAGECONFIG_pn-chromium_append = " component-build"
for a different recipe that does work... VERY CONFUSED

What am I doing wrong?  How do I correctly add to the default list?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using PACKAGECONFIG
  2015-04-09 13:45 Using PACKAGECONFIG Gary Thomas
@ 2015-04-09 14:16 ` Paul Eggleton
  2015-04-09 14:22   ` Paul Eggleton
  2015-04-09 14:35   ` Gary Thomas
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Eggleton @ 2015-04-09 14:16 UTC (permalink / raw)
  To: Gary Thomas; +Cc: yocto

Hi Gary,

On Thursday 09 April 2015 07:45:47 Gary Thomas wrote:
> I'm trying to extend PACKAGECONFIG for a recipe (vlc).  The
> main recipe contains this:
>    PACKAGECONFIG ?= " live555"
>    PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
>    PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
>    PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
>    PACKAGECONFIG[live555] = "--enable-live555,--disable-live555,live555"
>    PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
>    PACKAGECONFIG[mkv] = "--enable-mkv,--disable-mkv,libmatroska libebml"
>    PACKAGECONFIG[postproc] =
> "--enable-postproc,--disable-postproc,libpostproc" PACKAGECONFIG[opencv] =
> "--enable-opencv,--disable-opencv,opencv" PACKAGECONFIG[libva] =
> "--enable-libva --enable-avcodec,--disable-libva --disable-avcodec,libva
> libav"
> 
> I'd like to only add "libva" to the default, so I wrote this
> in my local.conf:
>    PACKAGECONFIG_pn-vlc_append = " libva"
> Inspecting it
>    $ bitbake vlc -e | grep ^PACKAGECONFIG
>    PACKAGECONFIG=" libva"
> 
> Oops.  Just to be sure, I tried
>    PACKAGECONFIG_pn-vlc = "live555 libva"
> which gives
>    $ bitbake vlc -e | grep ^PACKAGECONFIG
>    PACKAGECONFIG="live555 libva"
> 
> Note: I tried
>    PACKAGECONFIG_append_pn-vlc = " libva"
> which does work.  However, I've also used
>    PACKAGECONFIG_pn-chromium_append = " component-build"
> for a different recipe that does work... VERY CONFUSED
> 
> What am I doing wrong?  How do I correctly add to the default list?

In general, for a conditional append, you must use _append_<override> - the 
other way around will not do an append, AFAIK it will just set the value.

There are some other valid options that you didn't mention above:

1) Set it outright to list all of the options you want instead of appending. 
At least you know exactly what is going into the value. (I know some people 
don't like this.)

2) Set it using += or _append from a bbappend.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using PACKAGECONFIG
  2015-04-09 14:16 ` Paul Eggleton
@ 2015-04-09 14:22   ` Paul Eggleton
  2015-04-09 14:35   ` Gary Thomas
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2015-04-09 14:22 UTC (permalink / raw)
  To: Gary Thomas; +Cc: yocto

On Thursday 09 April 2015 15:16:58 Paul Eggleton wrote:
> Hi Gary,
> 
> On Thursday 09 April 2015 07:45:47 Gary Thomas wrote:
> > I'm trying to extend PACKAGECONFIG for a recipe (vlc).  The
> > 
> > main recipe contains this:
> >    PACKAGECONFIG ?= " live555"
> >    PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
> >    PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
> >    PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
> >    PACKAGECONFIG[live555] = "--enable-live555,--disable-live555,live555"
> >    PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
> >    PACKAGECONFIG[mkv] = "--enable-mkv,--disable-mkv,libmatroska libebml"
> >    PACKAGECONFIG[postproc] =
> > 
> > "--enable-postproc,--disable-postproc,libpostproc" PACKAGECONFIG[opencv] =
> > "--enable-opencv,--disable-opencv,opencv" PACKAGECONFIG[libva] =
> > "--enable-libva --enable-avcodec,--disable-libva --disable-avcodec,libva
> > libav"
> > 
> > I'd like to only add "libva" to the default, so I wrote this
> > 
> > in my local.conf:
> >    PACKAGECONFIG_pn-vlc_append = " libva"
> > 
> > Inspecting it
> > 
> >    $ bitbake vlc -e | grep ^PACKAGECONFIG
> >    PACKAGECONFIG=" libva"
> > 
> > Oops.  Just to be sure, I tried
> > 
> >    PACKAGECONFIG_pn-vlc = "live555 libva"
> > 
> > which gives
> > 
> >    $ bitbake vlc -e | grep ^PACKAGECONFIG
> >    PACKAGECONFIG="live555 libva"
> > 
> > Note: I tried
> > 
> >    PACKAGECONFIG_append_pn-vlc = " libva"
> > 
> > which does work.  However, I've also used
> > 
> >    PACKAGECONFIG_pn-chromium_append = " component-build"
> > 
> > for a different recipe that does work... VERY CONFUSED
> > 
> > What am I doing wrong?  How do I correctly add to the default list?
> 
> In general, for a conditional append, you must use _append_<override> - the
> other way around will not do an append, AFAIK it will just set the value.
> 
> There are some other valid options that you didn't mention above:
> 
> 1) Set it outright to list all of the options you want instead of appending.
> At least you know exactly what is going into the value. (I know some people
> don't like this.)
> 
> 2) Set it using += or _append from a bbappend.

(although I hasten to add, += from a bbappend will only work if the original 
value is set with ?= rather than ??=... probably safest to stick with _append)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using PACKAGECONFIG
  2015-04-09 14:16 ` Paul Eggleton
  2015-04-09 14:22   ` Paul Eggleton
@ 2015-04-09 14:35   ` Gary Thomas
  1 sibling, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2015-04-09 14:35 UTC (permalink / raw)
  To: yocto

On 2015-04-09 08:16, Paul Eggleton wrote:
> Hi Gary,
>
> On Thursday 09 April 2015 07:45:47 Gary Thomas wrote:
>> I'm trying to extend PACKAGECONFIG for a recipe (vlc).  The
>> main recipe contains this:
>>     PACKAGECONFIG ?= " live555"
>>     PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
>>     PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
>>     PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
>>     PACKAGECONFIG[live555] = "--enable-live555,--disable-live555,live555"
>>     PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
>>     PACKAGECONFIG[mkv] = "--enable-mkv,--disable-mkv,libmatroska libebml"
>>     PACKAGECONFIG[postproc] =
>> "--enable-postproc,--disable-postproc,libpostproc" PACKAGECONFIG[opencv] =
>> "--enable-opencv,--disable-opencv,opencv" PACKAGECONFIG[libva] =
>> "--enable-libva --enable-avcodec,--disable-libva --disable-avcodec,libva
>> libav"
>>
>> I'd like to only add "libva" to the default, so I wrote this
>> in my local.conf:
>>     PACKAGECONFIG_pn-vlc_append = " libva"
>> Inspecting it
>>     $ bitbake vlc -e | grep ^PACKAGECONFIG
>>     PACKAGECONFIG=" libva"
>>
>> Oops.  Just to be sure, I tried
>>     PACKAGECONFIG_pn-vlc = "live555 libva"
>> which gives
>>     $ bitbake vlc -e | grep ^PACKAGECONFIG
>>     PACKAGECONFIG="live555 libva"
>>
>> Note: I tried
>>     PACKAGECONFIG_append_pn-vlc = " libva"
>> which does work.  However, I've also used
>>     PACKAGECONFIG_pn-chromium_append = " component-build"
>> for a different recipe that does work... VERY CONFUSED
>>
>> What am I doing wrong?  How do I correctly add to the default list?
>
> In general, for a conditional append, you must use _append_<override> - the
> other way around will not do an append, AFAIK it will just set the value.
>
> There are some other valid options that you didn't mention above:
>
> 1) Set it outright to list all of the options you want instead of appending.
> At least you know exactly what is going into the value. (I know some people
> don't like this.)
>
> 2) Set it using += or _append from a bbappend.

Thanks for the explanation - I'll make sure to use the correct
form from now on (and fix my incorrect uses for chromium!)

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-09 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-09 13:45 Using PACKAGECONFIG Gary Thomas
2015-04-09 14:16 ` Paul Eggleton
2015-04-09 14:22   ` Paul Eggleton
2015-04-09 14:35   ` Gary Thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.