]> code.ossystems Code Review - openembedded-core.git/commit
mime.bbclass: fix post install scriptlet error
authorChangqing Li <changqing.li@windriver.com>
Fri, 19 Jun 2020 09:11:12 +0000 (17:11 +0800)
committerSteve Sakoman <steve@sakoman.com>
Fri, 26 Jun 2020 21:53:05 +0000 (11:53 -1000)
commit24f4f4551d220030c0f847c648a49a15bf1fe6eb
tree67f38b777555161a4b389532c3d5d02404d7e0f1
parentb1d0eacc431517695c348ad14f4452be607c0b62
mime.bbclass: fix post install scriptlet error

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 1

when run post uninstall scriptlet, /usr/share/mime/packages has been
removed during unintall, while update-mime-database will check xml under
/usr/share/mime/packages.

workaround by create this dir before update, then remove it

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6f262a316d6c32ff9ce96ab4bd95726772b5f20f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/mime.bbclass