From cea0e7e9372804723ecee46c4bb0c145c1128063 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Tue, 10 Jun 2025 02:47:29 -0400 Subject: [PATCH] x11-misc/xkeyboard-config: fix collision workaround for binpkgs Was hoping to "do nothing at all" when not needed, but cannot test the current system in src_install for binpkgs. fwiw, we can still avoid touching ${EROOT} for nothing unless xkb is a directory (still with -f in case users did anything weird with permissions). Also revbump just in case binpkgs were made already either with or without the previous version of the workaround. Closes: https://bugs.gentoo.org/957712 Signed-off-by: Ionen Wolkens --- ...onfig-2.45.ebuild => xkeyboard-config-2.45-r1.ebuild} | 9 ++++----- x11-misc/xkeyboard-config/xkeyboard-config-9999.ebuild | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) rename x11-misc/xkeyboard-config/{xkeyboard-config-2.45.ebuild => xkeyboard-config-2.45-r1.ebuild} (89%) diff --git a/x11-misc/xkeyboard-config/xkeyboard-config-2.45.ebuild b/x11-misc/xkeyboard-config/xkeyboard-config-2.45-r1.ebuild similarity index 89% rename from x11-misc/xkeyboard-config/xkeyboard-config-2.45.ebuild rename to x11-misc/xkeyboard-config/xkeyboard-config-2.45-r1.ebuild index 374525fd7ec8b..f887a3b0e8ece 100644 --- a/x11-misc/xkeyboard-config/xkeyboard-config-2.45.ebuild +++ b/x11-misc/xkeyboard-config/xkeyboard-config-2.45-r1.ebuild @@ -69,14 +69,13 @@ src_install() { meson_src_install # Workaround for portage's collision checks, see pkg_preinst (bug #957712) - if has_version "<${CATEGORY}/${PN}-2.45"; then - mv "${ED}"/usr/share/X11/xkb{,.workaround} || die - fi + mv "${ED}"/usr/share/X11/xkb{,.workaround} || die } pkg_preinst() { - if [[ -L ${ED}/usr/share/X11/xkb.workaround ]]; then + # Avoid touching EROOT if not needed, and use -f just-in-case anyway + if [[ -d ${EROOT}/usr/share/X11/xkb ]]; then rm -rf "${EROOT}"/usr/share/X11/xkb || die - mv "${ED}"/usr/share/X11/xkb{.workaround,} || die fi + mv "${ED}"/usr/share/X11/xkb{.workaround,} || die } diff --git a/x11-misc/xkeyboard-config/xkeyboard-config-9999.ebuild b/x11-misc/xkeyboard-config/xkeyboard-config-9999.ebuild index 374525fd7ec8b..f887a3b0e8ece 100644 --- a/x11-misc/xkeyboard-config/xkeyboard-config-9999.ebuild +++ b/x11-misc/xkeyboard-config/xkeyboard-config-9999.ebuild @@ -69,14 +69,13 @@ src_install() { meson_src_install # Workaround for portage's collision checks, see pkg_preinst (bug #957712) - if has_version "<${CATEGORY}/${PN}-2.45"; then - mv "${ED}"/usr/share/X11/xkb{,.workaround} || die - fi + mv "${ED}"/usr/share/X11/xkb{,.workaround} || die } pkg_preinst() { - if [[ -L ${ED}/usr/share/X11/xkb.workaround ]]; then + # Avoid touching EROOT if not needed, and use -f just-in-case anyway + if [[ -d ${EROOT}/usr/share/X11/xkb ]]; then rm -rf "${EROOT}"/usr/share/X11/xkb || die - mv "${ED}"/usr/share/X11/xkb{.workaround,} || die fi + mv "${ED}"/usr/share/X11/xkb{.workaround,} || die }