[bitbake-devel] Bug with task variable overrides

Daniel Lazzari dlazzari at leapfrog.com
Thu Nov 3 00:44:12 UTC 2011


>From: Denys Dmytriyenko [mailto:denis at denix.org]
>Sent: Wednesday, November 02, 2011 5:31 PM
>To: Daniel Lazzari

>On Wed, Nov 02, 2011 at 10:54:31PM +0000, Daniel Lazzari wrote:
>> I recently tried to use per task overrides for several variables and
>ran
>> into a bug. If the task name has an underscore in it, the overrides
>won't
>> work properly. Here's a quick test case I did using Angstrom oe-core:
>>
>> MYVAR = "apples"
>> MYVAR_task-my_task = "oranges"
>>
>> LICENSE = ""
>>
>> do_my_task() {
>>                 echo ${MYVAR}
>> }
>>
>> addtask my_task before do_fetch
>>
>> After running the task, the log for the task shows "apples" when it
>should
>> show "oranges". My work around so far is not to use underscores in my
>task
>> name, but that makes the task name look pretty unreadable. I tried to
>see if
>> I could figure out a quick fix but the data_smart stuff looks pretty
>> complicated and I don't have a lot of time to spend on this. If
>there's a
>> place where you want me to file a proper bug report, just let me know.
>
>Daniel,
>
>As far as I know, it's a known limitation and was there for many years.
>It's
>not straightforward to parse override names with underscores, as you can
>combine multiple overrides, plus there are additional keywords like
>append and
>prepend, that are used the same way. E.g.
>MYVAR_append_distro_arch_soc_mach_pn.
>It's recommended to use dashes instead of underscores for variable
>values,
>such as DISTRO="angstrom-2010.x", MACHINE="am37x-evm", PN="linux-libc-
>headers"
>etc., so they are safe to use as overrides. Not with task/function
>names,
>though.
>
>--
>Denys

That makes sense. Thanks for the explanation. Is this limitation in the bitbake manual? I don't remember seeing it there (though I probably don't have the latest one) and I think it would save others a lot of time trying to track something like this down.




More information about the bitbake-devel mailing list