diff --git a/bash-completion-1.99-redefine_filedir.bash b/bash-completion-1.99-redefine_filedir.bash deleted file mode 100644 index f8c2a38..0000000 --- a/bash-completion-1.99-redefine_filedir.bash +++ /dev/null @@ -1,49 +0,0 @@ -# This is a copy of the _filedir function in bash_completion, included -# and (re)defined separately here because some versions of Adobe -# Reader, if installed, are known to override this function with an -# incompatible version, causing various problems. -# -# https://bugzilla.redhat.com/677446 -# http://forums.adobe.com/thread/745833 - -_filedir() -{ - local i IFS=$'\n' xspec - - _tilde "$cur" || return 0 - - local -a toks - local quoted tmp - - _quote_readline_by_ref "$cur" quoted - toks=( $( - compgen -d -- "$quoted" | { - while read -r tmp; do - # TODO: I have removed a "[ -n $tmp ] &&" before 'printf ..', - # and everything works again. If this bug suddenly - # appears again (i.e. "cd /b" becomes "cd /"), - # remember to check for other similar conditionals (here - # and _filedir_xspec()). --David - printf '%s\n' $tmp - done - } - )) - - if [[ "$1" != -d ]]; then - # Munge xspec to contain uppercase version too - # http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306 - xspec=${1:+"!*.@($1|${1^^})"} - toks+=( $( compgen -f -X "$xspec" -- $quoted ) ) - fi - - # If the filter failed to produce anything, try without it if configured to - [[ -n ${COMP_FILEDIR_FALLBACK:-} && \ - -n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \ - toks+=( $( compgen -f -- $quoted ) ) - - if [[ ${#toks[@]} -ne 0 ]]; then - # 2>/dev/null for direct invocation, e.g. in the _filedir unit test - compopt -o filenames 2>/dev/null - COMPREPLY+=( "${toks[@]}" ) - fi -} # _filedir() diff --git a/bash-completion-2.0-redefine_filedir.bash b/bash-completion-2.0-redefine_filedir.bash new file mode 100644 index 0000000..af6d5bb --- /dev/null +++ b/bash-completion-2.0-redefine_filedir.bash @@ -0,0 +1,48 @@ +# This is a copy of the _filedir function in bash_completion, included +# and (re)defined separately here because some versions of Adobe +# Reader, if installed, are known to override this function with an +# incompatible version, causing various problems. +# +# https://bugzilla.redhat.com/677446 +# http://forums.adobe.com/thread/745833 + +_filedir() +{ + local i IFS=$'\n' xspec + + _tilde "$cur" || return 0 + + local -a toks + local quoted x tmp + + _quote_readline_by_ref "$cur" quoted + x=$( compgen -d -- "$quoted" ) && + while read -r tmp; do + toks+=( "$tmp" ) + done <<< "$x" + + if [[ "$1" != -d ]]; then + # Munge xspec to contain uppercase version too + # http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306 + xspec=${1:+"!*.@($1|${1^^})"} + x=$( compgen -f -X "$xspec" -- $quoted ) && + while read -r tmp; do + toks+=( "$tmp" ) + done <<< "$x" + fi + + # If the filter failed to produce anything, try without it if configured to + [[ -n ${COMP_FILEDIR_FALLBACK:-} && \ + -n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \ + x=$( compgen -f -- $quoted ) && + while read -r tmp; do + toks+=( "$tmp" ) + done <<< "$x" + + + if [[ ${#toks[@]} -ne 0 ]]; then + # 2>/dev/null for direct invocation, e.g. in the _filedir unit test + compopt -o filenames 2>/dev/null + COMPREPLY+=( "${toks[@]}" ) + fi +} # _filedir() diff --git a/bash-completion.spec b/bash-completion.spec index 207eb18..b6c4032 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,8 +1,10 @@ # Expected failures in mock, hangs in koji %bcond_with tests +# The *.py files we ship are not python scripts, #813651 +%global _python_bytecompile_errors_terminate_build 0 Name: bash-completion -Version: 1.99 +Version: 2.0 Release: 1%{?dist} Epoch: 1 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 Source2: CHANGES.package.old # https://bugzilla.redhat.com/677446, see also noblacklist patch -Source3: %{name}-1.99-redefine_filedir.bash -# https://bugzilla.redhat.com/677446, see also filedir source +Source3: %{name}-2.0-redefine_filedir.bash +# https://bugzilla.redhat.com/677446, see also redefine_filedir source Patch0: %{name}-1.99-noblacklist.patch BuildArch: noarch @@ -74,6 +76,10 @@ exit $result %changelog +* Tue Jun 19 2012 Ville Skyttä - 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ä - 1:1.99-1 - Update to 1.99. diff --git a/sources b/sources index 06f75e9..02ddec5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 26caffcd8a2ed8a8aaec3cca13d9bf0a CHANGES.package.old -3cf478b7f1065f424d3d6ec35f80e4f2 bash-completion-1.99.tar.bz2 +0d903f398be8c8f24bc5ffa6f86127f8 bash-completion-2.0.tar.bz2