remove-pkg-postinst-ontarget: support other runtime packages

A recipe may generate different runtime packages, with names other than
PN. This commit allows removing the ontarget postinst script for those
other runtime package names. To do so, just define REMOVE_POSTINST_RPN
before including this class in the recipe.

The first user is in the following commit.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2023-05-04 10:22:06 +02:00
parent beb9fd02e6
commit 28f57c5fcd
1 changed files with 6 additions and 1 deletions

View File

@ -1,2 +1,7 @@
pkg_postinst_ontarget:${PN}() {
python __anonymous() {
RPN = d.getVar("REMOVE_POSTINST_RPN")
if RPN is None:
RPN = d.getVar("PN")
if RPN:
d.setVar('pkg_postinst_ontarget:%s' % RPN, "")
}