diff options
Diffstat (limited to 'meta/classes/mime.bbclass')
-rw-r--r-- | meta/classes/mime.bbclass | 13 |
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} |
25 | else | 25 | else |
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} | ||
38 | fi | ||
28 | fi | 39 | fi |
29 | } | 40 | } |
30 | 41 | ||