[packagekit] Packagekit example help

Parag N(पराग़) panemade at gmail.com
Thu Feb 14 01:31:28 PST 2013

   I am looking for a simple working python program on Fedora 18 to install
packages using PackageKit. I tried following code

import dbus

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

2 issues here
1) when executed from terminal, I see
ERROR:dbus.proxies:Introspect error on :1.97:/org/freedesktop/PackageKit:
dbus.exceptions.IntrospectionParserException: Error parsing introspect
data: <class 'xml.parsers.expat.ExpatError'>: unbound prefix: line 5,
column 4

2) m17n-contrib package is already installed but its not attempting to
install other m17n-contrib-extras package. Can you tell me why can't it
proceed with not installed packages?
also on terminal I got message
Unable to use PackageKit: org.freedesktop.PackageKit.Failed: The package
m17n-contrib is already installed

3) Which API call of Packagekit can be used to install multiple packages
that can ignore already installed packages?

Thanks in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20130214/e9e54749/attachment.html>

More information about the PackageKit mailing list