diff options
author | David Paleino <dapal@debian.org> | 2012-06-17 21:04:03 +0200 |
---|---|---|
committer | David Paleino <dapal@debian.org> | 2012-06-17 21:04:14 +0200 |
commit | 5d6778f4bfc5f934244b81b3f7676d184a88a9ff (patch) | |
tree | 6236c9afdf062b6710c7ed4941edf3d8e2e73d35 | |
parent | 3b2284a5b4a5a2da6d1f5874f83f4aa1bfb5040a (diff) | |
download | bash-completion-5d6778f4bfc5f934244b81b3f7676d184a88a9ff.tar.gz |
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.
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/extra/bash_completion | 1 | ||||
-rw-r--r-- | debian/install | 1 | ||||
-rw-r--r-- | debian/links | 1 | ||||
-rw-r--r-- | debian/patches/00-fix_symlink_issue.patch | 30 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/preinst | 13 |
7 files changed, 19 insertions, 35 deletions
diff --git a/debian/changelog b/debian/changelog index b3d68c72..c2b8b08f 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@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 00000000..41ffe595 --- /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 bcda3394..fa9f4273 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 773dcddb..9a638a9a 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 5ee60661..00000000 --- a/debian/patches/00-fix_symlink_issue.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Jonathan Nieder <jrnieder@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 2e75e4b3..039e7623 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 c1237fca..3f248659 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) |