mime.bbclass: change postrm to prerm
A message that is not in the archive (sent off-list or not yet received): [email protected]
please ignore this patch, I will send a V2 to fix this problem
Quoted 64 lines · Changqing Li
From: Changqing Li <[email protected]>
fix error during post uninstall:
%postun(shared-mime-info-data-2.0-r0.4.corei7_64): execv(/bin/sh) pid 78
+ '[' 0 = 0 ']'
+ set -e
+ '[' x '!=' x ']'
+ echo 'Updating MIME database... this may take a while.'
Updating MIME database... this may take a while.
+ update-mime-database/usr/share/mime
Directory '/usr/share/mime/packages' does not exist! %postun(shared-mime-info-data-2.0-r0.4.corei7_64): waitpid(78) rc 78 status 100
warning: %postun(shared-mime-info-data-2.0-r0.4.corei7_64) scriptlet failed, exit status 1when run post uninstall scriptlet,
/usr/share/mime/packageshas been removed during unintall, while update-mime-database need to use/usr/share/mime/packages/freedesktop.org.xmlcorrect by change postrm to prerm
Signed-off-by Changqing Li <[email protected]>--- meta/classes/mime.bbclass | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)meta/classes/mime.bbclass +7
-7@@ -17,7 +17,7 @@ else fi } -mime_postrm() { +mime_prerm() { if [ "x$D" != "x" ]; then $INTERCEPT_DIR/postinst_intercept update_mime_database ${PKG} \ mlprefix=${MLPREFIX} \@@ -42,17 +42,17 @@ python populate_packages_append () { mimes_types_found = True break if mimes_types_found: - bb.note("adding mime postinst and postrm scripts to %s" % pkg) + bb.note("adding mime postinst and prerm scripts to %s" % pkg) postinst = d.getVar('pkg_postinst_%s' % pkg) if not postinst: postinst = '#!/bin/sh\n' postinst += d.getVar('mime_postinst') d.setVar('pkg_postinst_%s' % pkg, postinst) - postrm = d.getVar('pkg_postrm_%s' % pkg) - if not postrm: - postrm = '#!/bin/sh\n' - postrm += d.getVar('mime_postrm') - d.setVar('pkg_postrm_%s' % pkg, postrm) + prerm = d.getVar('pkg_prerm_%s' % pkg) + if not prerm: + prerm = '#!/bin/sh\n' + prerm += d.getVar('mime_prerm') + d.setVar('pkg_prerm_%s' % pkg, prerm) if pkg != 'shared-mime-info-data': bb.note("adding shared-mime-info-data dependency to %s" % pkg) d.appendVar('RDEPENDS_' + pkg, " " + d.getVar('MLPREFIX')+"shared-mime-info-data")