Bug#647272: mailcap deprecated?

Josselin Mouette joss at debian.org
Sun Jan 1 23:11:53 UTC 2012


Le dimanche 01 janvier 2012 à 20:27 +0100, Lars Wilke a écrit : 
> Hm, if i understand correctly the script would have to do the following:
> 
> 1.   foreach file in /usr/share/applications/*.desktop
> 2.      look for MIME relevant entries in $file
> 3.      find the corrosponding MIME definitions in /usr/share/mime
> 4.      generate mailcap line

Absolutely. Note that you can also
use /usr/share/applications/mimeinfo.cache which has everything already
compiled.

> Questions:
> - How to handle /usr/share/mime/aliases and /usr/share/mimelnk?

One of the shortcomings of the mailcap system is its inability to handle
aliases, so you would have to generate one line per alias. It doesn’t
handle subclasses either, so you might want to generate lines for them
too, maybe with lower priorities.

> - Also the result would have to be merged with the mailcap file, as i.e. vim
>   has no corresponding .desktop file but has a /usr/lib/mime/packages entry.

You have two good options for that: 
      * make the script part of update-mime, so that it takes into
        account both databases (the difficulty is for handling
        duplicates); 
      * make the script part of dh_installmime, to generate entries
        in /usr/lib/mime/packages and let update-mime deal with them at
        installation time.

Cheers,
-- 
 .''`.      Josselin Mouette
: :' :
`. `'
  `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20120102/5874da15/attachment.pgp>


More information about the pkg-gnome-maintainers mailing list