[packagekit] Using the python GI
Alex Eftimie
alex at rosedu.org
Fri Jun 3 03:21:06 PDT 2011
On Fri, Jun 3, 2011 at 1:03 PM, Alex Eftimie <alex at rosedu.org> wrote:
> --
> from gi.repository import PackageKitGlib as pk
> client = pk.Client()
> def cb(status, type, data):
> pass
>
> client.get_details("hal;0.0.1;i386;ubuntu", None, cb, None)
>
> Segmentation fault (core dumped)
> --
Another failing code:
--
>>> from gi.repository import PackageKitGlib as pk
>>> client = pk.Client()
>>> def cb(status, type, data):
... pass
...
>>> result = client.search_names(0, "power", None, cb, None)
(process:17514): PackageKit-DEBUG: role now search-name
(process:17514): PackageKit-DEBUG: emit transaction-list-changed (when idle)
(process:17514): PackageKit-DEBUG: already processing request 0x1, so ignoring
(process:17514): PackageKit-DEBUG: already processing request 0x1, so ignoring
(process:17514): PackageKit-DEBUG: already processing request 0x2, so ignoring
(process:17514): PackageKit-DEBUG: properties changed, so getting new list
(process:17514): PackageKit-DEBUG: already processing request 0x4, so ignoring
(process:17514): PackageKit-DEBUG: already processing request 0x4, so ignoring
(process:17514): PackageKit-DEBUG: emit transaction-list-changed (when idle)
>>>
>>> result
<Results object at 0x9999a54 (PkResults at 0x99ca018)>
>>> result
<Results object at 0x9999a54 (PkResults at 0x99ca018)>
>>> result.get_package_array()
** (process:17514): WARNING **:
(/build/buildd/pygobject-2.28.3/gi/pygi-argument.c:1332):_pygi_argument_to_object:
runtime check failed: (transfer == GI_TRANSFER_NOTHING)
Segmentation fault (core dumped)
--
Alex
More information about the PackageKit
mailing list