RFC: Split Package with Obsolete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I want to split off the evolution plugin from mail-notification into a
separate package to avoid the dep on evolution in the main
mail-notification package. That's supported by mail-notification.

But this leads to one problem: Users of the evolution plugin in
mail-notification now need to manually install the new sub-package to
gain all the features they had before in the non-split
mail-notification. There are now two scenarios to proceed afaics:

1) Do the split only in devel/FC6 and get it documented in the release
notes.

2) add a this two lines to the new sub-pacakge:
Requires:       %{name} = %{version}-%{release}
Obsoletes:      mail-notification < 3.0-4
(see attached patch for the full context). This way yum will install the
new subpackage because it obsoletes the old main-package *and* yum will
install the new main-package because it's a dep of the new subpackage.
Worked as expected in a local test:

----
$ sudo yum --enablerepo=test update
[...]
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for mail-notification-evolution-plugin to pack
into transaction set.
mail-notification-evoluti 100% |=========================| 7.3 kB    00:00
---> Package mail-notification-evolution-plugin.i386 0:3.0-4 set to be
updated
--> Running transaction check
--> Processing Dependency: mail-notification = 3.0-4 for package:
mail-notification-evolution-plugin
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for mail-notification to pack into transaction set.
mail-notification-3.0-4.i 100% |=========================|  15 kB    00:00
---> Package mail-notification.i386 0:3.0-4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 mail-notification-evolution-plugin  i386       3.0-4            test
            22 k
     replacing  mail-notification.i386 3.0-2.fc5

Updating for dependencies:
 mail-notification       i386       3.0-4            test              341 k

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       1 Package(s)
Remove       0 Package(s)
Total download size: 363 k
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating  : mail-notification            ######################### [1/3]
  Installing: mail-notification-evolution- ######################### [2/3]
  Cleanup   : mail-notification            ######################### [3/3]

Installed: mail-notification-evolution-plugin.i386 0:3.0-4
Dependency Updated: mail-notification.i386 0:3.0-4
Replaced: mail-notification.i386 0:3.0-2.fc5
Complete!

----
This is somewhat hackish, but it's probably the most comfortable way for
the user.

Does anyone know why solution 2) should not work or if it leads to
trouble somewhere? If not I'm going to try it (of course only in devel)...

CU
thl
? i386
? mail-notification-3.0
? mail-notification-3.0-4.src.rpm
? new
? old
Index: mail-notification.spec
===================================================================
RCS file: /cvs/extras/rpms/mail-notification/devel/mail-notification.spec,v
retrieving revision 1.24
diff -u -r1.24 mail-notification.spec
--- mail-notification.spec	15 Jul 2006 12:49:17 -0000	1.24
+++ mail-notification.spec	6 Aug 2006 18:21:30 -0000
@@ -1,6 +1,6 @@
 Name:           mail-notification
 Version:        3.0
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Status icon that informs you if you have new mail
 
 Group:          Applications/Internet
@@ -38,6 +38,15 @@
 Xfce Notification Area and the KDE System Tray.
 
 
+%package        evolution-plugin
+Summary:        Evolution plugin for Mail Notification
+Group:          Applications/Internet
+Requires:       %{name} = %{version}-%{release}
+Obsoletes:	mail-notification < 3.0-4
+
+%description	evolution-plugin
+Evolution support for Mail Notification.
+
 %prep
 %setup -q -n %{name}-%{version}
 cp %{SOURCE1} ./README.FEDORA
@@ -80,7 +89,7 @@
 /usr/bin/gconftool-2 --makefile-install-rule \
   %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null ||:
 /usr/bin/scrollkeeper-update -q ||:
-mail-notification --unset-obsolete-configuration >/dev/null ||:
+mail-notification --unset-obsolete-configuration &>/dev/null ||:
 
 %preun
 # For GConf apps: uninstall app's system default schemas
@@ -99,18 +108,25 @@
 %{_sysconfdir}/gconf/schemas/mail-notification.schemas
 %{_bindir}/*
 %{_libdir}/bonobo/servers/GNOME_MailNotification.server
-%{_libdir}/bonobo/servers/GNOME_MailNotification_Evolution.server
 %{_datadir}/%{name}
 %{_datadir}/gnome/autostart/fedora-mail-notification.desktop
 %{_datadir}/applications/fedora-mail-notification-properties.desktop
 %{_datadir}/gnome/help/mail-notification/
-%{_libdir}/evolution/2.*/plugins/*
 %dir %{_datadir}/omf/mail-notification/
 %{_datadir}/omf/mail-notification/mail-notification-C.omf
 %{_datadir}/pixmaps/mail-notification.png
 
 
+%files evolution-plugin
+%defattr(-,root,root,-)
+%{_libdir}/evolution/2.*/plugins/*
+%{_libdir}/bonobo/servers/GNOME_MailNotification_Evolution.server
+
+
 %changelog
+* Sat Jul 15 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info>  3.0-4
+- Package evolution plugin separately
+
 * Sat Jul 15 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info>  3.0-3
 - rebuild for new gail
 - send ouput from unset-obsolete-configuration to /dev/null and ignore retval
-- 
fedora-extras-list mailing list
fedora-extras-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-extras-list

[Index of Archives]     [Fedora General Discussion]     [Fedora Art]     [Fedora Docs]     [Fedora Package Review]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite Backpacking]     [KDE Users]

  Powered by Linux