On Sun, Jun 21, 2009 at 09:05:28PM +0200, Antoine Jacoutot wrote:
> > Everything under share/mime is regenerated from the files in
> > share/mime/packages by update-mime-database. There's no point in
> > including this generated files into PLISTs, as they are regenerated
> > anyway, and as they may change when more files are added to
> > share/mime/packages.
> > The idea is to not only change shared-mime-info but also all ports
> > adding files to share/mime/packages and @exec'ing update-mime-database.
> > 
> > I'll send an example diff for a port (or two) in an hour.
> 
> Cool, because I still don't undertand :)

Nevermind, I tend to be confusing :-)

And I managed to confuse my self a little bit...

All I want to fix is the famous problem of bad checksums when
updating the shared-mime-info package. This happens whenever another
package like thunar-thumbnailers contains its own file in
share/mime/packages that overrides or extends mime-info entries
already in share/mime/packages/freedesktop.org.xml.

Try this: install shared-mime-info, then install thunar-thumbnailers,
then update shared-mime-info (with pkg_add -r -Fupdate,installed).

Some people suggested to `...@comment no checksum' entries like
share/mime/image/x-canon-crw.xml in shared-mime-info. espie@ objected,
because the mime-info stuff is too sensitive to be fiddled with by
other packages. I object, too, but for other reasons:

The only relevant information is stored in share/mime/packages,
everything else is rewritten with each package addition, deletion
and/or update (for packages using @exec/@unexec update-mime-database),
so IMHO the problem is *not* a broken update-mime-database (as
landry@ said some days ago, IIRC), but with the files generated
from packages/freedesktop.org.xml included in the shared-mime-info
package.

My diff changes that. And for the other ports, I just realized that
they already do the right thing: they include some
share/mime/frobnicate.xml and an @exec/@unexec update-mime-database
pair:

$ find /usr/ports -path \*/pkg/P\* ! -path \*/shared-mime-info/\* |
        xargs grep ^share/mime/.

So, other ports don't need changes, except maybe minimal cleanup
of the plist (removal of share/mime/ and share/mime/packages/).

Ciao,
        Kili

Reply via email to