[packagekit] simultaneous mode

Richard Hughes hughsient at gmail.com
Tue Feb 24 03:19:41 PST 2009


I've attached a patch that I've just checked into master. 

It adds another internal method that backends can use,
pk_backend_set_simultaneous_mode(). This simultaneous mode allows a
backend to control precisely what package and status-changed events are
simulated, so that we can support backends that can download two files
simultaneously, or download and install two sub-transactions at the same
time.

I don't think any of the backends in tree can do this yet, although
there are at least two backends that could use this mechanism in the
future.

Almost like a free gift, adding the extra package signal also lets us
support GUI's like this: http://www.flickr.com/photos/patrys/2555940924/
where the package has it's own percentage, although we'll still need to
do more work to decide on how to map the sub-percentage onto the package
if the backend is working in simultaneous mode. Long term we'll probably
be throwing some more API at that if there's interest from you guys.

So, what do you need to do:

* GUI people: ignore any packages that come at you with FINISHED when
you're doing an update, install or remove.

* Binding people: add the FINISHED enumerated value to the info enums,
on the wire format is "finished".

* Backend people: (optional, and probably not required) add the
appropriate finished calls into the backend, and turn on simultaneous
mode if desired. Most likely you can put your fingers in your ears and
get on with life as normal.

Now, the daemon at the moment makes all the existing backends work using
emulation, so it's completely forward and backward compatible. Old
frontends with a new daemon should ignore the unknown signal which only
exists for a split second. How it all works is documented in the patch.

Comments welcome,

Richard.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pk-siml.patch
Type: text/x-patch
Size: 12261 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20090224/1f4804bc/attachment-0004.bin>


More information about the PackageKit mailing list