diff options
author | Koen Kooi <koen@openembedded.org> | 2008-12-04 12:17:24 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2008-12-04 12:17:24 +0100 |
commit | 50a66459545dc3491e0f5928a84353de2fbe830c (patch) | |
tree | 9f22326d4e9a9c09251fe20db2a3936eda5fa077 /classes/mime.bbclass | |
parent | 1b917c5f15ab572ee84956072dcd4ae0e0d342b4 (diff) |
mime.bbclass: check whether update-mime-database is executable before trying to call it and move prerm to postrm
Diffstat (limited to 'classes/mime.bbclass')
-rw-r--r-- | classes/mime.bbclass | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/classes/mime.bbclass b/classes/mime.bbclass index 791fbceb14..c8d3ef17a4 100644 --- a/classes/mime.bbclass +++ b/classes/mime.bbclass @@ -2,13 +2,23 @@ DEPENDS += "shared-mime-info-native shared-mime-info" mime_postinst() { if [ "$1" = configure ]; then - update-mime-database $D${datadir}/mime + if [ -x ${bindir}/update-mime-database ] ; then + update-mime-database $D${datadir}/mime + else + echo "Missing ${bindir}/update-mime-database, update of mime database failed!" + exit 1 + fi fi } -mime_prerm() { +mime_postrm() { if [ "$1" = remove ] || [ "$1" = upgrade ]; then - update-mime-database $D${datadir}/mime + if [ -x ${bindir}/update-mime-database ] ; then + update-mime-database $D${datadir}/mime + else + echo "Missing ${bindir}/update-mime-database, update of mime database failed!" + exit 1 + fi fi } |