[packagekit] Package signal after install, remove and update
Richard Hughes
hughsient at gmail.com
Tue Apr 14 02:17:56 PDT 2009
On Sat, 2009-04-11 at 23:42 +0200, Sebastian Heinlein wrote:
> why should I as a backend author emit a Package() signal after
> processing install-packages, remove-packages or update-packages?
It basically allows you to tell the UI what you're doing, so if you're
using a GUI like the update viewer, it positions the cursor on the
correct line, and puts the correct icon there. In the plain monitor GUI,
it also displays the correct icon and text.
> I haven't found any hints in the git log or the source code.
What about if I add something like this:
---
A typical transaction will emit many signals. These different signals
are needed for different reasons:
* ::StatusChanged(): The global state of the transaction, which will be
useful for some GUIs. Examples include downloading or installing, and
this is designed to be a 40,000ft view of what is happening.
* ::Package(): Used to either return a result (e.g. returning results of
the SearchName() method) or to return progress about a _specific_
package. For instance, when doing UpdateSystem(),
sending ::Package(downloading) and then ::Package(installing) for each
package as processed in the transaction allows a GUI to position the
cursor on the worked on package and show the correct icon for that
package.
* ::ErrorCode(): to show an error to the user about the transaction,
which can be cleaned up before sending ::Finished()
* ::Finished(): to show the transaction has finished, and others can be
scheduled
---
Is this clearer?
Richard.
More information about the PackageKit
mailing list