From 4a6a280072bb6e6cb93b18f5a376e429de2d4968 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Dec 04 2019 18:42:18 +0000 Subject: Issue 50758 - Enable CLI arg completion Description: We need to make sure the bash_completion package is installed, and that we call activate-global-python-argcomplete in %post relates: https://pagure.io/389-ds-base/issue/50758 Reviewed by: mhonek, and firstyear(Thanks!) --- diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in index 53f3a0b..ec635b3 100644 --- a/rpm/389-ds-base.spec.in +++ b/rpm/389-ds-base.spec.in @@ -304,6 +304,7 @@ Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-argcomplete Requires: python%{python3_pkgversion}-libselinux Requires: python%{python3_pkgversion}-setuptools +Requires: bash-completion %{?python_provide:%python_provide python%{python3_pkgversion}-lib389} %description -n python%{python3_pkgversion}-lib389 @@ -467,6 +468,9 @@ if ! make DESTDIR="$RPM_BUILD_ROOT" check; then cat ./test-suite.log && false; f rm -rf $RPM_BUILD_ROOT %post +# activate arg completion for CLI tools +activate-global-python-argcomplete > /dev/null + if [ -n "$DEBUGPOSTTRANS" ] ; then output=$DEBUGPOSTTRANS output2=${DEBUGPOSTTRANS}.upgrade