From 8500601f39e8620e82c694b6ce0425863ce6709b Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Fri, 8 Aug 2014 05:42:52 -0400 Subject: [PATCH] syslog-ng: fix a multilib build failure and a QA issue * Use BPN instead of PN to fix the multilib build failure: ERROR: Function failed: SYSTEMD_SERVICE_lib32-syslog-ng value lib32-syslog-ng.service does not exist * Do not add syslog-init for systemd to fix the QA issue: WARNING: syslog-ng: alternative target (/etc/init.d/syslog or /etc/init.d/syslog.syslog-ng) does not exist, skipping... WARNING: syslog-ng: NOT adding alternative provide /etc/init.d/syslog: /etc/init.d/syslog.syslog-ng does not exist WARNING: alt_link == alt_target: /etc/init.d/syslog == /etc/init.d/syslog (From meta-openembedded rev: 4d3f0e3f13213d07dcad35e6bdae552d70d95638) Signed-off-by: Jackie Huang Signed-off-by: Martin Jansa Signed-off-by: Patrick Ohly --- .../meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc index 3cedba6..57976b3 100644 --- a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc +++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc @@ -84,11 +84,17 @@ RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${PN}.service" - -ALTERNATIVE_${PN} = "syslog-init" -ALTERNATIVE_PRIORITY[syslog-init] = "200" -ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" +SYSTEMD_SERVICE_${PN} = "${BPN}.service" + +# no syslog-init for systemd +python () { + if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split(): + pn = d.getVar('PN', True) + sysconfdir = d.getVar('sysconfdir', True) + d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init') + d.setVarFlag('ALTERNATIVE_PRIORITY', 'syslog-init', '200') + d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir)) +} INITSCRIPT_NAME = "syslog" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." -- 2.7.4