]> code.ossystems Code Review - openembedded-core.git/commitdiff
connman: fix build-time warning with sysvinit
authorMaxin B. John <maxin.john@intel.com>
Tue, 20 Jun 2017 08:35:40 +0000 (11:35 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Jun 2017 14:51:59 +0000 (15:51 +0100)
Due to recent modifications related to systemd, sysvinit builds began
to show this warning:

WARNING: connman-1.34-r0 do_package: connman: NOT adding alternative
provide /etc/resolv.conf: /etc/resolv-conf.connman does not exist

Fix this warning by making those updates specific to systemd.

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-connectivity/connman/connman.inc

index ab18f2fe01b88b21ae196766a8b67a3153527ec5..7e05c8017d77dff9234b108a28861e07bb1c5010 100644 (file)
@@ -70,9 +70,9 @@ SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
 SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service"
 
 ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} ="resolv-conf"
-ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.connman"
-ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
+ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
+ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}"
+ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
 
 do_install_append() {
        if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then