PackageKit Reference Manual |
---|
The following sections explain frequently asked questions from people creating thier own backend. This list is not exhaustive, but please ask before adding to it.
If you compile with developer warnings, you may get notifications on your desktop telling you you've done something wrong:
If your backend does not set status signals you will get the following dialog:
For every transaction, you need to tell the daemon what the backend is doing. You need to add to your backend:
For python: self.status(STATUS_QUERY)
For compiled C/C++: pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
You can send as many status calls as you need as the transaction progresses.
The more calls you send, the more the UI will reflect what is being done, for instance,
showing a downloading icon when PK_STATUS_ENUM_DOWNLOAD
is used.
If your backend does not send Finished()
after ErrorCode()
then the following dialog will be shown.
The daemon recovers automatically, so this warning is not fatal, but the automatic recovery is not cost free. Every time the daemon cleans up a transaction like this, an additional 500ms is added to the transaction duration (to allow slow backends to clean up after themselves) and so the next transaction is delayed from starting.
You need to ensure that Finished()
follows ErrorCode()
to remove this warning.
If your backend does not correctly use the PkInfo field in Package()
or it does not filter packages according to the specified filter, then the following dialog will be shown.
You need to ensure that you respect the filter setting, as frontends will not do client-side filtering.