Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208047 - fdo-mime.eclass should depend on desktop-file-utils
Summary: fdo-mime.eclass should depend on desktop-file-utils
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Freedesktop bugs
: 568654 (view as bug list)
Depends on:
Reported: 2008-01-29 13:56 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2020-12-17 14:01 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---

fdo-mime.eclass-checks (fdo-mime.eclass-checks.out,12.80 KB, text/plain)
2008-05-07 08:49 UTC, Peter Volkov (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-01-29 13:56:46 UTC
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.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-01-29 14:00:48 UTC
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...
Comment 2 Rémi Cardona gentoo-dev 2008-01-29 14:31:33 UTC
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.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2008-01-29 15:40:09 UTC
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
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2008-05-07 08:49:42 UTC
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 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?
Comment 5 Gilles Dartiguelongue gentoo-dev 2010-08-13 20:16:17 UTC
*** Bug 332647 has been marked as a duplicate of this bug. ***
Comment 6 Gilles Dartiguelongue gentoo-dev 2015-05-25 15:52:56 UTC
Fixed in overlay. Thanks for reporting.
Comment 7 Gilles Dartiguelongue gentoo-dev 2015-05-25 15:55:07 UTC
Landed initial xdg eclass to clean this mess up in gnome overlay.
Comment 8 Alex Xu (Hello71) 2015-12-27 16:33:13 UTC
*** Bug 568654 has been marked as a duplicate of this bug. ***
Comment 9 Gilles Dartiguelongue gentoo-dev 2015-12-27 16:53:27 UTC
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.
Comment 10 Coacher 2016-08-29 14:51:48 UTC
(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.
Please do.
Comment 11 jospezial 2020-12-17 13:46:44 UTC
fdo-mime.eclass: Remove last-rited eclass

Please close.