[Bash-completion-commits] [debian] 04/19: disable_avahi_browse.patch: slow, and doesn't scale to big networks, thanks to Chris Jones (Closes: #574950, LP: #510591)

David Paleino dapal at debian.org
Wed Mar 19 10:51:45 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 44ede3920a0c263fd7186d269f2502b4e145e5a0
Author: David Paleino <dapal at debian.org>
Date:   Wed Mar 19 10:35:48 2014 +0100

    disable_avahi_browse.patch: slow, and doesn't scale to big networks, thanks to Chris Jones (Closes: #574950, LP: #510591)
---
 debian/changelog                             |  4 ++-
 debian/patches/03-disable_avahi_browse.patch | 42 ++++++++++++++++++++++++++++
 debian/patches/series                        |  1 +
 3 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index c4edf5b..bd29b38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,8 +11,10 @@ bash-completion (1:2.1-3) UNRELEASED; urgency=medium
     - words_bad_array_subscript.patch, thanks to Barry Warsaw
     - dpkg_ddeb.patch: dpkg also supports *.ddeb, thanks to Sebastien
       Bacher (LP: #568404)
+    - disable_avahi_browse.patch: slow, and doesn't scale to big
+      networks, thanks to Chris Jones (Closes: #574950, LP: #510591)
 
- -- David Paleino <dapal at debian.org>  Wed, 19 Mar 2014 10:29:44 +0100
+ -- David Paleino <dapal at debian.org>  Wed, 19 Mar 2014 10:34:55 +0100
 
 bash-completion (1:2.1-2) unstable; urgency=low
 
diff --git a/debian/patches/03-disable_avahi_browse.patch b/debian/patches/03-disable_avahi_browse.patch
new file mode 100644
index 0000000..5d4b876
--- /dev/null
+++ b/debian/patches/03-disable_avahi_browse.patch
@@ -0,0 +1,42 @@
+From: Chris Jones <cmsj at tenshu.net>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574950
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/510591
+Origin: vendor
+Forwarded: no
+
+---
+ bash_completion |   17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+--- bash-completion.orig/bash_completion
++++ bash-completion/bash_completion
+@@ -1549,18 +1549,23 @@ _known_hosts_real()
+             -S "$suffix" -W "$hosts" -- "$cur" ) )
+     fi
+ 
++    # This feature is disabled because it does not scale to
++    #  larger networks. See:
++    # https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/510591
++    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574950
++
+     # Add hosts reported by avahi-browse, if desired and it's available.
+-    if [[ ${COMP_KNOWN_HOSTS_WITH_AVAHI:-} ]] && \
+-        type avahi-browse &>/dev/null; then
++    #if [[ ${COMP_KNOWN_HOSTS_WITH_AVAHI:-} ]] && \
++        #type avahi-browse &>/dev/null; then
+         # The original call to avahi-browse also had "-k", to avoid lookups
+         # into avahi's services DB. We don't need the name of the service, and
+         # if it contains ";", it may mistify the result. But on Gentoo (at
+         # least), -k wasn't available (even if mentioned in the manpage) some
+         # time ago, so...
+-        COMPREPLY+=( $( compgen -P "$prefix$user" -S "$suffix" -W \
+-            "$( avahi-browse -cpr _workstation._tcp 2>/dev/null | \
+-                 awk -F';' '/^=/ { print $7 }' | sort -u )" -- "$cur" ) )
+-    fi
++        #COMPREPLY+=( $( compgen -P "$prefix$user" -S "$suffix" -W \
++        #    "$( avahi-browse -cpr _workstation._tcp 2>/dev/null | \
++        #         awk -F';' '/^=/ { print $7 }' | sort -u )" -- "$cur" ) )
++    #fi
+ 
+     # Add hosts reported by ruptime.
+     COMPREPLY+=( $( compgen -W \
diff --git a/debian/patches/series b/debian/patches/series
index 8fd584c..e223c3f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 00-fix_quote_readline_by_ref.patch
 01-words_bad_array_subscript.patch
 02-dpkg_ddeb.patch
+03-disable_avahi_browse.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