- Add a patch from upstream to fix rh#466290
Mon Oct 06 2008 Richard Hughes <rhughes@redhat.com> - 0.3.6-2
- Upload new sources. Ooops.
Mon Oct 06 2008 Richard Hughes <rhughes@redhat.com> - 0.3.6-1
- New upstream version
- Renice the spawned process so that we don't hog the system when doing
updates
Wed Oct 01 2008 Richard Hughes <rhughes@redhat.com> - 0.3.5-4
- Rename the subpackages before David blows a blood vessel.
- yum-packagekit -> PackageKit-yum-plugin
- udev-packagekit -> PackageKit-udev-helper
This commit is contained in:
parent
bea2cc93e0
commit
96380012f6
@ -8,15 +8,15 @@
|
||||
Summary: System daemon that is a DBUS abstraction layer for package management
|
||||
Name: PackageKit
|
||||
Version: 0.3.6
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://packagekit.freedesktop.org
|
||||
Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# upstream: 920574b72805a630ea989b32012e2b4bbf1841ea
|
||||
#Patch0: pk-fix-64bit-codecs.patch
|
||||
# upstream: 34fc97830dd9ced41b9f8873ea5c357de25e3c46
|
||||
Patch0: pk-idle-add-pkcontrol-refresh.patch
|
||||
|
||||
Requires: dbus >= %{dbus_version}
|
||||
Requires: dbus-glib >= %{dbus_glib_version}
|
||||
@ -158,7 +158,7 @@ codecs from configured repositories using PackageKit.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
#%patch0 -p1
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure --enable-yum --enable-smart --with-default-backend=yum --disable-local
|
||||
@ -299,6 +299,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Oct 09 2008 Richard Hughes <rhughes@redhat.com> - 0.3.6-3
|
||||
- Add a patch from upstream to fix rh#466290
|
||||
|
||||
* Mon Oct 06 2008 Richard Hughes <rhughes@redhat.com> - 0.3.6-2
|
||||
- Upload new sources. Ooops.
|
||||
|
||||
|
||||
102
pk-idle-add-pkcontrol-refresh.patch
Normal file
102
pk-idle-add-pkcontrol-refresh.patch
Normal file
@ -0,0 +1,102 @@
|
||||
commit 34fc97830dd9ced41b9f8873ea5c357de25e3c46
|
||||
Author: Richard Hughes <richard@hughsie.com>
|
||||
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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user