dbus plugin falls over when /usr/bin/bzr not found

Bug #125425 reported by Ian Clatworthy
2
Affects Status Importance Assigned to Milestone
bzr-dbus
Fix Released
Medium
Unassigned

Bug Description

Hmm - not so nice. I did have Feisty's bzr package (0.15) installed earlier today but I de-installed it, installed the dbus plugin and then tried installing the rebase one ...

ian@possum:~/.bazaar/plugins$ bzr branch http://people.samba.org/bzr/jelmer/bzr-rebase/trunk rebase
bzr: ERROR: dbus.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/bin/bzr: No such file or directory

Traceback (most recent call last):
  File "/home/ian/bzr/bzr.018rc/bzrlib/commands.py", line 729, in run_bzr_catch_errors
  File "/home/ian/bzr/bzr.018rc/bzrlib/commands.py", line 691, in run_bzr
  File "/home/ian/bzr/bzr.018rc/bzrlib/commands.py", line 389, in run_argv_aliases
  File "/home/ian/bzr/bzr.018rc/bzrlib/builtins.py", line 871, in run
  File "/home/ian/bzr/bzr.018rc/bzrlib/bzrdir.py", line 796, in sprout
  File "/home/ian/bzr/bzr.018rc/bzrlib/decorators.py", line 127, in read_locked
  File "/home/ian/bzr/bzr.018rc/bzrlib/branch.py", line 687, in sprout
  File "/home/ian/bzr/bzr.018rc/bzrlib/decorators.py", line 127, in read_locked
  File "/home/ian/bzr/bzr.018rc/bzrlib/branch.py", line 721, in copy_content_into
  File "/home/ian/bzr/bzr.018rc/bzrlib/branch.py", line 712, in _synchronize_history
  File "/home/ian/bzr/bzr.018rc/bzrlib/decorators.py", line 165, in write_locked
  File "/home/ian/bzr/bzr.018rc/bzrlib/branch.py", line 1387, in set_revision_history
  File "/home/ian/.bazaar/plugins/dbus/hook.py", line 41, in on_set_rh
    activity.Activity().advertise_branch(branch)
  File "/home/ian/.bazaar/plugins/dbus/activity.py", line 75, in advertise_branch
    self.announce_revision(branch.last_revision(), branch.base)
  File "/home/ian/.bazaar/plugins/dbus/activity.py", line 86, in announce_revision
    self._call_on_broadcast('announce_revision', revision, url)
  File "/home/ian/.bazaar/plugins/dbus/activity.py", line 106, in _call_on_broadcast
    Broadcast.DBUS_PATH)
  File "/var/lib/python-support/python2.5/dbus/_dbus.py", line 410, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/var/lib/python-support/python2.5/dbus/proxies.py", line 230, in __init__
    _dbus_bindings.UInt32(0))
  File "/var/lib/python-support/python2.5/dbus/proxies.py", line 169, in __call__
    reply_message = self._connection.send_message_with_reply_and_block(message, timeout)
DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/bin/bzr: No such file or directory

bzr 0.18.0candidate1 on python 2.5.1.final.0 (linux2)
arguments: ['/home/ian/bin/bzr', 'branch', 'http://people.samba.org/bzr/jelmer/bzr-rebase/trunk', 'rebase']

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I thought this might be an installation issue so I checked the README and did the 'kill -HUP' of the dbus daemon in case the path was a cached value in there. I then went to /tmp and tried again and got the same result.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 125425] dbus plugin falls over when /usr/bin/bzr not found

On Thu, 2007-07-12 at 06:29 +0000, Ian Clatworthy wrote:
> Public bug reported:
>
> Hmm - not so nice. I did have Feisty's bzr package (0.15) installed
> earlier today but I de-installed it, installed the dbus plugin and then
> tried installing the rebase one ...

> DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/bin/bzr: No such file or directory

I think this is really a dbus bug. The problem is that the services file
has to have the exact path rather than using your user path, which is
quite annoying.

Anyhow, we should catch org.freedesktop.DBus.Error.Spawn.ExecFailed and
handle that to prevent this blowing up in peoples faces.

 status triaged
 importance medium

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Changed in bzr-dbus:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 125425] Re: dbus plugin falls over when /usr/bin/bzr not found

On Thu, 2007-07-12 at 06:37 +0000, Ian Clatworthy wrote:
> I thought this might be an installation issue so I checked the README
> and did the 'kill -HUP' of the dbus daemon in case the path was a cached
> value in there. I then went to /tmp and tried again and got the same
> result.

You need to either edit your services file to point at the bzr you do
have installed; or you need to remove the services file. The kill -HUP
your daemon.

-Rob

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

And the bad thing is, this failure didn't just break the notification functionality - it broke the branch. I had to move the dbus plugin out the way, rm -rf the stuff put into the 'rebase' directory and try again (which worked). My expectation, rightly or wrongly, was that the notification should have failed but the branching should have continued to complete correctly.

Revision history for this message
Robert Collins (lifeless) wrote :

On Thu, 2007-07-12 at 06:48 +0000, Ian Clatworthy wrote:
> And the bad thing is, this failure didn't just break the notification
> functionality - it broke the branch. I had to move the dbus plugin out
> the way, rm -rf the stuff put into the 'rebase' directory and try again
> (which worked). My expectation, rightly or wrongly, was that the
> notification should have failed but the branching should have continued
> to complete correctly.

Huh? The branch object should have been fine. Doing 'checkout .' would
have constructed your user files.

-Rob

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I didn't think to try 'checkout .' sorry. After I got a good branch though, I did a diff from the failed attempt to branch against the good one ...

ian@possum:/tmp$ diff -r rebase /home/ian/.bazaar/plugins/rebase
diff -r rebase/.bzr/branch/branch-name /home/ian/.bazaar/plugins/rebase/.bzr/branch/branch-name
0a1
> rebase
Only in /home/ian/.bazaar/plugins/rebase/.bzr/branch: parent
Only in /home/ian/.bazaar/plugins/rebase/.bzr: checkout
Only in /home/ian/.bazaar/plugins/rebase: __init__.py
Only in /home/ian/.bazaar/plugins/rebase: __init__.pyc
Only in /home/ian/.bazaar/plugins/rebase: maptree.py
Only in /home/ian/.bazaar/plugins/rebase: README
Only in /home/ian/.bazaar/plugins/rebase: rebase.py
Only in /home/ian/.bazaar/plugins/rebase: test_blackbox.py
Only in /home/ian/.bazaar/plugins/rebase: test_maptree.py
Only in /home/ian/.bazaar/plugins/rebase: test_rebase.py

As you can see, there are a few differences in .bzr over and above the working tree. FYI.

Revision history for this message
Robert Collins (lifeless) wrote :

The differences are the checkout object and a branch parent pointer - nothing substantial.

Anyhow this should be fixed with the new catch-all-dbus-connection-errors fix in trunk.

Changed in bzr-dbus:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.