When I define variable over multiple lines with backslash character ("\"), I found that the leading spaces stripping behavior is not consistent: The leading spaces will be stripped when definition is in .conf file, but they will be preserved when the definition is in .inc, .bb, .bbclass. e.g. I added the following definitions in different files: 1) meta/conf/bitbake.conf +ARF = "bitbake1" + +ARF_append = "\ + bitbake2 \ +" 2) meta/classes/autotools.bbclass +ARF_append = "\ + class1 \ +" 3) meta/conf/distro/include/default-versions.inc +ARF_append = "\ + inc1 \ +" 4) meta/recipes-core/ncurses/ncurses.inc +ARF_append = "\ + inc2 \ +" 5) meta/recipes-core/ncurses/ncurses_6.0+20170715.bb +ARF_append = "\ + bb1 \ +" Then run "bitbake -e" to see the result: $ bitbake -e ncurses # $ARF [7 operations] # _append /ala-lpggp51/jhuang0/builds/yp/y_all_171124/conf/local.conf:241 # "local1 " # _append /ala-lpggp51/jhuang0/builds/yp/poky/meta/conf/distro/include/default-versions.inc:11 # " inc1 " # set /ala-lpggp51/jhuang0/builds/yp/poky/meta/conf/bitbake.conf:879 # "bitbake1" # _append /ala-lpggp51/jhuang0/builds/yp/poky/meta/conf/bitbake.conf:883 # "bitbake2 " # _append /ala-lpggp51/jhuang0/builds/yp/poky/meta/classes/autotools.bbclass:260 # " class1 " # _append /ala-lpggp51/jhuang0/builds/yp/poky/meta/recipes-core/ncurses/ncurses.inc:318 # " inc2 " # _append /ala-lpggp51/jhuang0/builds/yp/poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb:16 # " bb1 " # pre-expansion value: # "bitbake1local1 inc1 bitbake2 class1 inc2 bb1 " ARF="bitbake1local1 inc1 bitbake2 class1 inc2 bb1 " According to the doc: http://www.yoctoproject.org/docs/2.4/bitbake-user-manual/bitbake-user-manual.html#line-joining """ Both the "\" character and the newline character that follow it are removed when joining lines. """ leading spaces stripping/removing is not mentioned in the bitbake user manual, so I don't know which behavior is expected, but I think at least they should have the same behavior.
There are two different parsers for the two difference sets of filetypes. I suspect this is some inconsistency between ConfHandler.py and BBHandler.py
Fixed on master branch: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2c15d8000dc2e2c09838a4bc7b76b0d8647e2a18