aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2014-08-08 05:42:52 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2014-08-11 11:00:42 +0200
commit4d3f0e3f13213d07dcad35e6bdae552d70d95638 (patch)
treeb462261fd870b2ccd036817a293bd44764a80b16
parentc0945057ff7dd2562f07bb579032218139397729 (diff)
downloadmeta-openembedded-contrib-4d3f0e3f13213d07dcad35e6bdae552d70d95638.tar.gz
meta-openembedded-contrib-4d3f0e3f13213d07dcad35e6bdae552d70d95638.tar.bz2
meta-openembedded-contrib-4d3f0e3f13213d07dcad35e6bdae552d70d95638.zip
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 Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-support/syslog-ng/syslog-ng.inc16
1 files changed, 11 insertions, 5 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index 3cedba65b2..57976b3a2a 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/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 ."