summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2020-06-19 17:11:12 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-02 16:12:36 +0100
commitc32e635b23faa840414acb3a49f7369770bf78bf (patch)
tree7649a3019fbc71b5fa146ad4784016c4041d0cc8 /meta/classes
parent9b60a175fc74dc65f2d9c4c4d8687d2303501dde (diff)
downloadpoky-c32e635b23faa840414acb3a49f7369770bf78bf.tar.gz
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 (From OE-Core rev: 24f4f4551d220030c0f847c648a49a15bf1fe6eb) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/mime.bbclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/classes/mime.bbclass b/meta/classes/mime.bbclass
index c9072adf3b..bb99bc35cb 100644
--- a/meta/classes/mime.bbclass
+++ b/meta/classes/mime.bbclass
@@ -24,7 +24,18 @@ if [ "x$D" != "x" ]; then
24 mimedir=${MIMEDIR} 24 mimedir=${MIMEDIR}
25else 25else
26 echo "Updating MIME database... this may take a while." 26 echo "Updating MIME database... this may take a while."
27 update-mime-database $D${MIMEDIR} 27 # $D${MIMEDIR}/packages belong to package shared-mime-info-data,
28 # packages like libfm-mime depend on shared-mime-info-data.
29 # after shared-mime-info-data uninstalled, $D${MIMEDIR}/packages
30 # is removed, but update-mime-database need this dir to update
31 # database, workaround to create one and remove it later
32 if [ ! -d $D${MIMEDIR}/packages ]; then
33 mkdir -p $D${MIMEDIR}/packages
34 update-mime-database $D${MIMEDIR}
35 rmdir --ignore-fail-on-non-empty $D${MIMEDIR}/packages
36 else
37 update-mime-database $D${MIMEDIR}
38fi
28fi 39fi
29} 40}
30 41