aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/update-rc.d.bbclass
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-01-19 14:28:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-06 10:11:42 +0000
commitf56966d06330d1561245d0ae050389b3a0491216 (patch)
treef5e33e68a3e554ddd82b51364d296e22d7094cf0 /meta/classes/update-rc.d.bbclass
parent8401db8eb3beca12fd76da2448f99a61c3383a33 (diff)
downloadopenembedded-core-f56966d06330d1561245d0ae050389b3a0491216.tar.gz
Revert "classes: Fix alternatives and rc.d ordering"
This kludge is not needed anymore, now that syslog packages (or any other package) don't use update-alternatives for managing SysV init scripts. This reverts commit fc89a3f739ff25306ea91d9bdb424fc8389bdf72. [YOCTO #10944] (cherry picked from commit 7cb951a803deca151344d905bf2fab038e72e0d0) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
-rw-r--r--meta/classes/update-rc.d.bbclass20
1 files changed, 2 insertions, 18 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index c3fefea5af..e1e0e04876 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -37,7 +37,6 @@ fi
PACKAGE_WRITE_DEPS += "update-rc.d-native"
updatercd_postinst() {
-# Begin section update-rc.d
if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-r $D"
@@ -46,15 +45,12 @@ if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
fi
update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
fi
-# End section update-rc.d
}
updatercd_prerm() {
-# Begin section update-rc.d
if ${@use_updatercd(d)} && [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
fi
-# End section update-rc.d
}
updatercd_postrm() {
@@ -115,25 +111,13 @@ python populate_packages_updatercd () {
postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst = postinst.splitlines(True)
- try:
- index = postinst.index('# End section update-alternatives\n')
- postinst.insert(index + 1, localdata.getVar('updatercd_postinst'))
- except ValueError:
- postinst.append(localdata.getVar('updatercd_postinst'))
- postinst = ''.join(postinst)
+ postinst += localdata.getVar('updatercd_postinst')
d.setVar('pkg_postinst_%s' % pkg, postinst)
prerm = d.getVar('pkg_prerm_%s' % pkg)
if not prerm:
prerm = '#!/bin/sh\n'
- prerm = prerm.splitlines(True)
- try:
- index = prerm.index('# Begin section update-alternatives\n')
- prerm.insert(index, localdata.getVar('updatercd_prerm'))
- except ValueError:
- prerm.append(localdata.getVar('updatercd_prerm'))
- prerm = ''.join(prerm)
+ prerm += localdata.getVar('updatercd_prerm')
d.setVar('pkg_prerm_%s' % pkg, prerm)
postrm = d.getVar('pkg_postrm_%s' % pkg)