busybox: Put klogd/syslogd alternative links in syslog package

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.

(From OE-Core rev: ef11c54ba99af261a70ec31091216cdd1556da24)

(From OE-Core rev: a0afcd457af14c3bf3a74514be0e8a029a4fcf63)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2018-09-05 17:39:31 +01:00
parent 7c3899304b
commit 0e75b95e00

View File

@@ -368,7 +368,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)