[Bash-completion-commits] [SCM] debian-package branch, master, updated. debian/1.2-1-1-gd4be166

David Paleino dapal at debian.org
Thu Jun 17 15:57:19 UTC 2010


The following commit has been merged in the master branch:
commit d4be1661f160f7a49bf4dc9a62094206af933723
Author: David Paleino <dapal at debian.org>
Date:   Thu Jun 17 17:55:03 2010 +0200

    debian/patches/00-fix_586210.patch added, fixes a weird error while loading service(8) completions. Thanks to John Hedges (Closes: #586210)

diff --git a/debian/changelog b/debian/changelog
index be60ba8..d7a086c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+bash-completion (1:1.2-2) UNRELEASED; urgency=low
+
+  * debian/patches/:
+    - 00-fix_586210.patch added, fixes a weird error while loading
+      service(8) completions. Thanks to John Hedges (Closes: #586210)
+
+ -- David Paleino <dapal at debian.org>  Thu, 17 Jun 2010 17:54:06 +0200
+
 bash-completion (1:1.2-1) unstable; urgency=low
 
   * New upstream release
diff --git a/debian/patches/00-fix_586210.patch b/debian/patches/00-fix_586210.patch
new file mode 100644
index 0000000..38cd0e5
--- /dev/null
+++ b/debian/patches/00-fix_586210.patch
@@ -0,0 +1,31 @@
+commit 1f8b55a92aba6d03bb4c43dade1f8b2e2b847b61
+Author: David Paleino <dapal at debian.org>
+Date:   Thu Jun 17 17:43:18 2010 +0200
+Subject: fixed "service" completion, thanks to John Hedges (Debian: #586210)
+ The patch makes it safe even when every file in /etc/init.d/*
+ has a proper completion (unlikely, but seems like it happened).
+ .
+ Thanks to John Hedges <john at drystone.co.uk> for the patch, slightly
+ modified to make it more compact.
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586210
+
+---
+ contrib/service |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- bash-completion.orig/contrib/service
++++ bash-completion/contrib/service
+@@ -32,9 +32,10 @@ _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)
++[ -d /etc/init.d/ ] && (
++    services=$(for i in /etc/init.d/*; do
++        complete -p ${i##*/} &>/dev/null || printf '%s\n' ${i##*/}; done)
++    [ -n "$services" ] && complete -F _service -o default $services;)
+ 
+ # Local variables:
+ # mode: shell-script
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1f15f63
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+00-fix_586210.patch

-- 
debian-package



More information about the Bash-completion-commits mailing list