Hello, There doesn't seem to be any documentation that explicitly mentions that you can append and prepend to functions. I suggest the following changes: Add this to the end of '3.1.8. Appending and Prepending (Override Style Syntax)': It is also possible to append and prepend to shell functions and BitBake-style Python functions. See [3.5.1. Shell Functions] and [3.5.2. BitBake Style Python Functions] for examples of how to do this. Add this to the end of '3.5.1. Shell Functions': Overrides and override-style operators like "_append" and "_prepend" can also be applied to shell functions. Most commonly, this would be used in a .bbappend to modify functions in the main recipe. It can also be used to modify functions inherited from classes. As an example, consider the following snippet: do_foo() { bbplain first fn } fn_prepend() { bbplain second } fn() { bbplain third } do_foo_append() { bbplain fourth } The output from do_foo would be the following: recipename do_foo: first recipename do_foo: second recipename do_foo: third recipename do_foo: fourth Note { Overrides and override-style operators can be applied to any shell function, not just [tasks](http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#tasks). } 'bitbake -e recipename' can be used to view the final assembled function after all overrides have been applied. Add this to the end of '3.5.2. BitBake Style Python Functions': Like with shell functions, overrides and override-style operators can also be applied to BitBake-style Python functions. As an example, consider the following snippet: python do_foo_prepend() { bb.plain("first") } python do_foo() { bb.plain("second") } python do_foo_append() { bb.plain("third") } The output from do_foo would be the following: recipename do_foo: first recipename do_foo: second recipename do_foo: third 'bitbake -e recipename' can be used to view the final assembled function after all overrides have been applied. Cheers, Ulf
Ulf, See http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#appending-and-prepending-override-style-syntax for the change to the "Appending and Prepending (Override Style Syntax)" section. See http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#shell-functions for the addition to the "Shell Functions" section. See http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#bitbake-style-python-functions for the change to the "BitBake Style Python Functions" section. thanks, Scott
Maybe Running do_foo prints the following sounds a bit better than The output from do_foo results in the following (in both places where it appears). Looks good to me otherwise. Thanks, Ulf
Got it. See http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#shell-functions and http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#bitbake-style-python-functions. I am going to set the bug to RESOLVED and put the doc flag into "done." Thanks, Scott