[mate-terminal] 02/02: debian/mate-terminal.{postinst, prerm): Use mate-terminal.wrapper (instead of mater-terminal binary directly) as alternative for x-terminal-emulator. (Closes: #773431).

Mike Gabriel sunweaver at debian.org
Tue Jan 6 04:32:45 UTC 2015


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository mate-terminal.

commit 20af5d094e94b8ebcbbd594f433f881729ad44c6
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Jan 6 05:19:44 2015 +0100

    debian/mate-terminal.{postinst,prerm): Use mate-terminal.wrapper (instead of mater-terminal binary directly) as alternative for x-terminal-emulator. (Closes: #773431).
---
 debian/mate-terminal.postinst | 15 ++++++++++++---
 debian/mate-terminal.prerm    |  2 +-
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/debian/mate-terminal.postinst b/debian/mate-terminal.postinst
index 278bc4c..2a42b48 100755
--- a/debian/mate-terminal.postinst
+++ b/debian/mate-terminal.postinst
@@ -4,8 +4,17 @@ set -e
 
 #DEBHELPER#
 
-if [ "$1" = "configure" ]; then
-	update-alternatives --install /usr/bin/x-terminal-emulator \
-		x-terminal-emulator /usr/bin/mate-terminal 30
+# We erroneously ignored the mate-terminal.wrapper as x-terminal-emulator before 1.8.1+dfsg1-3
+# and used mate-terminal directly (which does not provide the correct command line options
+# natively, see Debain bug #773431).
+if [ "$1" = "configure" ] && dpkg --compare-versions "$2" le "1.8.1+dfsg1-3"; then
+	update-alternatives --remove x-terminal-emulator /usr/bin/mate-terminal
 fi
 
+# use mate-terminal.wrapper as alternative for x-terminal-emulator
+if [ "$1" = "configure" ]; then
+    update-alternatives --install /usr/bin/x-terminal-emulator \
+    x-terminal-emulator /usr/bin/mate-terminal.wrapper 30 \
+    --slave /usr/share/man/man1/x-terminal-emulator.1.gz \
+    x-terminal-emulator.1.gz /usr/share/man/man1/mate-terminal.1.gz
+fi
diff --git a/debian/mate-terminal.prerm b/debian/mate-terminal.prerm
index 2145b42..57f6df2 100755
--- a/debian/mate-terminal.prerm
+++ b/debian/mate-terminal.prerm
@@ -5,6 +5,6 @@ set -e
 #DEBHELPER#
 
 if [ "$1" = "remove" ]; then
-	update-alternatives --remove x-terminal-emulator /usr/bin/mate-terminal
+	update-alternatives --remove x-terminal-emulator /usr/bin/mate-terminal.wrapper
 fi
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-terminal.git



More information about the pkg-mate-commits mailing list