[Bash-completion-commits] [SCM] debian-package branch, master, updated. debian/1.99-3-12-g56bc56c

David Paleino dapal at debian.org
Sun Jun 17 19:11:21 UTC 2012


The following commit has been merged in the master branch:
commit 5d6778f4bfc5f934244b81b3f7676d184a88a9ff
Author: David Paleino <dapal at debian.org>
Date:   Sun Jun 17 21:04:03 2012 +0200

    Replace /etc/bash_completion symlink with a shim script (Closes: #669180)
    
    * Replace /etc/bash_completion symlink with a shim script
    * Remove no longer needed symlink-issue patch
    * Remove /etc/bash_completion symlink to make room for shim script
      on upgrade from versions 1:1.99-2 and 1:1.99-3.

diff --git a/debian/changelog b/debian/changelog
index b3d68c7..c2b8b08 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 bash-completion (1:2.0-1) UNRELEASED; urgency=low
 
+  [ David Paleino ]
   * New upstream version
     - Recognise symlinks to directories as directories (Closes: #666055)
     - sudo -e should list filenames instead of commands (Closes: #446355)
@@ -11,6 +12,12 @@ bash-completion (1:2.0-1) UNRELEASED; urgency=low
   * Standards-Version bump to 3.9.3, no changes needed
   * Updated debian/copyright
 
+  [ Jonathan Nieder ]
+  * Replace /etc/bash_completion symlink with a shim script (Closes: #669180)
+  * Remove no longer needed symlink-issue patch
+  * Remove /etc/bash_completion symlink to make room for shim script
+    on upgrade from versions 1:1.99-2 and 1:1.99-3.
+
  -- David Paleino <dapal at debian.org>  Sun, 17 Jun 2012 20:51:48 +0200
 
 bash-completion (1:1.99-3) unstable; urgency=low
diff --git a/debian/extra/bash_completion b/debian/extra/bash_completion
new file mode 100644
index 0000000..41ffe59
--- /dev/null
+++ b/debian/extra/bash_completion
@@ -0,0 +1 @@
+. /usr/share/bash-completion/bash_completion
diff --git a/debian/install b/debian/install
index bcda339..fa9f427 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,3 @@
+debian/extra/bash_completion				/etc/
 debian/extra/debhelper/dh_bash-completion	/usr/bin/
 debian/extra/debhelper/bash_completion.pm	/usr/share/perl5/Debian/Debhelper/Sequence/
diff --git a/debian/links b/debian/links
index 773dcdd..9a638a9 100644
--- a/debian/links
+++ b/debian/links
@@ -1,2 +1 @@
 usr/share/doc/bash-completion/README.gz	usr/share/doc/bash/README.bash_completion.gz
-usr/share/bash-completion/bash_completion etc/bash_completion
diff --git a/debian/patches/00-fix_symlink_issue.patch b/debian/patches/00-fix_symlink_issue.patch
deleted file mode 100644
index 5ee6066..0000000
--- a/debian/patches/00-fix_symlink_issue.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Jonathan Nieder <jrnieder at gmail.com>
-Subject: fix issue when loading bash-completion from a symlink
-Forwarded: not-needed
-
----
- bash_completion |    6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
---- bash-completion.orig/bash_completion
-+++ bash-completion/bash_completion
-@@ -1916,7 +1916,8 @@ _minimal()
- _completion_loader()
- {
-     local compdir=./completions
--    [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
-+    local compscript=$(readlink -f $BASH_SOURCE)
-+    [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
- 
-     # Try basename.
-     . "$compdir/${1##*/}" &>/dev/null && return 124
-@@ -1937,7 +1938,8 @@ _xfunc()
-     shift
-     declare -F $1 &>/dev/null || {
-         local compdir=./completions
--        [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
-+        local compscript=$(readlink -f $BASH_SOURCE)
-+        [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
-         . "$compdir/$srcfile"
-     }
-     "$@"
diff --git a/debian/patches/series b/debian/patches/series
index 2e75e4b..039e762 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-00-fix_symlink_issue.patch
 01-apt_get_changelog.patch
diff --git a/debian/preinst b/debian/preinst
index c1237fc..3f24865 100644
--- a/debian/preinst
+++ b/debian/preinst
@@ -4,13 +4,20 @@ set -e
 
 case "$1" in
     install|upgrade)
-	if [ -e /usr/share/doc/bash/completion-contrib ]; then
-	    rm -rf /usr/share/doc/bash/completion-contrib
-	fi
+        if [ -e /usr/share/doc/bash/completion-contrib ]; then
+            rm -rf /usr/share/doc/bash/completion-contrib
+        fi
         # let's remove old bash-completion conffiles
         for f in $(dpkg-query -W -f='${Conffiles}\n' bash-completion | grep bash_completion.d | cut -d\  -f2); do
             dpkg-maintscript-helper rm_conffile $f 1:1.3-1 -- "$@"
         done
+        if dpkg --compare-versions "$2" lt-nl 1:2.0-1 &&
+           dpkg --compare-versions "$2" ge 1:1.99-2 &&
+           [ -L /etc/bash_completion ] &&
+           [ "$(readlink /etc/bash_completion)" = \
+             /usr/share/bash-completion/bash_completion ]; then
+            rm -f /etc/bash_completion
+        fi
     ;;
 
     abort-upgrade)

-- 
debian-package



More information about the Bash-completion-commits mailing list