mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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 <ionen@gentoo.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user