aboutsummaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-12-05 13:35:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-02 11:24:36 +0000
commit061fa614cec49deb0374ccadf3013e5cc8ad2c51 (patch)
tree12ac984a2470d5f922e9afc8e985abfe79cfb990 /meta
parent7cb951a803deca151344d905bf2fab038e72e0d0 (diff)
downloadopenembedded-core-061fa614cec49deb0374ccadf3013e5cc8ad2c51.zip
openembedded-core-061fa614cec49deb0374ccadf3013e5cc8ad2c51.tar.gz
openembedded-core-061fa614cec49deb0374ccadf3013e5cc8ad2c51.tar.bz2
update-alternatives.bbclass: refuse to manage SysV init scripts
Sanity check for future packages. [YOCTO #10944] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/update-alternatives.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 65cae70..aa01058 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -143,6 +143,10 @@ python perform_packagecopy_append () {
if not alt_link:
alt_link = "%s/%s" % (d.getVar('bindir'), alt_name)
d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link)
+ if alt_link.startswith(os.path.join(d.getVar('sysconfdir', True), 'init.d')):
+ # Managing init scripts does not work (bug #10433), foremost
+ # because of a race with update-rc.d
+ bb.fatal("Using update-alternatives for managing SysV init scripts is not supported")
alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name)
alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link