From 7ef2069fdd524143b401ef4cf004071497265dd7 Mon Sep 17 00:00:00 2001 From: Ville Skyttä Date: Jun 29 2010 16:41:39 +0000 Subject: - Apply upstream post 1.2 /etc/init.d/* completion improvements to fix #608351. --- diff --git a/bash-completion-1.2-init.d.patch b/bash-completion-1.2-init.d.patch new file mode 100644 index 0000000..d1fef29 --- /dev/null +++ b/bash-completion-1.2-init.d.patch @@ -0,0 +1,19 @@ +diff --git a/contrib/service b/contrib/service +index 9ebd117..6efd7c1 100644 +--- a/contrib/service ++++ b/contrib/service +@@ -32,9 +32,11 @@ _service() + return 0 + } && + complete -F _service service +-[ -d /etc/init.d/ ] && complete -F _service -o default \ +- $(for i in /etc/init.d/*; do +- complete -p ${i##*/} &>/dev/null || printf '%s\n' ${i##*/}; done) ++for svc in /etc/init.d/*; do ++ [ ! -x "$svc" ] || complete -p "${svc##*/}" &>/dev/null || \ ++ complete -F _service -o default "${svc##*/}" ++done ++unset svc + + # Local variables: + # mode: shell-script diff --git a/bash-completion.spec b/bash-completion.spec index d9a1332..5a50498 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -3,7 +3,7 @@ Name: bash-completion Version: 1.2 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: Programmable completion for Bash @@ -12,6 +12,8 @@ License: GPLv2+ URL: http://bash-completion.alioth.debian.org/ Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2 Source1: %{name}-plague-client +# From upstream post-1.2 git +Patch0: %{name}-1.2-init.d.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -31,6 +33,7 @@ of the programmable completion feature of bash. %prep %setup -q +%patch0 -p1 install -pm 644 %{SOURCE1} contrib/plague-client # Updated completions shipped upstream: @@ -346,6 +349,9 @@ fi %changelog +* Mon Jun 28 2010 Ville Skyttä - 1:1.2-2 +- Apply upstream post 1.2 /etc/init.d/* completion improvements to fix #608351. + * Wed Jun 16 2010 Ville Skyttä - 1:1.2-1 - Update to 1.2, all patches applied upstream. - Fixes #444469, #538433, #541423, and #601813, works around #585384.