commit:     6410deb61fa2ebd7adf5c82d7e9be941ab78a6d9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  9 03:12:29 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug  9 20:05:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6410deb6

sys-process/htop: drop back to xdg-utils.eclass

My own fault -- I didn't add a comment when I originally
inherited xdg-utils instead of xdg, and I broke it myself
later when changing to release tarballs!

See original commit for rationale.

Bug: https://bugs.gentoo.org/787470
Bug: https://bugs.gentoo.org/849422
Fixes: 20d5319d31378762c32b0b2344e24f37ffbaccd2
See: 1bf94ee45ca93a214be3fa2dda29b1d9fd90e0a9
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-process/htop/{htop-9999.ebuild => htop-3.2.1-r2.ebuild} | 12 ++++++++++--
 sys-process/htop/htop-9999.ebuild                           | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/sys-process/htop/htop-9999.ebuild 
b/sys-process/htop/htop-3.2.1-r2.ebuild
similarity index 87%
copy from sys-process/htop/htop-9999.ebuild
copy to sys-process/htop/htop-3.2.1-r2.ebuild
index 76b7ce3cb327..7d41590b84b1 100644
--- a/sys-process/htop/htop-9999.ebuild
+++ b/sys-process/htop/htop-3.2.1-r2.ebuild
@@ -5,7 +5,9 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{8..11} )
 
-inherit linux-info optfeature python-any-r1 xdg
+# We avoid xdg.eclass here because it'll pull in glib, desktop utils on
+# htop which is often used on headless machines. bug #787470
+inherit linux-info optfeature python-any-r1 xdg-utils
 
 DESCRIPTION="interactive process viewer"
 HOMEPAGE="https://htop.dev/ https://github.com/htop-dev/htop";
@@ -99,7 +101,13 @@ src_configure() {
 }
 
 pkg_postinst() {
-       xdg_pkg_postinst
+       xdg_desktop_database_update
+       xdg_icon_cache_update
 
        optfeature "Viewing processes accessing certain files" sys-process/lsof
 }
+
+pkg_postrm() {
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+}

diff --git a/sys-process/htop/htop-9999.ebuild 
b/sys-process/htop/htop-9999.ebuild
index 76b7ce3cb327..7d41590b84b1 100644
--- a/sys-process/htop/htop-9999.ebuild
+++ b/sys-process/htop/htop-9999.ebuild
@@ -5,7 +5,9 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{8..11} )
 
-inherit linux-info optfeature python-any-r1 xdg
+# We avoid xdg.eclass here because it'll pull in glib, desktop utils on
+# htop which is often used on headless machines. bug #787470
+inherit linux-info optfeature python-any-r1 xdg-utils
 
 DESCRIPTION="interactive process viewer"
 HOMEPAGE="https://htop.dev/ https://github.com/htop-dev/htop";
@@ -99,7 +101,13 @@ src_configure() {
 }
 
 pkg_postinst() {
-       xdg_pkg_postinst
+       xdg_desktop_database_update
+       xdg_icon_cache_update
 
        optfeature "Viewing processes accessing certain files" sys-process/lsof
 }
+
+pkg_postrm() {
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+}

Reply via email to