Package: packagekit
Version: 1.1.4-3

Should the PackageKit dbus interface work without gnome-software
installed?

Via the packagekit web site I came across the following example code,
<URL: https://www.freedesktop.org/software/PackageKit/files/session.py >:

  import dbus

  try:
      bus = dbus.SessionBus()
  except dbus.DBusException, e:
      print 'Unable to connect to dbus: %s' % str(e)
      sys.exit()
  try:
      proxy = bus.get_object('org.freedesktop.PackageKit', 
'/org/freedesktop/PackageKit')
      iface = dbus.Interface(proxy, 'org.freedesktop.PackageKit.Modify')
      iface.InstallPackageNames(dbus.UInt32(0), ["openclipart-libreoffice", 
"openclipart"], "show-confirm-search,hide-finished")
  except dbus.DBusException, e:
      print 'Unable to use PackageKit: %s' % str(e)

But when I test it, I get this error message:

  Unable to use PackageKit: org.freedesktop.DBus.Error.ServiceUnknown:
    The name org.freedesktop.PackageKit was not provided by any .service
    files

I tracked this down to the fact that the
/usr/share/dbus-1/services/org.freedesktop.PackageKit.service is missing
when installing packagekit.  It is included in gnome-software, which I
did not have installed in my KDE desktop.

Should the file perhaps be moved to the packagekit package, or is it
only working with Gnome?

After installing the gnome-software package, the script no longer show
an error message, but I am still unable to install anything.  I get a
notification requesting package installation, and when I click on either
the unnamed button or the 'Finn i programv...' button, I get a popup
which disappear as quickly as it apperas.

Am I doing it wrong?  The background for my quest is to try to ensure
isenkramd work properly with PackageKit.  It seem to only work properly
with some hardware (those with only one modalias value) and I am trying
to find examples explaining how to use PackageKit with python these
days.  The examples I find, like the one above, do not work for me. :(

-- 
Happy hacking
Petter Reinholdtsen

Reply via email to