diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-12-05 13:35:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-02 11:25:33 +0000 |
commit | 4958d810aacb124ad21be8f3736a224e433817dc (patch) | |
tree | e8694fa0fddce62f7aa1f49922227717c0cd7ca4 /meta/classes/update-alternatives.bbclass | |
parent | a779b1d9fbbecad1d62847c0907fa809f13b9c2f (diff) | |
download | poky-4958d810aacb124ad21be8f3736a224e433817dc.tar.gz |
update-alternatives.bbclass: refuse to manage SysV init scripts
Sanity check for future packages.
[YOCTO #10944]
(From OE-Core rev: 061fa614cec49deb0374ccadf3013e5cc8ad2c51)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-alternatives.bbclass')
-rw-r--r-- | meta/classes/update-alternatives.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass index 65cae7002f..aa01058cf9 100644 --- a/meta/classes/update-alternatives.bbclass +++ b/meta/classes/update-alternatives.bbclass | |||
@@ -143,6 +143,10 @@ python perform_packagecopy_append () { | |||
143 | if not alt_link: | 143 | if not alt_link: |
144 | alt_link = "%s/%s" % (d.getVar('bindir'), alt_name) | 144 | alt_link = "%s/%s" % (d.getVar('bindir'), alt_name) |
145 | d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link) | 145 | d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link) |
146 | if alt_link.startswith(os.path.join(d.getVar('sysconfdir', True), 'init.d')): | ||
147 | # Managing init scripts does not work (bug #10433), foremost | ||
148 | # because of a race with update-rc.d | ||
149 | bb.fatal("Using update-alternatives for managing SysV init scripts is not supported") | ||
146 | 150 | ||
147 | alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name) | 151 | alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name) |
148 | alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link | 152 | alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link |