Comment 1 for bug 903756

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Here is a short python example:

from gi.repository import PackageKitGlib as pk

client = pk.Client()
res = client.get_updates(pk.FilterEnum.NONE, None, lambda p, t, d: True, None)
updates = 0
security = 0
for pkg in res.get_package_array():
    updates += 1
    info = pkg.get_info()
    if info == pk.InfoEnum.SECURITY:
        security =+ 1
print "There are %s updates available totally" % updates
if security:
    print "There are %s important security updates!" % security