On Thu, 11 Dec 2008, Dag Wieers wrote:

On Thu, 11 Dec 2008, Dag Wieers wrote:
 On Thu, 11 Dec 2008, Dag Wieers wrote:

> In an attempt to run Elisa on CentOS 5 I packaged a lot of python > modules, > including pigment 0.3.13 and python-pigment 0.3.9, somehow I still get > the
>   following errors when running elisa:

 I modified elisa/core/media_directory_helper.py because xdg.xdg_content()
 consistenly returned None, and because of that I always got:

    TypeError: iteration over non-sequence


After having found that xdg-user-dirs is apparently mandatory and finding the problem related to the elisa-plugins (the patch from Matthias Saou helped here). I now got to the next error message:

-snip-

What looks like a dbus incompatibility. Where the installed versions look like:

[EMAIL PROTECTED] ~]$ rpm -q dbus dbus-python
dbus-1.1.2-12.el5
dbus-python-0.70-7.el5

What does Elisa require and can we work around this ?

By patching some more code I found that Elisa requires dbus-python 0.86 optionally. But since I have an older dbus-python (0.70) it does not cleanly disable support.

So I patched in file elisa/plugins/pigment/pigment_frontend.py, the _initialize_dbus and _clean_dbus functions to return if the initialisation fails. So that dbus effectively becomes optional in case we have an incompatible python-dbus installed

------
     def _initialize_dbus(self):
         if 'dbus' not in sys.modules:
             # no dbus support
             return

+        try:
             bus = dbus.SessionBus()
             self.bus_name = \
                     dbus.service.BusName('com.fluendo.Elisa', bus)
             self.dbus_frontend = DBusFrontend(self, bus,ยท
                     '/com/fluendo/Elisa/Plugins/Pigment/Frontend', 
self.bus_name)
+        except:
+            # dbus support incompatible
+            del self.bus_name
+            return

     def _clean_dbus(self):
         if 'dbus' not in sys.modules:
             # no dbus support
             return

+        try:
             bus = dbus.SessionBus()
             self.dbus_frontend.remove_from_connection(bus,
                     '/com/fluendo/Elisa/Plugins/Pigment/Frontend')
             # BusName implements __del__, eew
             del self.bus_name

             # remove the reference cycle
             del self.dbus_frontend
+        except:
+            # dbus support incompatible
+            return
------

And when we have done that, I get the pop-up, the screen becomes black, the screen is restored and the output looks like this:

------
[EMAIL PROTECTED] ~]$ elisa
GTK Accessibility Module initialized
Launcher core version: 0.5.21
Current core version: 0.5.21
/usr/lib/python2.4/site-packages/elisa/core/utils/classinit.py:34: UserWarning: 
ClassInitMeta class is deprecated
  warn("ClassInitMeta class is deprecated")
libGL warning: 3D driver claims to not support visual 0x5b
/usr/lib/python2.4/site-packages/elisa/core/service_manager.py:27: 
DeprecationWarning: ServiceProvider.start is deprecated.
  warn("ServiceProvider.%s is deprecated." % attr, DeprecationWarning)
Segmentation fault
------

I know the thread looks very much like a monologue, but if it segfaults, it's a dead-end for me :-/

Any feedback ?
--
--   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
[Any errors in spelling, tact or fact are transmission errors]

Reply via email to