diff --git a/PackageKit.spec b/PackageKit.spec index 52af91e..70bafba 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -8,7 +8,7 @@ Summary: System daemon that is a DBUS abstraction layer for package management Name: PackageKit Version: 0.3.7 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: http://packagekit.freedesktop.org @@ -20,12 +20,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: dbus >= %{dbus_version} Requires: dbus-glib >= %{dbus_glib_version} -Requires: PackageKit-libs = %{version}-%{release} +Requires: PackageKit-glib = %{version}-%{release} Requires: PackageKit-udev-helper = %{version}-%{release} Requires: PackageKit-yum-plugin = %{version}-%{release} Requires: PackageKit-yum = %{version}-%{release} Requires: shared-mime-info Requires: python-sqlite2 +Requires: comps-extras BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: dbus-devel >= %{dbus_version} @@ -85,7 +86,7 @@ Summary: Tell PackageKit to install firmware that udev requires Group: System Environment/Base Requires: udev Requires: PackageKit -Obsoletes: udev-packagekit +Obsoletes: udev-packagekit < %{version}-%{release} %description udev-helper PackageKit-udev-helper tells PackageKit that firmware was not available and was @@ -97,21 +98,23 @@ Summary: Tell PackageKit to check for updates when yum exits Group: System Environment/Base Requires: yum >= 3.0 Requires: PackageKit -Obsoletes: yum-packagekit +Obsoletes: yum-packagekit < %{version}-%{release} %description yum-plugin PackageKit-yum-plugin tells PackageKit to check for updates when yum exits. This way, if you run 'yum update' and install all available updates, puplet will almost instantly update itself to reflect this. -%package libs -Summary: Libraries for accessing PackageKit +%package glib +Summary: GLib libraries for accessing PackageKit Group: Development/Libraries Requires: dbus >= %{dbus_version} Requires: %{name} = %{version}-%{release} +Obsoletes: PackageKit-libs < %{version}-%{release} +Provides: PackageKit-libs = %{version}-%{release} -%description libs -Libraries for accessing PackageKit. +%description glib +GLib libraries for accessing PackageKit. %package cron Summary: Cron job and related utilities for PackageKit @@ -122,22 +125,33 @@ Requires: %{name} = %{version}-%{release} %description cron Crontab and utilities for running PackageKit as a cron job. -%package devel -Summary: Libraries and headers for PackageKit +%package glib-devel +Summary: GLib Libraries and headers for PackageKit Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: dbus-devel >= %{dbus_version} Requires: pkgconfig Requires: sqlite-devel +Requires: PackageKit-glib = %{version}-%{release} +Obsoletes: PackageKit-devel < %{version}-%{release} +Provides: PackageKit-devel = %{version}-%{release} -%description devel -Headers and libraries for PackageKit. +%description glib-devel +GLib headers and libraries for PackageKit. + +%package backend-devel +Summary: Headers to compile out of tree PackageKit backends +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description backend-devel +Headers to compile out of tree PackageKit backends. %package browser-plugin Summary: Browser Plugin for PackageKit Group: Development/Libraries Requires: gtk2 -Requires: PackageKit-libs = %{version}-%{release} +Requires: PackageKit-glib = %{version}-%{release} %description browser-plugin The PackageKit browser plugin allows web sites to offer the ability to @@ -148,9 +162,9 @@ using PackageKit. Summary: Install GStreamer codecs using PackageKit Group: Development/Libraries Requires: gstreamer -Requires: PackageKit-libs = %{version}-%{release} +Requires: PackageKit-glib = %{version}-%{release} Obsoletes: codeina < 0.10.1-10 -Provides: codeina = 0.10.1-10 +Provides: codeina = 0.10.1-10 %description gstreamer-plugin The PackageKit GStreamer plugin allows any Gstreamer application to install @@ -182,6 +196,14 @@ pushd ${RPM_BUILD_ROOT}%{_libexecdir} > /dev/null ln -s pk-gstreamer-install gst-install-plugins-helper popd > /dev/null +# create a link that from the comps icons to PK, as PackageKit frontends +# cannot add /usr/share/pixmaps/comps to the icon search path as some distros +# do not use comps. Patching this in the frontend is not a good idea, as there +# are multiple frontends in multiple programming languages. +pushd ${RPM_BUILD_ROOT}%{_datadir}/PackageKit > /dev/null +ln -s ../pixmaps/comps icons +popd > /dev/null + %find_lang %name %clean @@ -193,9 +215,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %postun update-mime-database %{_datadir}/mime &> /dev/null || : -%post libs -p /sbin/ldconfig +%post glib -p /sbin/ldconfig -%postun libs -p /sbin/ldconfig +%postun glib -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root,-) @@ -211,10 +233,12 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %dir %{_localstatedir}/cache/PackageKit/downloads %{python_sitelib}/packagekit/*py* %dir %{_sysconfdir}/bash_completion.d +%dir %{_libdir}/packagekit-backend %config %{_sysconfdir}/bash_completion.d/pk-completion.bash %config(noreplace) %{_sysconfdir}/PackageKit/*.conf %config %{_sysconfdir}/dbus-1/system.d/* %dir %{_datadir}/PackageKit/helpers/test_spawn +%dir %{_datadir}/PackageKit/icons %{_datadir}/PackageKit/helpers/test_spawn/* %{_datadir}/man/man1/*.1.gz %{_datadir}/PolicyKit/policy/*.policy @@ -266,7 +290,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_sysconfdir}/udev/rules.d/*.rules /lib/udev/*.sh -%files libs +%files glib %defattr(-,root,root,-) %doc README AUTHORS NEWS COPYING %dir %{_libdir}/packagekit-backend @@ -291,14 +315,29 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_libexecdir}/pk-gstreamer-install %{_libexecdir}/gst-install-plugins-helper -%files devel +%files glib-devel %defattr(-,root,root,-) %doc README AUTHORS NEWS COPYING %{_libdir}/lib*.so %{_libdir}/pkgconfig/* -%{_includedir}/* +%dir %{_includedir}/packagekit +%{_includedir}/packagekit/* + +%files backend-devel +%defattr(-,root,root,-) +%doc README AUTHORS NEWS COPYING +%dir %{_includedir}/packagekit-backend +%{_includedir}/packagekit-backend/*.h %changelog +* Mon Oct 20 2008 Richard Hughes - 0.3.7-2 +- Rename as newest upstream has QT binding also: + * PackageKit-libs -> PackageKit-glib + * PackageKit-devel -> PackageKit-glib-devel +- Add a BR for comps, and create a link that from the comps icons for the + new category group icons. +- Create a subpackage for devel files required for out-of-tree backends. + * Mon Oct 13 2008 Richard Hughes - 0.3.7-1 - New upstream version - Add dynamic groups functionality to the API diff --git a/pk-idle-add-pkcontrol-refresh.patch b/pk-idle-add-pkcontrol-refresh.patch deleted file mode 100644 index 9c20bbb..0000000 --- a/pk-idle-add-pkcontrol-refresh.patch +++ /dev/null @@ -1,102 +0,0 @@ -commit 34fc97830dd9ced41b9f8873ea5c357de25e3c46 -Author: Richard Hughes -Date: Thu Oct 9 16:44:24 2008 +0100 - - bugfix: don't crash the client tools if PkControl launches the daemon - - If the daemon is launched with PkControl, rather than PkClient, then we attempt to refresh the transaction - list when the PkControl object is not finished initialising, and we send a critical warning. - The fix is to only do the refresh in an idle handler, making sure we kill it if nothing ever runs on - the object - -diff --git a/libpackagekit/pk-control.c b/libpackagekit/pk-control.c -index e22082d..03769e8 100644 ---- a/libpackagekit/pk-control.c -+++ b/libpackagekit/pk-control.c -@@ -66,6 +66,7 @@ struct _PkControlPrivate - DBusGConnection *connection; - PkConnection *pconnection; - gchar **array; -+ guint idle_id; - }; - - enum { -@@ -653,6 +654,26 @@ pk_control_transaction_list_refresh (PkControl *control, GError **error) - } - - /** -+ * pk_control_transaction_list_refresh_idle_cb: -+ * @control: This class instance -+ **/ -+static gboolean -+pk_control_transaction_list_refresh_idle_cb (PkControl *control) -+{ -+ gboolean ret; -+ GError *error = NULL; -+ -+ /* refresh the internal lists */ -+ ret = pk_control_transaction_list_refresh (control, &error); -+ if (!ret) { -+ egg_warning ("failed to get list: %s", error->message); -+ g_error_free (error); -+ } -+ control->priv->idle_id = 0; -+ return FALSE; -+} -+ -+/** - * pk_control_transaction_list_get: - **/ - const gchar ** -@@ -685,8 +706,8 @@ static void - pk_control_connection_changed_cb (PkConnection *pconnection, gboolean connected, PkControl *control) - { - /* force a refresh so we have valid data*/ -- if (connected) -- pk_control_transaction_list_refresh (control, NULL); -+ if (connected && control->priv->idle_id == 0) -+ control->priv->idle_id = g_idle_add ((GSourceFunc) pk_control_transaction_list_refresh_idle_cb, control); - } - - /** -@@ -851,7 +872,6 @@ pk_control_class_init (PkControlClass *klass) - static void - pk_control_init (PkControl *control) - { -- gboolean ret; - GError *error = NULL; - - control->priv = PK_CONTROL_GET_PRIVATE (control); -@@ -865,6 +885,7 @@ pk_control_init (PkControl *control) - - /* we maintain a local copy */ - control->priv->array = NULL; -+ control->priv->idle_id = 0; - - /* watch for PackageKit on the bus, and try to connect up at start */ - control->priv->pconnection = pk_connection_new (); -@@ -908,12 +929,8 @@ pk_control_init (PkControl *control) - dbus_g_proxy_connect_signal (control->priv->proxy, "Locked", - G_CALLBACK (pk_control_locked_cb), control, NULL); - -- /* force a refresh so we have valid data*/ -- ret = pk_control_transaction_list_refresh (control, &error); -- if (!ret) { -- egg_warning ("failed to get list: %s", error->message); -- g_error_free (error); -- } -+ /* idle add a refresh so we have valid data */ -+ control->priv->idle_id = g_idle_add ((GSourceFunc) pk_control_transaction_list_refresh_idle_cb, control); - } - - /** -@@ -944,7 +961,8 @@ pk_control_finalize (GObject *object) - dbus_g_proxy_disconnect_signal (control->priv->proxy, "RestartSchedule", - G_CALLBACK (pk_control_restart_schedule_cb), control); - -- /* free the proxy */ -+ if (control->priv->idle_id != 0) -+ g_source_remove (control->priv->idle_id); - g_object_unref (G_OBJECT (control->priv->proxy)); - g_strfreev (control->priv->array); -