It runs update-mime-database and update-desktop-database, it _would_ be a nice idea to depend on the package providing those.
I know the eclass was maintained by foser, but as he has been retired, I suppose freedesktop team might consider fixing this.
By the way it would also be nice if there was a predefined pkg_postinst running the two of those, saving us from having to write one just for that...
I think we'd already talked about it with Samuli a while back (when I first started hacking on the gnome2.eclass VDB issue) and I think we'd said that the current status quo (the eclass checks whether it's installed without explicitly depending on it) was good enough.
Of course, as I don't have a particularly strong argument about the current situation, I don't mind reconsidering it :) We'd just have to find out what the implications of dep'ing on it are going to be.
I don't have a strong opinion on depending them, might as well if you feel it's required.
Adding the postinst and postrm functions are somewhat more tricky, would break applications inheriting foo and then fdo-mime, the postinst of foo would not be executed if fdo-mime inherits after.. just saying the obvious
Created attachment 152223 [details]
This attachment contains output of script I've used to gather some relevant to this bug information. It lists ebuild which inherit fdo-mime eclass and after ebuild name outputs the following infromation:
1. the eclass function used in the ebuild - either fdo-mime_desktop_database_update or fdo-mime_mime_database_update;
2. where it is used and if the corresponding package is codependent:
i - in pkg_postinstall;
I - in pkg_postinstall and corresponded package is dependent;
r - in pkg_postrm;
R - in pkg_postrm and corresponded package is dependent;
* - pkg_* function with correspondent ebuild function is absent.
What we can obtain from this file:
1. Most ebuilds use only one of two files. This means that they need only
either x11-misc/shared-mime-info or dev-util/desktop-file-utils installed. Not
2. Very few ebuild have said packages in DEPEND, but they still works. The
reason for this, is twofold: a) that on normal desktop system we have
x11-misc/xdg-utils installed (e.g. as the dependency of cups or some other
packages http://tinderbox.dev.gentoo.org/misc/rindex/x11-misc/xdg-utils) and
b) eclass itself does not issue any error if mime or desktop database is not
Now, taking above into account I think that the only way to fix this mess
(yes, this is mess as there is not consistency in usage of this eclass and
most packages does not defind anything in pkg_postrm...) is to define a bit
different api for eclass. I suggest to add
(like depend.apache.eclass does) functions which will populate required
DEPENDS and call fdo-mime_desktop_database_update or
fdo-mime_mime_database_update functions in pkg_postinst pkg_postrm if relevant
need_update_* was called. The first never tested atm reimplemenation of this
eclass is here:
What others fell about this solution?
*** Bug 332647 has been marked as a duplicate of this bug. ***
Fixed in overlay. Thanks for reporting.
Landed initial xdg eclass to clean this mess up in gnome overlay.
*** Bug 568654 has been marked as a duplicate of this bug. ***
So, xdg and xdg-utils eclasses have been commited for a few weeks now. If nobody sees any objection with its current form as a replacement for fdo-mime, I will push a patch to repoman to add a deprecation warning so devs can start migrating to xdg* eclasses.
(In reply to Gilles Dartiguelongue from comment #9)
> If nobody sees any objection with its current form as a replacement for
> fdo-mime, I will push a patch to repoman to add a deprecation warning so
> devs can start migrating to xdg* eclasses.
fdo-mime.eclass: Remove last-rited eclass