diff options
| author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2017-01-19 14:28:48 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-02 11:25:33 +0000 |
| commit | a779b1d9fbbecad1d62847c0907fa809f13b9c2f (patch) | |
| tree | c4a5f03ccf05d9c5e55af63331bb0948108cd23e /meta/classes/update-rc.d.bbclass | |
| parent | 68f020f368f725b1930b3d053ebf542ad1dd34bc (diff) | |
| download | poky-a779b1d9fbbecad1d62847c0907fa809f13b9c2f.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]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
| -rw-r--r-- | meta/classes/update-rc.d.bbclass | 20 |
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 | |||
| 37 | PACKAGE_WRITE_DEPS += "update-rc.d-native" | 37 | PACKAGE_WRITE_DEPS += "update-rc.d-native" |
| 38 | 38 | ||
| 39 | updatercd_postinst() { | 39 | updatercd_postinst() { |
| 40 | # Begin section update-rc.d | ||
| 41 | if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then | 40 | if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then |
| 42 | if [ -n "$D" ]; then | 41 | if [ -n "$D" ]; then |
| 43 | OPT="-r $D" | 42 | OPT="-r $D" |
| @@ -46,15 +45,12 @@ if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then | |||
| 46 | fi | 45 | fi |
| 47 | update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} | 46 | update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} |
| 48 | fi | 47 | fi |
| 49 | # End section update-rc.d | ||
| 50 | } | 48 | } |
| 51 | 49 | ||
| 52 | updatercd_prerm() { | 50 | updatercd_prerm() { |
| 53 | # Begin section update-rc.d | ||
| 54 | if ${@use_updatercd(d)} && [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then | 51 | if ${@use_updatercd(d)} && [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then |
| 55 | ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || : | 52 | ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || : |
| 56 | fi | 53 | fi |
| 57 | # End section update-rc.d | ||
| 58 | } | 54 | } |
| 59 | 55 | ||
| 60 | updatercd_postrm() { | 56 | updatercd_postrm() { |
| @@ -115,25 +111,13 @@ python populate_packages_updatercd () { | |||
| 115 | postinst = d.getVar('pkg_postinst_%s' % pkg) | 111 | postinst = d.getVar('pkg_postinst_%s' % pkg) |
| 116 | if not postinst: | 112 | if not postinst: |
| 117 | postinst = '#!/bin/sh\n' | 113 | postinst = '#!/bin/sh\n' |
| 118 | postinst = postinst.splitlines(True) | 114 | postinst += localdata.getVar('updatercd_postinst') |
| 119 | try: | ||
| 120 | index = postinst.index('# End section update-alternatives\n') | ||
| 121 | postinst.insert(index + 1, localdata.getVar('updatercd_postinst')) | ||
| 122 | except ValueError: | ||
| 123 | postinst.append(localdata.getVar('updatercd_postinst')) | ||
| 124 | postinst = ''.join(postinst) | ||
| 125 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 115 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
| 126 | 116 | ||
| 127 | prerm = d.getVar('pkg_prerm_%s' % pkg) | 117 | prerm = d.getVar('pkg_prerm_%s' % pkg) |
| 128 | if not prerm: | 118 | if not prerm: |
| 129 | prerm = '#!/bin/sh\n' | 119 | prerm = '#!/bin/sh\n' |
| 130 | prerm = prerm.splitlines(True) | 120 | prerm += localdata.getVar('updatercd_prerm') |
| 131 | try: | ||
| 132 | index = prerm.index('# Begin section update-alternatives\n') | ||
| 133 | prerm.insert(index, localdata.getVar('updatercd_prerm')) | ||
| 134 | except ValueError: | ||
| 135 | prerm.append(localdata.getVar('updatercd_prerm')) | ||
| 136 | prerm = ''.join(prerm) | ||
| 137 | d.setVar('pkg_prerm_%s' % pkg, prerm) | 121 | d.setVar('pkg_prerm_%s' % pkg, prerm) |
| 138 | 122 | ||
| 139 | postrm = d.getVar('pkg_postrm_%s' % pkg) | 123 | postrm = d.getVar('pkg_postrm_%s' % pkg) |
