Hi,
The recent updates to eog and file-roller say that they now update
the
MIME types cache, but (from discussions) I think the change is made
incorrectly.
Most, if not all, of our packages with .desktop files use
desktop-file-install in the %install stage of the RPM, i.e. at package
build time not package install time. The new
'--rebuild-mime-info-cache' option, however, needs to be supplied on
the target system, i.e. at package install time.
That's a very good point that
I don't think was considered. Basically,
--rebuild-mime-info-cache was designed to be a convenience, so that
all desktop file stuff could be be done in one run. All it does
is run update-desktop-database on the directory where the desktop
files are installed.
Like you point out, this isn't going to work though because
mime<->application associations need to be generated in %post to be
accurate and not shipped as part of the rpms.
What is the correct way to package a file that contains a MIME
handler? Where should the .desktop file be shipped in the manifest,
and what should the package %post scriptlet look like?
So, the best way to do this
is to just keep your %install section like
it was originally (without the --rebuild-mime-info-cache option to
desktop-file-install) and then put something like
update-desktop-database %{_datadir}/applications
in %post
--Ray Strode