#775011 gir1.2-packagekitglib-1.0: resolving package with arch filter fails using GIR interface

Package:
gir1.2-packagekitglib-1.0
Source:
packagekit
Description:
GObject introspection data for the PackageKit GLib library
Submitter:
Thomas Kluyver
Date:
2015-01-09 23:09:07 UTC
Severity:
normal
#775011#5
Date:
2015-01-09 23:05:16 UTC
From:
To:
According to the packagekit docs, the arch filter should only return packages
matching the system architecture:
http://www.freedesktop.org/software/PackageKit/gtk-doc/introduction-ideas-
filters.html

Using pkcon, this works:

$ pkcon resolve --filter arch python3-zmq
Resolving                     [=========================]
Loading cache                 [=========================]
Installed       python3-zmq-14.4.0-1.amd64 (testing)
Python3 bindings for 0MQ library


However, using the Gobject introspection bindings from Python (2 or 3), it does
not find any matching packages:

In [1]: from gi.repository import PackageKitGlib

In [2]: t = PackageKitGlib.Task()
....
In [10]: res = t.resolve(PackageKitGlib.FilterEnum.ARCH, ['python3-zmq'], None,
cb, None)

In [11]: [p.get_id() for p in res.get_package_array()]
Out[11]: []

This appears to be specific to the ARCH filter: resolving packages with the
filter set to NONE or INSTALLED works as expected.

$ uname -a
Linux tom 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64
GNU/Linux