[bzr/el5] Fix bash completion https://bugzilla.redhat.com/show_bug.cgi?id=767167

Toshio くらとみ toshio at fedoraproject.org
Tue Dec 13 22:18:06 UTC 2011


commit e19528b0cbf03603c61f9d3497f3746e21bd9e5c
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Tue Dec 13 14:17:59 2011 -0800

    Fix bash completion https://bugzilla.redhat.com/show_bug.cgi?id=767167

 bzr-bash-completion.patch |   23 +++++++++++++++++++++++
 bzr.spec                  |    8 ++++++--
 2 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/bzr-bash-completion.patch b/bzr-bash-completion.patch
new file mode 100644
index 0000000..87cd1b6
--- /dev/null
+++ b/bzr-bash-completion.patch
@@ -0,0 +1,23 @@
+Index: bzr-2.1.4/contrib/bash/bzr
+===================================================================
+--- bzr-2.1.4.orig/contrib/bash/bzr
++++ bzr-2.1.4/contrib/bash/bzr
+@@ -9,6 +9,10 @@
+ # Based originally on the svn bash completition script.
+ # Customized by Sven Wilhelm/Icecrash.com
+ 
++shopt extglob &>/dev/null
++ext_on=$?
++shopt -s extglob
++
+ _bzr ()
+ {
+ 	local cur cmds cmdOpts opt helpCmds optBase i
+@@ -102,3 +106,7 @@ _bzr ()
+ 	return 0
+ }
+ complete -F _bzr -o default bzr
++
++if [ 0$ext_on -ne 0 ]; then
++  shopt -u extglob
++fi
diff --git a/bzr.spec b/bzr.spec
index cebd73f..a30c698 100644
--- a/bzr.spec
+++ b/bzr.spec
@@ -13,7 +13,7 @@
 %global bzrmajor 2.1
 %global bzrminor .4
 #global bzrrc rc2
-%global release 1
+%global release 2
 
 # Magics to get the dots in Release string correct per the above
 %global subrelease %{?bzrrc:.}%{?bzrrc}
@@ -29,6 +29,7 @@ URL:            http://www.bazaar-vcs.org/
 Source0:        https://launchpad.net/%{name}/%{bzrmajor}/%{version}%{?bzrrc}/+download/%{name}-%{version}%{?bzrrc}.tar.gz
 Source1:        https://launchpad.net/%{name}/%{bzrmajor}/%{version}%{?bzrrc}/+download/%{name}-%{version}%{?bzrrc}.tar.gz.sig
 Source2:        bzr-icon-64.png
+Patch0:         bzr-bash-completion.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  python-devel zlib-devel
@@ -64,7 +65,7 @@ This package contains the documentation for the Bazaar version control system.
 
 %prep
 %setup -q -n %{name}-%{version}%{?bzrrc}
-
+%patch0 -p1
 
 sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' bzrlib/_patiencediff_py.py
 sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' bzrlib/weave.py
@@ -136,6 +137,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{_defaultdocdir}/%{name}-doc-%{version}/*
 
 %changelog
+* Tue Dec 13 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 2.1.4-2
+- Fix bash completion https://bugzilla.redhat.com/show_bug.cgi?id=767167
+
 * Thu Oct 6 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 2.1.4-1
 - Upstream bugfix at the request of upstream.
 


More information about the scm-commits mailing list