[packagekit] Adding support for "prepare" in transaction_flags

Richard Hughes hughsient at gmail.com
Sun Jun 3 14:37:43 PDT 2012


On 3 June 2012 20:22, Matthias Klumpp <matthias at tenstral.net> wrote:
> I think it would be worth to do it, but I'm not sure what Richard has to say ^^

I think the Commit() method makes a lot of sense. What I think we should do is:

* Create Transaction.Commit(transaction_flags)
* Add a NO_COMMIT enum to PkTransactionFlag
* Add code in *every* pk-backend-*.c that if NO_COMMIT is present in
transaction_flags then return ErrorCode(NO_SUPPORT)
* Add pk_task_set_auto_commit(PkTask *task, gboolean auto_commit),
with auto_commit by default set to TRUE.
* If auto_commit is FALSE in PkTask when we do the non-simulate
transaction then add the NO_COMMIT flag
* Encourage backends that can do delayed commit (yum, zif, aptcc, etc)
to implement NO_COMMIT and *not* call pk_backend_finished() if doing
that.
* Add support to apper/gnome-packagekit for NO_COMMIT and Commit()
once the well-supported backends have support

This means that clients that don't set the new flag on each
transaction "just work" and any that want to be clever-ass can do the
additional Commit() step :)

If this sounds like a plan, I'm happy to add the Commit() large additions.

Richard.


More information about the PackageKit mailing list