]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox: Put klogd/syslogd alternative links in syslog package
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Sep 2018 16:39:31 +0000 (17:39 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Sep 2018 17:00:00 +0000 (18:00 +0100)
Currently these are in ${PN} and ${PN}-syslog may get replaced by
other packages but update-alternatives would error in the postinst
if other files were installed first. Avoid the problems by putting
the links in the correct package.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/busybox/busybox.inc

index 77aa54137659b5f8cda11525b78d4f1387d01ef9..c02e0623e375732fc2652011b5028f4c566359d3 100644 (file)
@@ -371,7 +371,10 @@ python do_package_prepend () {
             # Match coreutils
             if alt_name == '[':
                 alt_name = 'lbracket'
-            d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
+            if alt_name == 'klogd' or alt_name == 'syslogd':
+                d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' ' + alt_name)
+            else:
+                d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
             d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
             if os.path.exists('%s%s' % (dvar, target)):
                 d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target)