From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EFCD71581F3 for ; Sun, 1 Dec 2024 10:42:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3FFBEE07EF; Sun, 1 Dec 2024 10:42:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B29C6E07EF for ; Sun, 1 Dec 2024 10:42:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D3654340C7C for ; Sun, 1 Dec 2024 10:42:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 39E42F96 for ; Sun, 1 Dec 2024 10:42:46 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1733049701.a7c5977386e494a8987e14eda4fc545ad845869d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virt-manager/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/virt-manager/virt-manager-5.0.0.ebuild app-emulation/virt-manager/virt-manager-9999.ebuild X-VCS-Directories: app-emulation/virt-manager/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: a7c5977386e494a8987e14eda4fc545ad845869d X-VCS-Branch: master Date: Sun, 1 Dec 2024 10:42:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 19353fa6-5931-4110-9bff-2a181bb5a857 X-Archives-Hash: f935a38f28da03521bffa6a588686941 commit: a7c5977386e494a8987e14eda4fc545ad845869d Author: Michal Privoznik gmail com> AuthorDate: Sun Dec 1 08:02:51 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Dec 1 10:41:41 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7c59773 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 gmail.com> Closes: https://github.com/gentoo/gentoo/pull/39532 Signed-off-by: Sam James gentoo.org> app-emulation/virt-manager/virt-manager-5.0.0.ebuild | 13 +++---------- app-emulation/virt-manager/virt-manager-9999.ebuild | 13 +++---------- 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() {