Use PackageKit interface to aptdaemon

Bug #903756 reported by Ken VanDine
86
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Session Menu
Fix Released
High
Conor Curran
indicator-session (Ubuntu)
Fix Released
High
Conor Curran
Precise
Fix Released
High
Conor Curran

Bug Description

aptdaemon in precise now includes support for the PK API, which is the preferred method for determining the state of updates. This should be more reliable than the current approach indicator-session uses and hopefully will resolve a few of the open bugs related to update notification.

http://bazaar.launchpad.net/~aptdaemon-developers/aptdaemon/main/view/head:/README.PackageKit
http://www.packagekit.org/gtk-doc/api-reference.html

Related branches

Changed in indicator-session:
importance: Undecided → High
Changed in indicator-session (Ubuntu):
importance: Undecided → High
Conor Curran (cjcurran)
Changed in indicator-session:
assignee: nobody → Conor Curran (cjcurran)
Changed in indicator-session (Ubuntu):
assignee: nobody → Conor Curran (cjcurran)
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

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

You should query for the updates some minutes after the session is started and after the org.freedesktop.PackageKit.UpdatesChanged() signal has been emitted. There is no need anymore to query for updates after each completed transaction. The signal gets emitted by packagekit/aptdaemon after each transaction which would change the number of available updates.

Omer Akram (om26er)
Changed in indicator-session:
status: New → Triaged
Changed in indicator-session (Ubuntu):
status: New → Triaged
Conor Curran (cjcurran)
Changed in indicator-session:
status: Triaged → In Progress
Changed in indicator-session (Ubuntu Precise):
status: Triaged → In Progress
Conor Curran (cjcurran)
Changed in indicator-session:
milestone: none → 0.3.91
Conor Curran (cjcurran)
Changed in indicator-session:
status: In Progress → Fix Committed
Changed in indicator-session (Ubuntu Precise):
status: In Progress → Fix Committed
Conor Curran (cjcurran)
Changed in indicator-session (Ubuntu Precise):
status: Fix Committed → In Progress
Changed in indicator-session:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-session - 0.3.91-0ubuntu1

---------------
indicator-session (0.3.91-0ubuntu1) precise; urgency=low

  * Backport "Don't lock the session when switching to another one"
    work from Robert Ancell, the screen locking is already done by
    consolekit and enforcing it there is problematic to i.e use the
    lightdm greeter as a lock screen (lp: #878836)
  * debian/control:
    - recommends python-aptdaemon.pkcompat so packagekit doesn't get installed
  * debian/source/format:
    - use v1, v3 doesn't play nicely with vcs backports

  [ Ken VanDine ]
  * New upstream release. (lp: #903756)
  * debian/control
    - added new build depends on libpackagekit-glib2-dev
 -- Sebastien Bacher <email address hidden> Tue, 14 Feb 2012 18:49:02 +0100

Changed in indicator-session (Ubuntu Precise):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.