PackageKit Reference Manual |
---|
A transaction will have different status values as it it queued, prepared
and executed.
The ::StatusChanged
signal from PkClient allow you
to design user interfaces that tell the user what is happening with the
transaction.
A typical transaction will have the following states:
Queued in the active queue (PK_STATUS_ENUM_WAIT
)
Transaction started, and is being prepared (PK_STATUS_ENUM_SETUP
)
The transaction is running (PK_STATUS_ENUM_RUNNING
)
(optional) Data is downloading (PK_STATUS_ENUM_DOWNLOADING
)
(optional) Data is installing (PK_STATUS_ENUM_INSTALLING
)
The transaction is finished (PK_STATUS_ENUM_FINISHED
)
If the transaction is waiting for other jobs to finish (in the active queue)
then the status will be stuck at PK_STATUS_ENUM_WAIT
and the UI should show a message to this effect.
If the transaction is waiting for a package lock (when a legacy tool like
pirut
is loaded and has the yum
lock)
then the transaction will be stuck at PK_STATUS_ENUM_WAITING_FOR_LOCK
.
As a backend writer, you do not have to set PK_STATUS_ENUM_RUNNING
manually, as this will be set for you if you set any other value such as
PK_STATUS_ENUM_DOWNLOADING
or PK_STATUS_ENUM_INFO
.
However, you will need to avoid setting any status values until a package
lock is available and the transaction has started.