]> code.ossystems Code Review - openembedded-core.git/commitdiff
update-alternatives.bbclass: alternatives should be removed in prerm
authorAndreas Oberritter <obi@opendreambox.org>
Mon, 23 Mar 2015 19:10:51 +0000 (20:10 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 24 Mar 2015 10:07:59 +0000 (10:07 +0000)
This behaviour matches dpkg's manpage and fixes deinstalling
alternatives for programs needed by the postrm script, e.g. /bin/sh.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/update-alternatives.bbclass

index 9f2c250d03879d64a02ad56c195312343cb26f9d..e6d78703a71a45652499f28e9dff9331d5a107eb 100644 (file)
@@ -229,16 +229,16 @@ python populate_packages_updatealternatives () {
                 #bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
                 d.appendVar('RDEPENDS_%s' % pkg, ' ' + d.getVar('MLPREFIX') + provider)
 
-            bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
+            bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg)
             bb.note('%s' % alt_setup_links)
             postinst = d.getVar('pkg_postinst_%s' % pkg, True) or '#!/bin/sh\n'
             postinst += alt_setup_links
             d.setVar('pkg_postinst_%s' % pkg, postinst)
 
             bb.note('%s' % alt_remove_links)
-            postrm = d.getVar('pkg_postrm_%s' % pkg, True) or '#!/bin/sh\n'
-            postrm += alt_remove_links
-            d.setVar('pkg_postrm_%s' % pkg, postrm)
+            prerm = d.getVar('pkg_prerm_%s' % pkg, True) or '#!/bin/sh\n'
+            prerm += alt_remove_links
+            d.setVar('pkg_prerm_%s' % pkg, prerm)
 }
 
 python package_do_filedeps_append () {