[OE-core] [PATCH 22/36] package.bbclass: add support for pkg_postinst_ontarget()

Alexander Kanavin alexander.kanavin at linux.intel.com
Wed Feb 15 09:19:35 UTC 2017


On 02/15/2017 11:10 AM, Anders Darander wrote:
> Well, if the qemu emulation isn't working for a particular target, but
> might work for another target, the post_install script can't be moved to
> pkg_postinst_ontarget_${PN} anyway, it'll break ro-rootfs for the 2nd
> machine as well..

You still seem to misunderstand the purpose of _ontarget. It's meant 
only for situations where the script *has* to run on target, and not 
anything else. In particular, if qemu can be used, it should be; if it 
fails, the script is deferred to first boot.

>> because the post_install has to interact with target hardware.
>
> Sure, but this is really the minority of cases. In this case
> pkg_postinst_ontarget_${PN} might be OK, but I'm worried the it'll be
> used a lot more often, because it's simpler to deal with...

This will be discouraged (same way as 'exit 1 trick' is discouraged now 
if there's no clear reason for it); we do have patch reviews :)

Alex



More information about the Openembedded-core mailing list