[oe] How to force a bash-function to be inserted in the package

Andreas Mueller schnitzeltony at gmx.de
Fri Jul 16 22:52:26 UTC 2010


I am working on a scenario where two recipes (powervr-drivers: libgles-omap3 / omap3-sgx-modules) should share the same code at the pkg_postinst state (I want to select if the cpu supports 
sgx and select the proper version of module/lib 2.x 3.x 5.x only once and forever). To avoid redundant code I added a function in a file both recipes include. In the recipes I simply say 

pkg_postinst_${PN}_prepend() {
	check_cpu_for_sgx ${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
}

check_cpu_for_sgx is the function included in both recipes.

I did not run this so far (I haven't got a hardware right now to test) but I expect this not to work because the function check_cpu_for_sgx will not be included the packet information (I checked I 
didn't find this function in the files of the package).

Now my question:

Is there something (e.g a keyword prepended to the function) which forces oe to include a function in the postinst/postrm code?




More information about the Openembedded-devel mailing list