Mime Spec updates: Matching order and generic icons

Thomas Leonard talex5 at gmail.com
Tue Mar 4 10:43:52 PST 2008

On 03/03/2008, David Faure <dfaure at trolltech.com> wrote:
> OUCH, update-mime-database is not forward-compatible with new elements in mime xml files?
>  It errors out instead of ignoring them:
>  $ update-mime-database ~/.local/share/mime
>  * Error in type 'application/futuresplash'
>  *   (in /home/dfaure/.local/share/mime/packages/application-futuresplash.xml):
>  *   Unknown freedesktop.org field 'icon'.
>  (and then it does not generate $HOME/.local/share/mime/globs, so this is a real error and not just a warning.
>  I note that it exits with an exit code of 0 though...)
>  This is not good! It means that any mimetype xml file I generate now with an icon field,
>  will break for users who have not upgraded to the future version of update-mime-database
>  which will include support for the icon field!

It is indeed a bug. However, it's easy to work around, because it
stops processing a MIME entry at the point it sees an element it
doesn't understand. So, put the new element at the end of the type's
definition and the output will be generated correctly.

Dr Thomas Leonard		http://rox.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1

More information about the xdg mailing list