commit:     088dc7e449590f3616870d1fb08b945183c25e68
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Fri Jun  7 00:20:32 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Jun  7 06:25:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=088dc7e4

app-shells/bash-completion: fix QA warnings for unusable completions

Remove some more completions we don't have a good reason to ship. They
are either solaris-specific or require packages we don't ship.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...999.ebuild => bash-completion-2.14.0-r1.ebuild} | 40 +++++++++++++---------
 .../bash-completion/bash-completion-9999.ebuild    |  9 +++++
 2 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/app-shells/bash-completion/bash-completion-9999.ebuild 
b/app-shells/bash-completion/bash-completion-2.14.0-r1.ebuild
similarity index 82%
copy from app-shells/bash-completion/bash-completion-9999.ebuild
copy to app-shells/bash-completion/bash-completion-2.14.0-r1.ebuild
index 61c35185dad9..7878ba323bf0 100644
--- a/app-shells/bash-completion/bash-completion-9999.ebuild
+++ b/app-shells/bash-completion/bash-completion-2.14.0-r1.ebuild
@@ -3,16 +3,23 @@
 
 EAPI=8
 
+BASHCOMP_P=bashcomp-2.0.3
 PYTHON_COMPAT=( python3_{10..12} )
 
-inherit autotools git-r3 python-any-r1
+inherit python-any-r1
 
 DESCRIPTION="Programmable Completion for bash"
 HOMEPAGE="https://github.com/scop/bash-completion";
-EGIT_REPO_URI="https://github.com/scop/bash-completion";
+SRC_URI="
+       
https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
+       eselect? (
+               
https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
+       )
+"
 
 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"
 IUSE="+eselect test"
 RESTRICT="!test? ( test )"
 
@@ -60,8 +67,18 @@ strip_completions() {
                # 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.
+               arch
        )
 
+       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} ||
@@ -82,24 +99,12 @@ pkg_setup() {
        use test && python-any-r1_pkg_setup
 }
 
-src_unpack() {
-       use eselect && git-r3_fetch https://github.com/projg2/bashcomp2
-       git-r3_fetch
-
-       use eselect && git-r3_checkout https://github.com/projg2/bashcomp2 \
-               "${WORKDIR}"/bashcomp2
-       git-r3_checkout
-}
-
 src_prepare() {
        if use eselect; then
-               # generate and apply patch
-               emake -C "${WORKDIR}"/bashcomp2 
bash-completion-blacklist-support.patch
-               eapply 
"${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch
+               eapply 
"${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
        fi
 
        default
-       eautoreconf
 }
 
 src_test() {
@@ -150,8 +155,9 @@ src_install() {
 
        # install the eselect module
        if use eselect; then
-               emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" \
-                       PREFIX="${EPREFIX}/usr" install
+               insinto /usr/share/eselect/modules
+               doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
+               doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
        fi
 }
 

diff --git a/app-shells/bash-completion/bash-completion-9999.ebuild 
b/app-shells/bash-completion/bash-completion-9999.ebuild
index 61c35185dad9..0cb1ec461db8 100644
--- a/app-shells/bash-completion/bash-completion-9999.ebuild
+++ b/app-shells/bash-completion/bash-completion-9999.ebuild
@@ -60,8 +60,17 @@ strip_completions() {
                # 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} ||

Reply via email to