Notes on ebuilds with GUI

When this wiki page was started (2017-11-13), there was a lot confusion about how to write clean ebuilds for desktop applications. As result, there are many ebuilds which use obsolete eclasses, or even worse do not install, update and remove the icons and menus. The eclasses are hardly documented and the documentation has mistakes. Many for loops for icons miss the definition of the local variable.

xdg.eclass
eclass reference:


 * xdg inherits xdg-utils

xdg-utils.eclass
eclass reference:

gnome2.eclass
eclass reference:

gnome2-utils.eclass
eclass reference:

kde5.eclass
eclass reference:


 * kde5_pkg_preinst Function storing icon caches


 * kde5_pkg_postinst Function to rebuild the KDE System Configuration Cache after an application has been installed.


 * kde5_pkg_postrm Function to rebuild the KDE System Configuration Cache after an application has been removed.

fdo-mime.eclass (obsolete)
eclass reference:

fdo-mime is obsolete since 2017-06-19 see mail "[gentoo-dev] [PATCH] fdo-mime.eclass: Mark the eclass as deprecated".

See also.


 * Packages which are still using the fdo-mime https://qa-reports.gentoo.org/output/eclass-usage/fdo-mime.txt

How to fix ebuilds which still inherit fdo-mime?

 * 1) emerge the ebuild
 * 2) test with equery f, if files were installed in one of the special folders of the table on the bottom.
 * 3) remove inherit fdo-mime
 * 4) add the new eclasses accordingly to the table. Like inherit xdg-utils
 * 5) if fdo-mime functions were substituted with the same xdg-utils functions no revision bump is required. Else make a revision bump.
 * 6) test with repoman

.desktop files

 * .desktop_files

brainstorming section (delete later, when merged in the text)
This page provides a summary of various files whose installation should be accompanied by appropriate postinst/postrm trigger calls.


 * *1) Not needed in general, but still useful to use in phase defining eclasses, like gnome2.eclass.


 * Needs to be updated since some savelists are not needed
 * what about fonts?

Working principle of a trigger in bash

 * portage generates the QA warnings here: https://github.com/gentoo/portage/tree/master/bin/postinst-qa-check.d


 * Future_EAPI/Triggers