- Don't try to python-bytecompile our non-python *.py (#813651).
This commit is contained in:
parent
d1d1afae6d
commit
b0368872a1
@ -13,33 +13,32 @@ _filedir()
|
|||||||
_tilde "$cur" || return 0
|
_tilde "$cur" || return 0
|
||||||
|
|
||||||
local -a toks
|
local -a toks
|
||||||
local quoted tmp
|
local quoted x tmp
|
||||||
|
|
||||||
_quote_readline_by_ref "$cur" quoted
|
_quote_readline_by_ref "$cur" quoted
|
||||||
toks=( $(
|
x=$( compgen -d -- "$quoted" ) &&
|
||||||
compgen -d -- "$quoted" | {
|
|
||||||
while read -r tmp; do
|
while read -r tmp; do
|
||||||
# TODO: I have removed a "[ -n $tmp ] &&" before 'printf ..',
|
toks+=( "$tmp" )
|
||||||
# and everything works again. If this bug suddenly
|
done <<< "$x"
|
||||||
# appears again (i.e. "cd /b<TAB>" becomes "cd /"),
|
|
||||||
# remember to check for other similar conditionals (here
|
|
||||||
# and _filedir_xspec()). --David
|
|
||||||
printf '%s\n' $tmp
|
|
||||||
done
|
|
||||||
}
|
|
||||||
))
|
|
||||||
|
|
||||||
if [[ "$1" != -d ]]; then
|
if [[ "$1" != -d ]]; then
|
||||||
# Munge xspec to contain uppercase version too
|
# Munge xspec to contain uppercase version too
|
||||||
# http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306
|
# http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306
|
||||||
xspec=${1:+"!*.@($1|${1^^})"}
|
xspec=${1:+"!*.@($1|${1^^})"}
|
||||||
toks+=( $( compgen -f -X "$xspec" -- $quoted ) )
|
x=$( compgen -f -X "$xspec" -- $quoted ) &&
|
||||||
|
while read -r tmp; do
|
||||||
|
toks+=( "$tmp" )
|
||||||
|
done <<< "$x"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If the filter failed to produce anything, try without it if configured to
|
# If the filter failed to produce anything, try without it if configured to
|
||||||
[[ -n ${COMP_FILEDIR_FALLBACK:-} && \
|
[[ -n ${COMP_FILEDIR_FALLBACK:-} && \
|
||||||
-n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \
|
-n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \
|
||||||
toks+=( $( compgen -f -- $quoted ) )
|
x=$( compgen -f -- $quoted ) &&
|
||||||
|
while read -r tmp; do
|
||||||
|
toks+=( "$tmp" )
|
||||||
|
done <<< "$x"
|
||||||
|
|
||||||
|
|
||||||
if [[ ${#toks[@]} -ne 0 ]]; then
|
if [[ ${#toks[@]} -ne 0 ]]; then
|
||||||
# 2>/dev/null for direct invocation, e.g. in the _filedir unit test
|
# 2>/dev/null for direct invocation, e.g. in the _filedir unit test
|
@ -1,8 +1,10 @@
|
|||||||
# Expected failures in mock, hangs in koji
|
# Expected failures in mock, hangs in koji
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
|
# The *.py files we ship are not python scripts, #813651
|
||||||
|
%global _python_bytecompile_errors_terminate_build 0
|
||||||
|
|
||||||
Name: bash-completion
|
Name: bash-completion
|
||||||
Version: 1.99
|
Version: 2.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: Programmable completion for Bash
|
Summary: Programmable completion for Bash
|
||||||
@ -12,8 +14,8 @@ URL: http://bash-completion.alioth.debian.org/
|
|||||||
Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
|
Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
|
||||||
Source2: CHANGES.package.old
|
Source2: CHANGES.package.old
|
||||||
# https://bugzilla.redhat.com/677446, see also noblacklist patch
|
# https://bugzilla.redhat.com/677446, see also noblacklist patch
|
||||||
Source3: %{name}-1.99-redefine_filedir.bash
|
Source3: %{name}-2.0-redefine_filedir.bash
|
||||||
# https://bugzilla.redhat.com/677446, see also filedir source
|
# https://bugzilla.redhat.com/677446, see also redefine_filedir source
|
||||||
Patch0: %{name}-1.99-noblacklist.patch
|
Patch0: %{name}-1.99-noblacklist.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -74,6 +76,10 @@ exit $result
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 19 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:2.0-1
|
||||||
|
- Update to 2.0 (fixes #817902, #831835).
|
||||||
|
- Don't try to python-bytecompile our non-python *.py (#813651).
|
||||||
|
|
||||||
* Sun Jan 8 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:1.99-1
|
* Sun Jan 8 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:1.99-1
|
||||||
- Update to 1.99.
|
- Update to 1.99.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user