diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-12-07 12:08:25 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-06 10:13:55 +0000 |
commit | 61ed8ab4357c03a336850e67ddc05f942806310f (patch) | |
tree | 74553acc22f5f5a148ba4d3c63668330b8e79016 | |
parent | a173395b8c98ca147bc9bbf840f9d9574d435b75 (diff) | |
download | poky-61ed8ab4357c03a336850e67ddc05f942806310f.tar.gz |
initscripts: don't use update-alternatives
Stop using update-alternatives for managing /etc/init.d/functions. Also,
make the initscripts-functions subpackage to (runtime) conflict with
lsbinitscripts.
[YOCTO #10944]
(From OE-Core rev: 2daffb998585a2f781cbbfb1a959379e01c40f0a)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
(cherry picked from commit cdcebd81c872cb7386c658998e27cf24e1d0447c)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/update-rc.d.bbclass | 3 | ||||
-rw-r--r-- | meta/conf/distro/include/default-providers.inc | 1 | ||||
-rw-r--r-- | meta/recipes-core/initscripts/initscripts_1.0.bb | 9 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 2 |
4 files changed, 6 insertions, 9 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index 9ba3daccaf..c3fefea5af 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass | |||
@@ -95,8 +95,7 @@ python populate_packages_updatercd () { | |||
95 | return | 95 | return |
96 | statement = "grep -q -w '/etc/init.d/functions' %s" % path | 96 | statement = "grep -q -w '/etc/init.d/functions' %s" % path |
97 | if subprocess.call(statement, shell=True) == 0: | 97 | if subprocess.call(statement, shell=True) == 0: |
98 | mlprefix = d.getVar('MLPREFIX') or "" | 98 | d.appendVar('RDEPENDS_' + pkg, ' initd-functions') |
99 | d.appendVar('RDEPENDS_' + pkg, ' %sinitscripts-functions' % (mlprefix)) | ||
100 | 99 | ||
101 | def update_rcd_package(pkg): | 100 | def update_rcd_package(pkg): |
102 | bb.debug(1, 'adding update-rc.d calls to preinst/postinst/prerm/postrm for %s' % pkg) | 101 | bb.debug(1, 'adding update-rc.d calls to preinst/postinst/prerm/postrm for %s' % pkg) |
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc index f54fdcd776..2b76c3c31d 100644 --- a/meta/conf/distro/include/default-providers.inc +++ b/meta/conf/distro/include/default-providers.inc | |||
@@ -56,3 +56,4 @@ PREFERRED_PROVIDER_nativesdk-openssl ?= "nativesdk-openssl" | |||
56 | PREFERRED_PROVIDER_pkgconfig ?= "pkgconfig" | 56 | PREFERRED_PROVIDER_pkgconfig ?= "pkgconfig" |
57 | PREFERRED_PROVIDER_nativesdk-pkgconfig ?= "nativesdk-pkgconfig" | 57 | PREFERRED_PROVIDER_nativesdk-pkgconfig ?= "nativesdk-pkgconfig" |
58 | PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconfig-native" | 58 | PREFERRED_PROVIDER_pkgconfig-native ?= "pkgconfig-native" |
59 | PREFERRED_RPROVIDER_initd-functions ?= "initscripts" | ||
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index fea4f22e95..1167735756 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb | |||
@@ -43,21 +43,18 @@ SRC_URI_append_arm = " file://alignment.sh" | |||
43 | 43 | ||
44 | KERNEL_VERSION = "" | 44 | KERNEL_VERSION = "" |
45 | 45 | ||
46 | inherit update-alternatives | ||
47 | DEPENDS_append = " update-rc.d-native" | 46 | DEPENDS_append = " update-rc.d-native" |
48 | PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" | 47 | PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" |
49 | 48 | ||
50 | PACKAGES =+ "${PN}-functions ${PN}-sushell" | 49 | PACKAGES =+ "${PN}-functions ${PN}-sushell" |
51 | RDEPENDS_${PN} = "${PN}-functions \ | 50 | RDEPENDS_${PN} = "initd-functions \ |
52 | ${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \ | 51 | ${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \ |
53 | " | 52 | " |
53 | RPROVIDES_${PN}-functions = "initd-functions" | ||
54 | RCONFLICTS_${PN}-functions = "lsbinitscripts" | ||
54 | FILES_${PN}-functions = "${sysconfdir}/init.d/functions*" | 55 | FILES_${PN}-functions = "${sysconfdir}/init.d/functions*" |
55 | FILES_${PN}-sushell = "${base_sbindir}/sushell" | 56 | FILES_${PN}-sushell = "${base_sbindir}/sushell" |
56 | 57 | ||
57 | ALTERNATIVE_PRIORITY_${PN}-functions = "90" | ||
58 | ALTERNATIVE_${PN}-functions = "functions" | ||
59 | ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions" | ||
60 | |||
61 | HALTARGS ?= "-d -f" | 58 | HALTARGS ?= "-d -f" |
62 | 59 | ||
63 | do_configure() { | 60 | do_configure() { |
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb index 884857a96d..22a0ecf839 100644 --- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | |||
@@ -68,7 +68,7 @@ FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" | |||
68 | FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5" | 68 | FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5" |
69 | FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit" | 69 | FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit" |
70 | 70 | ||
71 | RDEPENDS_${PN} += "sysvinit-pidof initscripts-functions" | 71 | RDEPENDS_${PN} += "sysvinit-pidof initd-functions" |
72 | 72 | ||
73 | CFLAGS_prepend = "-D_GNU_SOURCE " | 73 | CFLAGS_prepend = "-D_GNU_SOURCE " |
74 | export LCRYPT = "-lcrypt" | 74 | export LCRYPT = "-lcrypt" |