[Bash-completion-commits] [debian] 17/19: dont_return_from_sourced_script.patch: avoid problems with shells not supporting returning from a sourced script (Closes: #741657)

David Paleino dapal at debian.org
Wed Mar 19 10:51:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

dapal pushed a commit to branch master
in repository debian.

commit d4743c53873c4c18494f81d3e39f95106c081d7b
Author: David Paleino <dapal at debian.org>
Date:   Wed Mar 19 11:39:28 2014 +0100

    dont_return_from_sourced_script.patch: avoid problems with shells not supporting returning from a sourced script (Closes: #741657)
---
 debian/changelog                                   |  4 +++-
 .../11-dont_return_from_sourced_script.patch       | 25 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 7af8cdd..5cb2aba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,12 +32,14 @@ bash-completion (1:2.1-3) UNRELEASED; urgency=medium
       thanks to Nicolas Le Cam (Closes: #673235)
     - ifconfig_locale.patch: _mac_addresses() didn't consider locale
       awareness of ifconfig, thanks to Thilo Six (Closes: #704832)
+    - dont_return_from_sourced_script.patch: avoid problems with shells
+      not supporting returning from a sourced script (Closes: #741657)
   * debian/extra/debhelper/dh_bash-completion: fix installation process
     when more than one "proper snippet" is being installed, thanks to
     Jean-Michel Vourgère (Closes: #680852)
   * Dropped completions included in util-linux (Closes: #737672)
 
- -- David Paleino <dapal at debian.org>  Wed, 19 Mar 2014 11:33:19 +0100
+ -- David Paleino <dapal at debian.org>  Wed, 19 Mar 2014 11:38:38 +0100
 
 bash-completion (1:2.1-2) unstable; urgency=low
 
diff --git a/debian/patches/11-dont_return_from_sourced_script.patch b/debian/patches/11-dont_return_from_sourced_script.patch
new file mode 100644
index 0000000..bc761b6
--- /dev/null
+++ b/debian/patches/11-dont_return_from_sourced_script.patch
@@ -0,0 +1,25 @@
+From: Ville Skyttä <ville.skytta at iki.fi>
+Subject: don't return from sourced script
+Origin: upstream, http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=867282a
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741657
+Forwarded: not-needed
+
+---
+ bash_completion.sh.in |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- bash-completion.orig/bash_completion.sh.in
++++ bash-completion/bash_completion.sh.in
+@@ -1,5 +1,5 @@
+ # Check for interactive bash and that we haven't already been sourced.
+-[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION_COMPAT_DIR" ] && return
++if [ -n "$BASH_VERSION" -a -n "$PS1" -a "$BASH_COMPLETION_COMPAT_DIR" ]; then
+ 
+ # Check for recent enough version of bash.
+ bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
+@@ -12,3 +12,5 @@ if [ $bmajor -gt 4 ] || [ $bmajor -eq 4
+     fi
+ fi
+ unset bash bmajor bminor
++
++fi
diff --git a/debian/patches/series b/debian/patches/series
index c9c3c79..fb225a2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@
 08-dpkg_fix_-W_option.patch
 09-aptitude_safe-upgrade.patch
 10-ifconfig_locale.patch
+11-dont_return_from_sourced_script.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/debian.git



More information about the Bash-completion-commits mailing list