Mailinglist Archive: opensuse-commit (861 mails)

< Previous Next >
commit transmission for openSUSE:Factory

Hello community,

here is the log from the commit of package transmission for openSUSE:Factory
checked in at Wed Jan 12 10:55:39 CET 2011.



--------
--- GNOME/transmission/transmission.changes 2010-12-11 11:35:54.000000000
+0100
+++ /mounts/work_src_done/STABLE/transmission/transmission.changes
2011-01-11 13:02:04.000000000 +0100
@@ -1,0 +2,15 @@
+Sun Jan 9 16:13:35 CET 2011 - vuntz@xxxxxxxxxxxx
+
+- Use update-alternatives to provide /usr/bin/transmission, with
+ alternatives being transmission-cli, transmission-gtk and
+ transmission-qt:
+ + Create the ghost files in %install.
+ + Add update-alternatives Requires(post/postun) to the three
+ packages.
+ + Call update-alterantives in %post/%postun of the three
+ packages.
+ + The priority order is: gtk, qt, cli.
+- This makes the usage of transmission from the command line a bit
+ more intuitive. Fix bnc#657450.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ transmission.spec ++++++
--- /var/tmp/diff_new_pack.XDGHhL/_old 2011-01-12 10:54:34.000000000 +0100
+++ /var/tmp/diff_new_pack.XDGHhL/_new 2011-01-12 10:54:34.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package transmission (Version 2.13)
#
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -32,7 +32,7 @@
BuildRequires: openssl-devel
BuildRequires: update-desktop-files
Version: 2.13
-Release: 2
+Release: 3
# FIXME: check if removal of locales in %install is still needed (last
checked: 2010-12-11)
Summary: Lightweight, yet powerful BitTorrent client
Source:
http://download.m0k.org/transmission/files/%{name}-%{version}.tar.bz2
@@ -42,6 +42,8 @@
License: GPLv2 ; MIT License (or similar)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{name}-common = %{version}
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
Provides: %{name}-ui = %{version}

%description
@@ -57,6 +59,8 @@
Summary: Lightweight, yet powerful BitTorrent client
Group: Productivity/Networking/Other
Requires: %{name}-common = %{version}
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
Recommends: %{name}-gtk-lang
Provides: %{name}-ui = %{version}

@@ -75,6 +79,8 @@
Summary: Lightweight, yet powerful BitTorrent client
Group: Productivity/Networking/Other
Requires: %{name}-common = %{version}
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
Provides: %{name}-ui = %{version}

%description qt
@@ -133,6 +139,10 @@
cd qt
%__make install INSTALL_ROOT=%{buildroot}%{_prefix}
cd ..
+# touch files for alternatives
+touch %{buildroot}%{_bindir}/transmission
+chmod 0755 %{buildroot}%{_bindir}/transmission
+touch %{buildroot}%{_mandir}/man1/transmission.1.gz
%find_lang transmission-gtk
%suse_update_desktop_file transmission-gtk
%suse_update_desktop_file -i transmission-qt
@@ -141,15 +151,47 @@
%clean
rm -rf %{buildroot}

+%post
+update-alternatives --install %{_bindir}/transmission transmission
%{_bindir}/transmission-cli 5 \
+ --slave %{_mandir}/man1/transmission.1.gz
transmission.1.gz %{_mandir}/man1/transmission-cli.1.gz
+
+%post gtk
+update-alternatives --install %{_bindir}/transmission transmission
%{_bindir}/transmission-gtk 15 \
+ --slave %{_mandir}/man1/transmission.1.gz
transmission.1.gz %{_mandir}/man1/transmission-gtk.1.gz
+
+%post qt
+update-alternatives --install %{_bindir}/transmission transmission
%{_bindir}/transmission-qt 10 \
+ --slave %{_mandir}/man1/transmission.1.gz
transmission.1.gz %{_mandir}/man1/transmission-qt.1.gz
+
+%postun
+# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed
+if [ ! -f %{_bindir}/transmission-cli ]; then
+ update-alternatives --remove transmission %{_bindir}/transmission-cli
+fi
+
+%postun gtk
+# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed
+if [ ! -f %{_bindir}/transmission-gtk ]; then
+ update-alternatives --remove transmission %{_bindir}/transmission-gtk
+fi
+
+%postun qt
+# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed
+if [ ! -f %{_bindir}/transmission-qt ]; then
+ update-alternatives --remove transmission %{_bindir}/transmission-qt
+fi
+
%files
%defattr(-,root,root)
%doc AUTHORS NEWS README COPYING
+%ghost %{_bindir}/transmission
%{_bindir}/transmission-cli
%{_bindir}/transmission-create
%{_bindir}/transmission-daemon
%{_bindir}/transmission-edit
%{_bindir}/transmission-remote
%{_bindir}/transmission-show
+%ghost %doc %{_mandir}/man1/transmission.1*
%doc %{_mandir}/man1/transmission-cli.1*
%doc %{_mandir}/man1/transmission-create.1*
%doc %{_mandir}/man1/transmission-daemon.1*
@@ -165,15 +207,19 @@
%files gtk
%defattr(-,root,root)
%doc AUTHORS NEWS README COPYING
+%ghost %{_bindir}/transmission
%{_bindir}/transmission-gtk
%{_datadir}/applications/transmission-gtk.desktop
+%ghost %doc %{_mandir}/man1/transmission.1*
%doc %{_mandir}/man1/transmission-gtk.1*

%files qt
%defattr(-,root,root)
%doc AUTHORS NEWS README COPYING
+%ghost %{_bindir}/transmission
%{_bindir}/transmission-qt
%{_datadir}/applications/transmission-qt.desktop
+%ghost %doc %{_mandir}/man1/transmission.1*
%doc %{_mandir}/man1/transmission-qt.1*

%files common


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages