Bug#270222: Use update-alternatives facility (totem patch)
Emil Soleyman-Zomalan
Emil Soleyman-Zomalan <emil@nishra.com>, 270222@bugs.debian.org
Mon, 06 Sep 2004 01:50:00 -0700
This is a multi-part MIME message sent by reportbug.
--===============1948694732==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Package: totem
Version: 0.99.15.1-2
Severity: wishlist
Tags: patch
Hi Sebastien,
Please consider applying this patch to Totem since it is similar in
functionality to the same one I have or will have applied to
nautilus-media. It would be best if we could get them both to use
update-alternatives.
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable'), (400, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-mh2
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8
Versions of packages totem depends on:
ii totem-xine 0.99.15.1-2 A simple media player for the Gnom
-- debconf information:
* totem/thumbnailer: true
--===============1948694732==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="totem_use_alternatives.patch"
diff -urNad totem-0.99.15.1/debian/patches/00list totem-0.99.15.1-changed/debian/patches/00list
--- totem-0.99.15.1/debian/patches/00list 2004-08-16 12:22:16 -0700
+++ totem-0.99.15.1-changed/debian/patches/00list 2004-08-16 11:19:33 -0700
@@ -1 +1,2 @@
10_vcd_hang
+20_use_alternatives
diff -urNad totem-0.99.15.1/debian/patches/20_use_alternatives.dpatch totem-0.99.15.1-changed/debian/patches/20_use_alternatives.dpatch
--- totem-0.99.15.1/debian/patches/20_use_alternatives.dpatch 1969-12-31 16:00:00 -0800
+++ totem-0.99.15.1-changed/debian/patches/20_use_alternatives.dpatch 2004-08-16 12:03:00 -0700
@@ -0,0 +1,37 @@
+#! /bin/sh -e
+## 20_use_alternatives.dpatch by Sebastien Bacher <seb128@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+if [ $# -lt 1 ]; then
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+ -patch) patch -p1 ${patch_opts} < $0;;
+ -unpatch) patch -R -p1 ${patch_opts} < $0;;
+ *)
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /tmp/totem-0.99.15.1.orig/data/schemas.sh /tmp/totem-0.99.15.1/data/schemas.sh
+--- /tmp/totem-0.99.15.1.orig/data/schemas.sh 2004-07-08 10:13:39 -0700
++++ totem-0.99.15.1/data/schemas.sh 2004-08-16 09:19:20 -0700
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+
+ OWNER=totem
+-COMMAND="$2/totem-video-thumbnailer -s %s %u %o"
++COMMAND="$2/gnome-video-thumbnailer -s %s %u %o"
+
+ upd_schema()
+ {
diff -urNad totem-0.99.15.1/debian/totem-gstreamer.postinst totem-0.99.15.1-changed/debian/totem-gstreamer.postinst
--- totem-0.99.15.1/debian/totem-gstreamer.postinst 2004-08-16 12:22:16 -0700
+++ totem-0.99.15.1-changed/debian/totem-gstreamer.postinst 2004-08-16 12:15:59 -0700
@@ -7,6 +7,10 @@
if [ -x /usr/bin/update-desktop-database ] ; then
/usr/bin/update-desktop-database
fi
+
+ # Install a link to 'gnome-video-thumbnailer' via alternatives.
+ update-alternatives --quiet --install /usr/bin/gnome-video-thumbnailer gnome-video-thumbnailer /usr/bin/totem-video-thumbnailer 40
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff -urNad totem-0.99.15.1/debian/totem-gstreamer.prerm totem-0.99.15.1-changed/debian/totem-gstreamer.prerm
--- totem-0.99.15.1/debian/totem-gstreamer.prerm 1969-12-31 16:00:00 -0800
+++ totem-0.99.15.1-changed/debian/totem-gstreamer.prerm 2004-08-16 12:25:31 -0700
@@ -0,0 +1,24 @@
+#! /bin/sh
+# prerm script for totem-gstreamer
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ update-alternatives --quiet --remove gnome-video-thumbnailer /usr/bin/totem-video-thumbnailer
+ ;;
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+
+esac
+
+#DEBHELPER#
+
+exit 0
diff -urNad totem-0.99.15.1/debian/totem-xine.postinst totem-0.99.15.1-changed/debian/totem-xine.postinst
--- totem-0.99.15.1/debian/totem-xine.postinst 2004-08-16 12:22:16 -0700
+++ totem-0.99.15.1-changed/debian/totem-xine.postinst 2004-08-16 12:15:49 -0700
@@ -7,6 +7,10 @@
if [ -x /usr/bin/update-desktop-database ] ; then
/usr/bin/update-desktop-database
fi
+
+ # Install a link to 'gnome-video-thumbnailer' via alternatives.
+ update-alternatives --quiet --install /usr/bin/gnome-video-thumbnailer gnome-video-thumbnailer /usr/bin/totem-video-thumbnailer 40
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff -urNad totem-0.99.15.1/debian/totem-xine.prerm totem-0.99.15.1-changed/debian/totem-xine.prerm
--- totem-0.99.15.1/debian/totem-xine.prerm 1969-12-31 16:00:00 -0800
+++ totem-0.99.15.1-changed/debian/totem-xine.prerm 2004-08-16 12:25:18 -0700
@@ -0,0 +1,24 @@
+#! /bin/sh
+# prerm script for totem-xine
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ update-alternatives --quiet --remove gnome-video-thumbnailer /usr/bin/totem-video-thumbnailer
+ ;;
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+
+esac
+
+#DEBHELPER#
+
+exit 0
--===============1948694732==--