Now that git-el's postinst uses lstat(2) and no longer confuses a
symlink to a directory for a directory, spurious emacs.old directories
in /usr/share/doc/git/contrib should be a thing of the past.  Clean up
the mess from previous versions.

- if contrib/emacs.old is a symlink (from trying to install git-el
  once), remove it.
- if contrib/emacs/emacs is a symlink (from trying to install git-el
  twice), remove it.

Signed-off-by: Jonathan Nieder <jrnie...@gmail.com>
---
 debian/changelog       |    4 ++++
 debian/git-el.postinst |    6 ++++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2bdfe17..9668ea2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ git (1:1.7.4.1-3.1) experimental; urgency=low
 
   * git-el.postinst: check if /usr/share/doc/git/contrib/emacs is
     already a symlink before making room for one.
+  * git-el.postinst: remove /usr/share/doc/git/contrib/emacs.old
+    and /usr/share/git-core/emacs/emacs if they are symlinks, to
+    clean up after maintainer scripts that mistook the contrib/emacs
+    symlink for a directory.
 
  -- Jonathan Nieder <jrnie...@gmail.com>  Wed, 09 Mar 2011 16:52:14 -0600
 
diff --git a/debian/git-el.postinst b/debian/git-el.postinst
index 18af229..5ffd7c9 100644
--- a/debian/git-el.postinst
+++ b/debian/git-el.postinst
@@ -3,6 +3,12 @@ set -e
 test "$1" = configure || exit 0
 /usr/lib/emacsen-common/emacs-package-install git
 
+# Clean up after 1:1.7.4.1-1 through 1:1.7.4.1-3.
+! test -L /usr/share/git-core/emacs/emacs ||
+rm -f /usr/share/git-core/emacs/emacs
+! test -L /usr/share/doc/git/contrib/emacs.old ||
+rm -f /usr/share/doc/git/contrib/emacs.old
+
 # Replace the old /usr/share/doc/git/contrib/emacs directory
 # with a symlink.
 test -z "$2" &&
-- 
1.7.4.1




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to