question about EXPORT_FUNCTIONS from bitbake user manual
hoping that bitbake doc questions have been subsumed under the YP
docs mailing list ...
i'm reading the section, "Flexible Inheritance for Class Functions", here:
and i understand the point of examples like autotools.bbclass defining task functions like "autotools_do_install" so recipes that "inherit autotools" can define their own "do_install" function that, somewhere internally, calls "autotools_do_install".
but what if the recipe that inherits autotools does *not* define its
own do_install() function? would it still pick up the autotools_do_install? what if that recipe tried to:
do_install:append = ...
would that even make sense? which install function would it be appending to?
in short, while that section explains how to invoke the "base" task
function, it is not clear what happens if you don't invoke it that way, and just try to take advantage of the "default" do_install.
rday
Quoted 17 lines · Robert P. J. Day
hoping that bitbake doc questions have been subsumed under the YP
docs mailing list ...i'm reading the section, "Flexible Inheritance for Class Functions", here:
and i understand the point of examples like autotools.bbclass defining task functions like "
autotools_do_install" so recipes that "inherit autotools" can define their own "do_install" function that, somewhere internally, calls "autotools_do_install".but what if the recipe that inherits autotools does *not* define its
owndo_install()function? would it still pick up theautotools_do_install? what if that recipe tried to:
Quoted 8 lines
do_install:append = ...
would that even make sense? which install function would it be appending to?
in short, while that section explains how to invoke the "base" task
function, it is not clear what happens if you don't invoke it that way, and just try to take advantage of the "default"do_install.
If you have:
autotools_do_compile () {
:
}EXPORT_FUNCTIONS do_compile
then do_compile will be magically mapped to autotools_do_compile, if there is no do_compile function defined by anything.
If you have another similar class (lets say cmake) and have
inherit autotools cmake
then the last one is defined to "win" and do_compile would make to cmake_do_compile.
This allows for functions that could do this as well:
do_compile () {
autotools_do_compile
cmake_do_compile
}
Cheers,
Richard
Quoted 47 lines · Richard Purdie
Quoted 17 lines · Robert P. J. Day
hoping that bitbake doc questions have been subsumed under the YP
docs mailing list ...i'm reading the section, "Flexible Inheritance for Class Functions", here:
and i understand the point of examples like autotools.bbclass defining task functions like "
autotools_do_install" so recipes that "inherit autotools" can define their own "do_install" function that, somewhere internally, calls "autotools_do_install".but what if the recipe that inherits autotools does *not* define its
owndo_install()function? would it still pick up theautotools_do_install? what if that recipe tried to:Quoted 8 lines
do_install:append = ...
would that even make sense? which install function would it be appending to?
in short, while that section explains how to invoke the "base" task
function, it is not clear what happens if you don't invoke it that way, and just try to take advantage of the "default"do_install.If you have:
autotools_do_compile () { : }
EXPORT_FUNCTIONSdo_compilethen
do_compilewill be magically mapped toautotools_do_compile, if there is nodo_compilefunction defined by anything.If you have another similar class (lets say cmake) and have
inherit autotools cmake
then the last one is defined to "win" and
do_compilewould make tocmake_do_compile.This allows for functions that could do this as well:
Quoted 8 lines
do_compile() {
autotools_do_compile
cmake_do_compile
}Cheers,
Richard
ah, that clears things up, thanks. maybe i'll submit a patch to add
that to the doc.
rday