]> code.ossystems Code Review - openembedded-core.git/commit
package.bbclass: add support for pkg_postinst_ontarget()
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Mon, 29 Jan 2018 12:01:31 +0000 (14:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Jan 2018 23:08:12 +0000 (23:08 +0000)
commit229f4e975fb6957f44b5c56735fd6d58564098d7
tree3b8428bcc601828d3622633a0a1b6cf3b39e4bf1
parent939f7f1a06cd2db05aeb5e75a66322314e10aa6d
package.bbclass: add support for pkg_postinst_ontarget()

This function is a convenient and more readable shortcut for situations
when the postinst code always needs to run on target. All commands that
cannot be executed during cross-install and can only be run on target
should go into this function. They will only be executed on first boot
(if package was cross-installed) or immediately during package installation
on target.

Plain pkg_postinst() works as before: it is run during cross-install time,
it can contain a request to defer to first boot, and it is also run
during package installation on target.

Also fix the oeqa test for this functionality to use the new function
where appropriate.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-selftest/recipes-test/postinst/postinst_1.0.bb
meta/classes/package.bbclass