summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-alternatives.bbclass
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2015-03-23 20:10:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-25 12:39:38 +0000
commit2a473ac17a6cb4857f18f9875ac84f59ee17cee4 (patch)
treec0eee1bb0e197284544f392154247cfa00188680 /meta/classes/update-alternatives.bbclass
parent8b8d8431a91533c44a0d24b2df3b919caeefca95 (diff)
downloadpoky-2a473ac17a6cb4857f18f9875ac84f59ee17cee4.tar.gz
update-alternatives.bbclass: alternatives should be removed in prerm
This behaviour matches dpkg's manpage and fixes deinstalling alternatives for programs needed by the postrm script, e.g. /bin/sh. (From OE-Core rev: 2a5484a90513b58c829a916bfe5268a0fde3512a) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-alternatives.bbclass')
-rw-r--r--meta/classes/update-alternatives.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 9f2c250d03..e6d78703a7 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -229,16 +229,16 @@ python populate_packages_updatealternatives () {
229 #bb.note('adding runtime requirement for update-alternatives for %s' % pkg) 229 #bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
230 d.appendVar('RDEPENDS_%s' % pkg, ' ' + d.getVar('MLPREFIX') + provider) 230 d.appendVar('RDEPENDS_%s' % pkg, ' ' + d.getVar('MLPREFIX') + provider)
231 231
232 bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg) 232 bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg)
233 bb.note('%s' % alt_setup_links) 233 bb.note('%s' % alt_setup_links)
234 postinst = d.getVar('pkg_postinst_%s' % pkg, True) or '#!/bin/sh\n' 234 postinst = d.getVar('pkg_postinst_%s' % pkg, True) or '#!/bin/sh\n'
235 postinst += alt_setup_links 235 postinst += alt_setup_links
236 d.setVar('pkg_postinst_%s' % pkg, postinst) 236 d.setVar('pkg_postinst_%s' % pkg, postinst)
237 237
238 bb.note('%s' % alt_remove_links) 238 bb.note('%s' % alt_remove_links)
239 postrm = d.getVar('pkg_postrm_%s' % pkg, True) or '#!/bin/sh\n' 239 prerm = d.getVar('pkg_prerm_%s' % pkg, True) or '#!/bin/sh\n'
240 postrm += alt_remove_links 240 prerm += alt_remove_links
241 d.setVar('pkg_postrm_%s' % pkg, postrm) 241 d.setVar('pkg_prerm_%s' % pkg, prerm)
242} 242}
243 243
244python package_do_filedeps_append () { 244python package_do_filedeps_append () {