From 28f57c5fcd7ef6f651ab83b8c9aeb7d670f51e37 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 4 May 2023 10:22:06 +0200 Subject: [PATCH] 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 --- meta-digi-arm/classes/remove-pkg-postinst-ontarget.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta-digi-arm/classes/remove-pkg-postinst-ontarget.bbclass b/meta-digi-arm/classes/remove-pkg-postinst-ontarget.bbclass index dacb75498..c889790ff 100644 --- a/meta-digi-arm/classes/remove-pkg-postinst-ontarget.bbclass +++ b/meta-digi-arm/classes/remove-pkg-postinst-ontarget.bbclass @@ -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, "") }