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
Here is a short python example:
from gi.repository import PackageKitGlib as pk
client = pk.Client() get_updates( pk.FilterEnum. NONE, None, lambda p, t, d: True, None) package_ array() : SECURITY:
res = client.
updates = 0
security = 0
for pkg in res.get_
updates += 1
info = pkg.get_info()
if info == pk.InfoEnum.
security =+ 1
print "There are %s updates available totally" % updates
if security:
print "There are %s important security updates!" % security