Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 532328

Summary: app-emulation/virt-manager-1.1.0 - /usr/share/virt-manager/virtManager/connect.py", line 273, in start_browse: GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Avahi was not provided by any .service files
Product: Gentoo Linux Reporter: Joakim Tjernlund <joakim.tjernlund>
Component: Current packagesAssignee: Virtualization Team <virtualization>
Status: RESOLVED FIXED    
Severity: normal CC: gmturner007, uwe
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Joakim Tjernlund 2014-12-11 22:28:24 UTC
File->Add Connection gives me:

Error launching connect dialogue: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Avahi was not provided by any .service files

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 714, in _do_show_connect
    self._get_connect_dialog().show(src.topwin, reset_state)
  File "/usr/share/virt-manager/virtManager/connect.py", line 143, in show
    self.start_browse()
  File "/usr/share/virt-manager/virtManager/connect.py", line 273, in start_browse
    service, domain, flags)
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gio.py", line 171, in __call__
    None)
GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Avahi was not provided by any .service files

You only get this if no avahi installed and have dev-libs/dbus-glib installed

This quick patch fixes it:
--- virtManager/connect.py.org	2014-12-11 22:22:24.738608689 +0100
+++ virtManager/connect.py	2014-12-11 22:10:51.617237749 +0100
@@ -95,7 +95,10 @@
             self.avahiserver = Gio.DBusProxy.new_sync(self.dbus, 0, None,
                                     "org.freedesktop.Avahi", "/",
                                     "org.freedesktop.Avahi.Server", None)
+            self.avahiserver.GetVersionString()
+            logging.debug("self.avahiserver=%s", self.avahiserver)
         except Exception, e:
+            self.avahiserver = None
             logging.debug("Couldn't contact avahi: %s", str(e))
 
         self.reset_state()
Comment 1 Greg Turner 2015-01-01 06:58:14 UTC
I've seen this error, and have dbus-glib w/o avahi like Joakim says.  Haven't had the chance to test the patch yet.
Comment 2 Matthias Maier gentoo-dev 2015-01-01 10:38:48 UTC
The patch looks good. Can you attach it next time and the "PATCH" keyword?

Fortunately, except for the annoying error message, functionality remains intact, so I've just applied the patch to 1.1.0-r1 and 9999.


*virt-manager-1.1.0-r1 (01 Jan 2015)

  01 Jan 2015; Matthias Maier <tamiko@gentoo.org>
  +files/virt-manager-1.1.0-optional_avahi.patch, +virt-manager-1.1.0-r1.ebuild,
  virt-manager-1.1.0.ebuild, virt-manager-9999.ebuild:
  supress an error message in case avahi is not installed, bug #532328
Comment 3 Matthias Maier gentoo-dev 2015-04-05 14:39:09 UTC
*** Bug 537436 has been marked as a duplicate of this bug. ***