summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-alternatives.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2019-06-26 15:40:21 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-27 12:20:36 +0100
commit8d22a45cdd97e14e1c8f9f0410406c4c1e0a0950 (patch)
tree6828ab3010502cee1548932d650e8f81d446c952 /meta/classes/update-alternatives.bbclass
parentc60759b2e42a2e775c6f5482640dcacd4a04b478 (diff)
downloadpoky-8d22a45cdd97e14e1c8f9f0410406c4c1e0a0950.tar.gz
update-alternatives.bbclass: run update-alternatives firstly in postinst script
Recipes like postfix run command newaliases in postinst, but newaliases is installed as newaliases.postfix, it needs run update-alternatives to update it to newaliases, so there was an error when installed postinst on target. Fixed: $ opkg install postfix Configuring postfix. ///var/lib/opkg/info/postfix.postinst: line 4: newaliases: command not found Run update-alternatives firstly will fix the problem. (From OE-Core rev: 52c36dd869c605c0065c17f9ed502a319ce3dd84) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-alternatives.bbclass')
-rw-r--r--meta/classes/update-alternatives.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index b702e77ee5..8c2b66e7f1 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -284,8 +284,11 @@ python populate_packages_updatealternatives () {
284 284
285 bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg) 285 bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg)
286 bb.note('%s' % alt_setup_links) 286 bb.note('%s' % alt_setup_links)
287 postinst = d.getVar('pkg_postinst_%s' % pkg) or '#!/bin/sh\n' 287 postinst = d.getVar('pkg_postinst_%s' % pkg)
288 postinst += alt_setup_links 288 if postinst:
289 postinst = alt_setup_links + postinst
290 else:
291 postinst = '#!/bin/sh\n' + alt_setup_links
289 d.setVar('pkg_postinst_%s' % pkg, postinst) 292 d.setVar('pkg_postinst_%s' % pkg, postinst)
290 293
291 bb.note('%s' % alt_remove_links) 294 bb.note('%s' % alt_remove_links)