public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] dbus: use ${PN} in pkg_postinst instead of 'dbus'
@ 2026-04-10  8:26 martin.jansa
  0 siblings, 0 replies; only message in thread
From: martin.jansa @ 2026-04-10  8:26 UTC (permalink / raw)
  To: openembedded-core; +Cc: Martin Jansa

From: Martin Jansa <martin.jansa@gmail.com>

All pkg_postinst in oe-core where the package name matches the recipe
name use ${PN} already.

We have a bbclass used by some recipes which does:
pkg_postinst:${PN}:append()
which works reasonably well for most of the recipes, except for dbus
where it causes:

WARNING: meta/recipes-core/dbus/dbus_1.16.2.bb:
  Variable key pkg_postinst:${PN} (...)
  replaces original key pkg_postinst:dbus (...)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 meta/recipes-core/dbus/dbus_1.14.10.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/dbus/dbus_1.14.10.bb b/meta/recipes-core/dbus/dbus_1.14.10.bb
index 4fe7af7512..ffbf0780ed 100644
--- a/meta/recipes-core/dbus/dbus_1.14.10.bb
+++ b/meta/recipes-core/dbus/dbus_1.14.10.bb
@@ -109,7 +109,7 @@ FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadi
 RDEPENDS:${PN}-ptest += "bash make dbus"
 
 PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
-pkg_postinst:dbus() {
+pkg_postinst:${PN}() {
 	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
         if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
 		if [ -n "$D" ]; then


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-10  8:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10  8:26 [PATCH] dbus: use ${PN} in pkg_postinst instead of 'dbus' martin.jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox