[packagekit] Packagekit example help

Parag N(पराग़) panemade at gmail.com
Mon Feb 18 01:33:50 PST 2013


Hi,

On Thu, Feb 14, 2013 at 3:01 PM, Parag N(पराग़) <panemade at gmail.com> wrote:

> Hi,
>    I am looking for a simple working python program on Fedora 18 to
> install packages using PackageKit. I tried following code
> --------------------------------------------------------------------------------------------
>
> 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), ["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.
>

any help please?


> Regards,
> Parag.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20130218/cd8ae6b8/attachment.html>


More information about the PackageKit mailing list