[packagekit] New RUNNING status enum
hughsient at gmail.com
Tue Mar 25 10:54:19 PDT 2008
I've just added a new status enum, I'll save time and paste in the
* A typical transaction will do:
* - schedule task
* - run task
* - wait for lock
So this means that you should not send and status updates UNTIL you have
a lock on the package system. Adding this new enum means we can tell
when the transaction is setting up, or when it's waiting.
So in libpackagekit (and thus client tools) you can assume:
WAIT = waiting to be scheduled to be run
SETUP = setting up, spawning processes/threads, waiting for locks etc
RUNNING = actually doing what you want it to
FINISHED = finished what you wanted it to do
There should be no changes needed to backends, as if you set any other
value to WAIT then the RUNNING signal is assumed and auto-generated.
However, if you doing the status output before getting the package lock
then things will break.
Some backends will need tweaking, so that the pk_backend_set_status(FOO)
happens after the thread is created, for example opkg, but nothing
should break if things are in the wrong place.
All of this lets us tell the user why the UI isn't working :-)
More information about the PackageKit