summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Privoznik <michal.privoznik@gmail.com>2024-12-01 09:02:51 +0100
committerSam James <sam@gentoo.org>2024-12-01 10:41:41 +0000
commita7c5977386e494a8987e14eda4fc545ad845869d (patch)
tree4cc6d76038e98759a98a8e02966a8cfc3ed7303b
parentapp-emulation/virt-manager: Fix shebang of installed files (diff)
downloadgentoo-a7c5977386e494a8987e14eda4fc545ad845869d.tar.gz
gentoo-a7c5977386e494a8987e14eda4fc545ad845869d.tar.bz2
gentoo-a7c5977386e494a8987e14eda4fc545ad845869d.zip
app-emulation/virt-manager: Move bits of pkg_preinst() into src_install()
Firstly, there's no need to call gnome2_pkg_preinst() explicitly as it'll be called due to ebuild inheriting gnome2 eclass. Secondly, setting GNOME2_ECLASS_ICONS variable is so EAPI5 (read obsolete), so drop it as gnome2_pkg_preinst() handles that. Thirdly, removing files in pkg_preinst() is undesirable. Therefore, drop the code that handles 'if use gui', and move the code that handles the other case into src_install(). Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/39532 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--app-emulation/virt-manager/virt-manager-5.0.0.ebuild13
-rw-r--r--app-emulation/virt-manager/virt-manager-9999.ebuild13
2 files changed, 6 insertions, 20 deletions
diff --git a/app-emulation/virt-manager/virt-manager-5.0.0.ebuild b/app-emulation/virt-manager/virt-manager-5.0.0.ebuild
index f9c68ca57cc2..f2095898d5d0 100644
--- a/app-emulation/virt-manager/virt-manager-5.0.0.ebuild
+++ b/app-emulation/virt-manager/virt-manager-5.0.0.ebuild
@@ -70,22 +70,15 @@ src_configure() {
src_install() {
meson_src_install
- python_fix_shebang "${ED}"
-}
-
-pkg_preinst() {
- if use gui ; then
- gnome2_pkg_preinst
-
- cd "${ED}" || die
- export GNOME2_ECLASS_ICONS=$(find 'usr/share/virt-manager/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null || die)
- else
+ if ! use gui ; then
rm -r "${ED}/usr/share/virt-manager/ui/" || die
rm -r "${ED}/usr/share/virt-manager/icons/" || die
rm -r "${ED}/usr/share/icons/" || die
rm -r "${ED}/usr/share/applications/virt-manager.desktop" || die
rm -r "${ED}/usr/bin/virt-manager" || die
fi
+
+ python_fix_shebang "${ED}"
}
pkg_postinst() {
diff --git a/app-emulation/virt-manager/virt-manager-9999.ebuild b/app-emulation/virt-manager/virt-manager-9999.ebuild
index f9c68ca57cc2..f2095898d5d0 100644
--- a/app-emulation/virt-manager/virt-manager-9999.ebuild
+++ b/app-emulation/virt-manager/virt-manager-9999.ebuild
@@ -70,22 +70,15 @@ src_configure() {
src_install() {
meson_src_install
- python_fix_shebang "${ED}"
-}
-
-pkg_preinst() {
- if use gui ; then
- gnome2_pkg_preinst
-
- cd "${ED}" || die
- export GNOME2_ECLASS_ICONS=$(find 'usr/share/virt-manager/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null || die)
- else
+ if ! use gui ; then
rm -r "${ED}/usr/share/virt-manager/ui/" || die
rm -r "${ED}/usr/share/virt-manager/icons/" || die
rm -r "${ED}/usr/share/icons/" || die
rm -r "${ED}/usr/share/applications/virt-manager.desktop" || die
rm -r "${ED}/usr/bin/virt-manager" || die
fi
+
+ python_fix_shebang "${ED}"
}
pkg_postinst() {