]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
connman: update-alternatives can't handle non-existing files
authorAndreas Oberritter <obi@opendreambox.org>
Wed, 28 Mar 2018 20:45:00 +0000 (22:45 +0200)
committerAndreas Oberritter <obi@opendreambox.org>
Thu, 2 Jul 2020 13:10:00 +0000 (15:10 +0200)
Remove update-alternatives handling completely. It was introduced
to handle read-only rootfs errors with systemd, but relied on
inappropriate use of IMAGE_FEATURES. The latter part has already
been reverted, leaving only boilerplate code around.

Observed with dpkg's version of update-alternatives.

This effectively reverts the following patches (from newest to oldest):

 577585375: connman.inc: do not check IMAGE_FEATURES
 2a0afa968: connman: fix build-time warning with sysvinit
 732e1f74b: connman: correct the systemd boot in read only rootfs

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/recipes-connectivity/connman/connman.inc

index 13900309cda6adce134e716633f3b825753f08b5..087af4f10cb6122aca88b4c655699eff505220a7 100644 (file)
@@ -13,7 +13,7 @@ LICENSE  = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
 
-inherit autotools pkgconfig systemd update-rc.d update-alternatives
+inherit autotools pkgconfig systemd update-rc.d
 
 DEPENDS  = "dbus glib-2.0 ppp readline"
 
@@ -63,11 +63,6 @@ SYSTEMD_SERVICE_${PN} = "connman.service"
 SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
 SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service"
 
-ALTERNATIVE_PRIORITY = "100"
-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
                install -d ${D}${sysconfdir}/init.d
@@ -88,11 +83,6 @@ do_install_append() {
        # Automake 1.12 won't install empty directories, but we need the
        # plugins directory to be present for ownership
        mkdir -p ${D}${libdir}/connman/plugins
-
-    # For read-only filesystem, do not create links during bootup
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman
-    fi
 }
 
 # These used to be plugins, but now they are core