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
 * Ebuilds which are still using the fdo-mime sorted by Maintainer or Package http://gentoo.levelnine.at/simplechecks/fdo-mime-check/

.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.


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

How other distributions handle this

 * Arch Linux uses trigger, which detect the folder activity automatic and update on demand: https://www.archlinux.org/pacman/alpm-hooks.5.html
 * Debian (for example update-desktop-database) https://wiki.debian.org/DpkgTriggers