If you use recipetool setvar on an empty bbappend file you get a traceback: --------- snip --------- $ recipetool newappend ../meta-poky kbd ../meta-poky/recipes-core/kbd/kbd_2.0.3.bbappend $ recipetool setvar -r ../meta-poky/recipes-core/kbd/kbd_2.0.3.bbappend SOMEVAR "value" Traceback (most recent call last): File "/home/paul/poky/poky/scripts/recipetool", line 117, in <module> ret = main() File "/home/paul/poky/poky/scripts/recipetool", line 108, in main ret = args.func(args) File "/home/paul/poky/poky/scripts/lib/recipetool/setvar.py", line 52, in setvar patches = [oe.recipeutils.patch_recipe_file(args.recipefile, varvalues, patch=args.patch)] File "/home/paul/poky/poky/meta/lib/oe/recipeutils.py", line 279, in patch_recipe_file _, tolines = patch_recipe_lines(fromlines, values) File "/home/paul/poky/poky/meta/lib/oe/recipeutils.py", line 261, in patch_recipe_lines if tolines[-1].strip() != '': IndexError: list index out of range --------- snip --------- If the file has one or more lines no error is produced.
Fix merged to master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=25507bfa82fc3bc46624952f15278b491a85ad7d