No bzr-gtk command runs (incl. olive) if seahorse isn't installed

Bug #228922 reported by Mark Lee
24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
High
Sabin Iacob
bzr-gtk (Debian)
Fix Released
Unknown

Bug Description

I don't have seahorse installed yet (I've been waiting for the GIO changes) and since 0.94.0 has been released, I can't run bzr viz, bzr gannotate, etc.

Attached is a patch which "works for me" (famous last words, so to speak) which catches the error shown below so that the bzr-gtk commands run for me.

Console output:

$ bzr gannotate configure.ac
bzr: ERROR: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.seahorse was not provided by any .service files

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 802, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 504, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/plugins/gtk/__init__.py", line 298, in run
    from annotate.gannotate import GAnnotateWindow
  File "/usr/lib/python2.4/site-packages/bzrlib/plugins/gtk/annotate/gannotate.py", line 31, in ?
    from bzrlib.plugins.gtk.revisionview import RevisionView
  File "/usr/lib/python2.4/site-packages/bzrlib/plugins/gtk/revisionview.py", line 30, in ?
    from bzrlib.plugins.gtk import seahorse
  File "/usr/lib/python2.4/site-packages/bzrlib/plugins/gtk/seahorse.py", line 42, in ?
    crypto = dbus.Interface(bus.get_object(BUS_NAME, CRYPTO_PATH),
  File "/usr/lib/python2.4/site-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.4/site-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.4/site-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.4/site-packages/dbus/connection.py", line 606, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.seahorse was not provided by any .service files

bzr 1.4 on python 2.4.4 (linux2)
arguments: ['/usr/bin/bzr', 'gannotate', 'configure.ac']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bisect /home/malept/.bazaar/plugins/bisect [unknown]
  builddeb /usr/lib/python2.4/site-packages/bzrlib/plugins/builddeb [0.92.0dev0]
  bzrtools /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools [1.4.0]
  dbus /usr/lib/python2.4/site-packages/bzrlib/plugins/dbus [unknown]
  gnulog /home/malept/.bazaar/plugins/gnulog.py [unknown]
  gtk /usr/lib/python2.4/site-packages/bzrlib/plugins/gtk [0.94.0]
  hg /home/malept/.bazaar/plugins/hg [unknown]
  launchpad /usr/lib/python2.4/site-packages/bzrlib/plugins/launchpad [unknown]
  rebase /usr/lib/python2.4/site-packages/bzrlib/plugins/rebase [0.2.0]
  svn /usr/lib/python2.4/site-packages/bzrlib/plugins/svn [0.4.9]
  vimdiff /home/malept/.bazaar/plugins/vimdiff [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Mark Lee (malept) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 228922] Re: No bzr-gtk command runs (incl. olive) if seahorse isn't installed

  status triaged
  importance high

The patch catches all DBusExceptions, not just those that indicate the
seahorse service isn't there.
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Sabin Iacob (iacobs) wrote :

dbus.validate_bus_name only checks that the name is valid, it won't check if the name is actually provided on the bus, so maybe this approach is better: only catch org.freedesktop.DBus.Error.ServiceUnknown exceptions and raise ImportError from bzrlib.plugins.gtk.seahorse.
bundle attached.

Revision history for this message
Sabin Iacob (iacobs) wrote :

erm, wrong file, sorry.

Changed in bzr-gtk:
assignee: nobody → dasch
Sabin Iacob (iacobs)
Changed in bzr-gtk:
assignee: dasch → iacobs
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
status: Fix Committed → Fix Released
Changed in bzr-gtk:
status: Unknown → Confirmed
Changed in bzr-gtk (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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