Mime Spec updates: Matching order and generic icons

David Faure dfaure at trolltech.com
Mon Mar 3 07:05:35 PST 2008


On Tuesday 29 January 2008, Alexander Larsson wrote:
> 
> On Mon, 2008-01-28 at 12:36 +0100, Alexander Larsson wrote:
> > Attached is an update to the shared mime specification that adds two
> > things:
> 
> Here is an updated version based on some feedback from david faure.
> Apart from typo fixes and such the difference is:
> 
> * No magic prio 80 special rule, as this is no longer needed with the
> new glob conflict resolution method.
> 
> * Renamed the glob priorities to "weight" to avoid the misunderstanding
> that the magic and glob priorities are in the same global priority
> scheme.
> 
> * Added description of new file formats
> 
> * Emphasizes that the icon and generic-icon data is availible in the
> per-type xml file (as well as in the icons and generic-icons files)

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!

1.20         (talex    05-Mar-03):              g_set_error(error, MIME_ERROR, 0,
1.20         (talex    05-Mar-03):                      _("Unknown freedesktop.org field '%s'"),
1.20         (talex    05-Mar-03):                      field->name);

I suggest making it a warning at least -- or removing that else clause completely,
to allow future changes in the mime spec.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the xdg mailing list