Hello community,

here is the log from the commit of package zeitgeist for openSUSE:Factory
checked in at Thu Jul 21 10:04:59 CEST 2011.



--------
--- GNOME/zeitgeist/zeitgeist.changes   2011-07-08 01:26:47.000000000 +0200
+++ /mounts/work_src_done/STABLE/zeitgeist/zeitgeist.changes    2011-07-20 
10:54:04.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jul 20 08:51:59 UTC 2011 - [email protected]
+
+- Add zeitgeist-properties-regression.patch: Fix regression that
+  broke properties (get_version and get_extensions). Patch taken
+  from launchpad, commit rev 1789.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  zeitgeist-properties-regression.patch

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

Other differences:
------------------
++++++ zeitgeist.spec ++++++
--- /var/tmp/diff_new_pack.78Psrt/_old  2011-07-21 10:04:40.000000000 +0200
+++ /var/tmp/diff_new_pack.78Psrt/_new  2011-07-21 10:04:40.000000000 +0200
@@ -20,12 +20,14 @@
 
 Name:           zeitgeist
 Version:        0.8.1
-Release:        1
+Release:        2
 License:        LGPLv2.1+
 Summary:        Zeitgeist Engine
 Url:            https://launchpad.net/zeitgeist
 Group:          Productivity/Other
 Source:         %{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM zeitgeist-properties-regression.patch 
[email protected] -- Fix regression that broke properties (get_version and 
get_extensions). Patch taken from launchpad, rev 1789.
+Patch0:         zeitgeist-properties-regression.patch
 # dbus required for file ownership only.
 BuildRequires:  dbus-1
 BuildRequires:  fdupes
@@ -51,6 +53,7 @@
 %lang_package
 %prep
 %setup -q
+%patch0 -p0
 
 %build
 %configure

++++++ zeitgeist-properties-regression.patch ++++++
=== modified file 'zeitgeist/client.py'
--- zeitgeist/client.py 2011-07-07 14:11:34 +0000
+++ zeitgeist/client.py 2011-07-07 23:39:37 +0000
@@ -67,15 +67,16 @@
                return methods, signals
 
        def reconnect(self):
-               self.__proxy = 
dbus.SessionBus().get_object(self.__iface.requested_bus_name,
-                       self.__object_path)
+               self.__proxy = dbus.SessionBus().get_object(
+                       self.__iface.requested_bus_name, self.__object_path)
                self.__iface = dbus.Interface(self.__proxy, 
self.__interface_name)
                self._load_introspection_data()
 
-       def _disconnection_safe(self, method_name, *args, **kwargs):
+       def _disconnection_safe(self, method_getter, *args, **kwargs):
                """
-               Executes the given method. If it fails because the D-Bus 
connection
-               was lost, attempts to recover it and executes the method again.
+               Executes the method returned by method_getter. If it fails 
because
+               the D-Bus connection was lost, it attempts to recover it and 
executes
+               the method again.
                """
                
                custom_error_handler = None
@@ -87,8 +88,7 @@
                                self.reconnect()
                                # We don't use the reconnecting_error_handler 
here since that'd
                                # get us into an endless loop if Zeitgeist 
really isn't there.
-                               meth = getattr(self.__iface, method_name)
-                               return meth(*args, **original_kwargs)
+                               return method_getter()(*args, **original_kwargs)
                        else:
                                if custom_error_handler is not None:
                                        custom_error_handler(e)
@@ -102,8 +102,7 @@
                        kwargs['error_handler'] = reconnecting_error_handler
 
                try:
-                       meth = getattr(self.__iface, method_name)
-                       return meth(*args, **kwargs)
+                       return method_getter()(*args, **kwargs)
                except dbus.exceptions.DBusException, e:
                        return reconnecting_error_handler(e)
 
@@ -115,9 +114,15 @@
                        Method wrapping around a D-Bus call, which attempts to 
recover
                        the connection to Zeitgeist if it got lost.
                        """
-                       return self._disconnection_safe(name, *args, **kwargs)
+                       return self._disconnection_safe(
+                               lambda: getattr(self.__iface, name), *args, 
**kwargs)
                return _ProxyMethod
 
+       def get_property(self, property_name):
+               return self._disconnection_safe(
+                       lambda: self.__proxy.get_dbus_method("Get", 
dbus.PROPERTIES_IFACE),
+                       self.__interface_name, property_name)
+
        def connect(self, signal, callback, **kwargs):
                """Connect a callback to a signal of the current proxy 
instance."""
                if self.__signals is None:
@@ -201,18 +206,12 @@
        def version(self):
                """Returns the API version"""
                dbus_interface = self.__shared_state["dbus_interface"]
-               return dbus_interface._disconnection_safe(
-                       dbus_interface.proxy.get_dbus_method("Get",
-                               dbus_interface=dbus.PROPERTIES_IFACE),
-                       self.INTERFACE_NAME, "version")
+               return dbus_interface.get_property("version")
        
        def extensions(self):
                """Returns active extensions"""
                dbus_interface = self.__shared_state["dbus_interface"]
-               return dbus_interface._disconnection_safe(
-                       dbus_interface.proxy.get_dbus_method("Get",
-                               dbus_interface=dbus.PROPERTIES_IFACE),
-                               self.INTERFACE_NAME, "extensions")
+               return dbus_interface.get_property("extensions")
        
        def get_extension(cls, name, path, busname=None):
                """ Returns an interface to the given extension.


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



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to