On Sunday 03 August 2014 02:56:04 Robert P. J. Day wrote: > On Sat, 2 Aug 2014, Khem Raj wrote: > > On 14-08-02 15:57:00, Robert P. J. Day wrote: > > > On Sat, 2 Aug 2014, Khem Raj wrote: > > > > On Sat, Aug 2, 2014 at 9:34 AM, Robert P. J. Day <rpj...@crashcourse.ca> wrote: > > > > > say, pkg_prerm() functions would never be written with respect to > > > > > the > > > > > variable ${D}, which would be relevant only during image creation. > > > > > but > > > > > i can see things like this in sysklogd.inc: > > > > > > > > > > pkg_prerm_${PN} () { > > > > > > > > > > if test "x$D" = "x"; then > > > > > > > > note that its not ${D} (bitbake context) but $D which is evaluated > > > > in the context when the script is run. > > > > > > > i still don't understand ... what are the possible values of $D > > > > > > here, and what would they represent? > > > > At build time it will not be expanded by bitbake like ${D} is. but > > during image creation it will be. But when doing on-device install > > of this package $D will be empty. Its a way to differentiate actions > > during image creation and on-device install/update/remove > > but the yocto dev manual states pretty clearly that pkg_prerm and > pkg_postrm functions are *not* used during image creation. so you're > saying they are? under what circumstances?
They wouldn't normally be. You could in theory issue some package removal commands as part of postprocessing on the image but I can't see much use for that given we have things like PACKAGE_EXCLUDE now. Khem was simply correcting your reference to ${D}. I can only imagine the example you gave is just belt-and-braces to make sure it could never be run outside the context of the real target. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core