debian/git-el: remove spurious doc/git/contrib/emacs.old directory
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 old mess:
- 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 <jrnieder@gmail.com>
diff --git a/debian/changelog b/debian/changelog
index 2bdfe17..9668ea2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@
* 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 <jrnieder@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 @@
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" &&