[packagekit] Canceling background transaction

Richard Hughes hughsient at gmail.com
Mon Mar 14 09:09:39 PDT 2011


A proposal:

packagekitd has one task running thanks to a session service
automatically getting the updates list:

[running] get-updates (non-interactive, background)

and then the user fires off a search, so now we have:

[running] get-updates (non-interactive, background)
[waiting] search-name (interactive, foreground)

The last thing we want to is make the user wait for a task that can
easily be rescheduled in a few minutes to no ill effect.

I'm proposing we cancel non-interactive tasks if an interactive task
is present. It'll be up to the session program to reschedule the
non-interactive task when convenient. This would mean special casing
the ErrorCode of CANCELLED_PRIORITY (better names welcomed) and just
rescheduling the action straight away. In the case of packagekit-glib,
this would be automatic.

Comments?

Richard.



More information about the PackageKit mailing list