Hello community,

here is the log from the commit of package PackageKit for openSUSE:Factory 
checked in at 2013-09-27 17:56:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/PackageKit (Old)
 and      /work/SRC/openSUSE:Factory/.PackageKit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "PackageKit"

Changes:
--------
--- /work/SRC/openSUSE:Factory/PackageKit/PackageKit.changes    2013-09-09 
10:53:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.PackageKit.new/PackageKit.changes       
2013-09-27 17:56:10.000000000 +0200
@@ -1,0 +2,8 @@
+Thu Sep 26 16:50:37 UTC 2013 - dims...@opensuse.org
+
+- Add PackageKit-destroy-and-recreate.patch: Destroy and re-create
+  the control proxy if the server changes. Helps gnome-software to
+  be able to communicate with packagekitd after restarting the
+  daemon.
+
+-------------------------------------------------------------------

New:
----
  PackageKit-destroy-and-recreate.patch

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

Other differences:
------------------
++++++ PackageKit.spec ++++++
--- /var/tmp/diff_new_pack.leCj0D/_old  2013-09-27 17:56:11.000000000 +0200
+++ /var/tmp/diff_new_pack.leCj0D/_new  2013-09-27 17:56:11.000000000 +0200
@@ -35,6 +35,8 @@
 Patch2:         0002-Build-against-npapi-sdk-instead-of-xulrunner.patch
 # PATCH-FIX-UPSTREAM PackageKit-dbus-location.patch bnc#829944 
dims...@opensuse.org -- Look for dbus socket in /run instead of /var/run. Sent 
to upstream.
 Patch3:         PackageKit-dbus-location.patch
+# PATCH-FIX-UPSTREAM PackageKit-destroy-and-recreate.patch 
dims...@opensuse.org -- Destroy and re-create the control proxy if the server 
changes
+Patch4:         PackageKit-destroy-and-recreate.patch
 # To update this package, please git-format-patch the tag of the
 # tarball version (eg: PACKAGEKIT_0_6_19) vs the distro tag (eg: 
openSUSE_Factory)
 # in https://github.com/openSUSE/PackageKit and keep the patches
@@ -257,6 +259,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 translation-update-upstream
 
 %build

++++++ PackageKit-destroy-and-recreate.patch ++++++
>From e1498ff60188eaf1a4ef58ee207ee5b900189550 Mon Sep 17 00:00:00 2001
From: Richard Hughes <rich...@hughsie.com>
Date: Mon, 23 Sep 2013 16:34:58 +0100
Subject: [PATCH] lib: Destroy and re-create the control proxy if the server 
changes

Although I don't think this shouldn't be required as org.freedesktop.PackageKit
is a well-known service, it seems that from gnome-software we need to manually
disconnect and reconnect when packagekitd is restarted.

Weirdly, gnome-packagekit isn't affected in the same way.
---
 lib/packagekit-glib2/pk-control.c |   35 ++++++++++++++++++++++++++---------
 1 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/lib/packagekit-glib2/pk-control.c 
b/lib/packagekit-glib2/pk-control.c
index 9477e65..e319bea 100644
--- a/lib/packagekit-glib2/pk-control.c
+++ b/lib/packagekit-glib2/pk-control.c
@@ -2447,6 +2447,24 @@ pk_control_name_appeared_cb (GDBusConnection *connection,
 }
 
 /**
+ * pk_control_proxy_destroy:
+ **/
+static void
+pk_control_proxy_destroy (PkControl *control)
+{
+       if (control->priv->proxy == NULL)
+               return;
+       g_signal_handlers_disconnect_by_func (control->priv->proxy,
+                                             G_CALLBACK 
(pk_control_properties_changed_cb),
+                                             control);
+       g_signal_handlers_disconnect_by_func (control->priv->proxy,
+                                             G_CALLBACK (pk_control_signal_cb),
+                                             control);
+       g_object_unref (control->priv->proxy);
+       control->priv->proxy = NULL;
+}
+
+/**
  * pk_control_name_vanished_cb:
  **/
 static void
@@ -2458,6 +2476,11 @@ pk_control_name_vanished_cb (GDBusConnection *connection,
        control->priv->connected = FALSE;
        g_debug ("notify::connected");
        g_object_notify (G_OBJECT(control), "connected");
+
+       /* destroy the proxy, as even though it's "well known" we get a
+        * GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown if we try to
+        * use this after the server has restarted */
+       pk_control_proxy_destroy (control);
 }
 
 /**
@@ -2497,6 +2520,9 @@ pk_control_finalize (GObject *object)
        g_cancellable_cancel (priv->cancellable);
        g_bus_unwatch_name (priv->watch_id);
 
+       /* disconnect proxy and destroy it */
+       pk_control_proxy_destroy (control);
+
        /* remove pending sources */
        if (priv->transaction_list_changed_id != 0)
                g_source_remove (priv->transaction_list_changed_id);
@@ -2506,15 +2532,6 @@ pk_control_finalize (GObject *object)
                g_source_remove (priv->updates_changed_id);
        if (priv->repo_list_changed_id != 0)
                g_source_remove (priv->repo_list_changed_id);
-       if (priv->proxy != NULL) {
-               g_signal_handlers_disconnect_by_func (priv->proxy,
-                                                     G_CALLBACK 
(pk_control_properties_changed_cb),
-                                                     control);
-               g_signal_handlers_disconnect_by_func (priv->proxy,
-                                                     G_CALLBACK 
(pk_control_signal_cb),
-                                                     control);
-               g_object_unref (priv->proxy);
-       }
 
        g_free (priv->backend_name);
        g_free (priv->backend_description);
-- 
1.7.1


-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to