[oe-commits] [openembedded-core] 26/44: update-alternatives.bbclass: refuse to manage SysV init scripts

git at git.openembedded.org git at git.openembedded.org
Sat Dec 2 11:26:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 061fa614cec49deb0374ccadf3013e5cc8ad2c51
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Mon Dec 5 13:35:16 2016 +0200

    update-alternatives.bbclass: refuse to manage SysV init scripts
    
    Sanity check for future packages.
    
    [YOCTO #10944]
    
    Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
---
 meta/classes/update-alternatives.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list