diff options
-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 |