Bzr and DBus

Russel Winder russel.winder at concertant.com
Tue May 6 17:33:58 BST 2008


On Tue, 2008-05-06 at 23:21 +0800, James Henstridge wrote:

> If you have python-dbus installed, then that error is a bit bizarre.

I have to admit, I was beginning to wonder what was going on, the things
people were proposing didn't quite gel with my understanding of Python
and the Apt packaging system.

Interesting things are going to get even more bizarre...

> There are a few things that would be useful to know:
> 
> 1. can you try running python and issuing the following two commands:
> 
>     >>> import dbus
>     >>> import dbus.service

>>> import dbus
>>> import dbus.service
>>> 

So there seems to be no reason why I got the dbus.service error when
running bzr.

> From a bit of experimentation, the "No module named dbus.service"
> error looks like a problem with importing the toplevel dbus module.

But its there and Python can find it.

> 2. what version of python-dbus do you have installed?  The apt-cache
> command can give you this information.  Its output should be something
> like this:
> 
>     $ apt-cache policy python-dbus
>     python-dbus:
>       Installed: 0.82.4-1ubuntu1
>       Candidate: 0.82.4-1ubuntu1
>       Version table:
>      *** 0.82.4-1ubuntu1 0
>             500 http://ftp.iinet.net.au hardy/main Packages
>             100 /var/lib/dpkg/status

I get exactly the same result as the above.

So dbus.service must have been there.  I can only imagine that bzr is
upsetting Python's ability to find a standard package -- which is of
course silly.  And yet:

[14589] 2008-05-06 17:25:27.832 WARNING: Unable to load plugin 'dbus'
from '/usr/lib/python2.5/site-packages/bzrlib/plugins'
0.656  Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/plugin.py", line 195, in
load_from_dir
    exec "import bzrlib.plugins.%s" % name in {}
  File "<string>", line 1, in <module>
  File
"/usr/lib/python2.5/site-packages/bzrlib/plugins/dbus/__init__.py", line
67, in <module>
    from activity import Activity, LanGateway
  File
"/usr/lib/python2.5/site-packages/bzrlib/plugins/dbus/activity.py", line
28, in <module>
    import dbus.service
ImportError: No module named dbus.service

I am guessing that bzr-dbus is the problem.  Does it perhaps amend the
search path and forget the standard Python library?

I tried removing bzr-dbus and it makes no difference the same error
message.  I tried reloading the package in case any installation actions
might change things but still the same.  This seems to let bzr-dbus off
the hook as the culprit.

I see no reason why the module cannot be found unless it is looking in
Python 2.3 or Python 2.4 instead of Python 2.5.

-- 
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080506/6da612da/attachment.pgp 


More information about the bazaar mailing list