Properly conditionalize bashcompdir contents

This commit is contained in:
Tomas Orsava 2017-09-01 16:28:36 +02:00
parent a18983a006
commit 2a788630f3

View File

@ -15,6 +15,8 @@
%endif
%endif
# Note that with disabled python3, bashcomp2 will be disabled as well because
# bashcompdir will point to a different path than with python3 enabled.
%global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d})
%if "%{bashcompdir}" != "%{_sysconfdir}/bash_completion.d"
%global bashcomp2 1
@ -254,6 +256,7 @@ py.test-%{python3_version} -m 'not network'
%dir %{bashcompdir}
%{bashcompdir}/pip
%if 0%{?bashcomp2}
%{bashcompdir}/pip2*
%dir %(dirname %{bashcompdir})
%endif
%endif # with python2