app-shells/bash-completion: Sync with Gentoo

It's from Gentoo commit 6b2ec7c26bf0620fb5490e71a5e64cdc0c6dd7ae.
This commit is contained in:
Flatcar Buildbot 2024-07-16 11:18:24 +00:00 committed by Mathieu Tortuyaux
parent 6ae98a072d
commit 6b596ef880
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
2 changed files with 3 additions and 20 deletions

View File

@ -19,7 +19,7 @@ SRC_URI="
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
IUSE="+eselect test"
RESTRICT="!test? ( test )"

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
inherit autotools git-r3 python-any-r1
@ -56,26 +56,9 @@ strip_completions() {
# Now-dead symlinks to deprecated completions
hd ncal
# FreeBSD
freebsd-update kldload kldunload portinstall portsnap
pkg_deinstall pkg_delete pkg_info
# For GNU mailman, which isn't packaged. If mailman isn't installed,
# it triggers a QA warning.
)
if [[ ${CHOST} = *solaris* ]]; then
# Triggers QA warning since it only defines a completion on Solaris,
# to avoid defining a bad one on macOS.
strip_completions+=(pkgutil)
fi
local file
for file in "${strip_completions[@]}"; do
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
die "stripping ${file} failed"
done
rm -v "${strip_completions[@]/#/${ED}/usr/share/bash-completion/completions/}" || die
# remove deprecated completions (moved to other packages)
rm "${ED}"/usr/share/bash-completion/completions/_* || die