[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Desktop standards, MIME info cache, and Lintian

On Sun, Dec 28, 2008, Russ Allbery wrote:
> 1. The update-desktop-database program used to be documented in the
>    desktop entry spec in version 0.9.5 and was removed in 0.9.6 (the
>    current version is 1.0).  Should I draw some conclusion from that?  Is
>    this program and cache likely to go away?  Is it still really used?
>    (It also seems odd that a cache regenerated from installed files is
>    written to /usr/share rather than in /var.)

 (I have no idea why it's not mentionned anymore.)  Yes, the program is
 still used; it's in charge of generating
       /usr/share/applications/mimeinfo.cache (and
 /usr/local/share/applications/mimeinfo.cache); these files may then be
 used by e.g. gio (in GLib) to map MIME types to .desktop files
 (really applications).  This can be used for example to open web
 objects with the correct application according to its MIME type, or via
 shared-mime-info + gio -- which allow mapping of a file's content or
 filename to a MIME type -- to open any file with an application
 handling this MIME type.

> 2. Should Lintian be continuing to recommend that people installing
>    *.desktop files call dh_desktop just in case, even if there are no
>    MimeType entries in the *.desktop files?  I've been leaning that way in
>    the past, but given how long it's been since dh_desktop was added and
>    given that it still doesn't do anything else, I wonder if this isn't
>    just noise.  I'm currently leaning towards removing the check for
>    dh_desktop in favor of only checking for update-desktop-database when
>    there are *.desktop files with MimeInfo unless someone tells me that's
>    a bad idea.

 I can see how it would be useful to recommend calling dh_desktop as
 soon as you distribute .desktop files just like it would be more useful
 if we could inject any rules in packages via cdbs or the new "dh".
 However, this is really packaging style and using an extensible
 packaging style shouldn't be imposed by a checker tool like lintian;
 I'm not aware of any different dh_desktop usage which would justify
 raising a warning right now.

 Also, would we have to do more things on .desktop files, we would have
 more options to implement them without requiring dh_desktop (triggers
 come to mind).

 So not raising a lintian warning when dh_desktop isn't called on
 .desktop file would be more to my taste.

> 3. Does the Shared MIME-info Database or the update-mime-info program have
>    anything to do with this?  I think I've convinced myself that they
>    don't, but I'd love confirmation from someone who works more intensely
>    in the desktop environment world than I.

 Not directly; they are used along this database.  The desktop file
 database only maps MIME types to .desktop files (applications really),
 and comes along a static list of applications which should be preferred
 for a MIME type (/usr/share/applications/defaults.list and friends).
 The Shared MIME Info database maps filenames and file contents patterns
 to MIME types.  These are often used together, but are distinct.

Loïc Minier

Reply to: