[bitbake-devel] Bug with task variable overrides

Denys Dmytriyenko denis at denix.org
Thu Nov 3 00:30:50 UTC 2011


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




More information about the bitbake-devel mailing list