[packagekit] Adding support for "prepare" in transaction_flags
Matthias Klumpp
matthias at tenstral.net
Sun Jun 3 15:33:16 PDT 2012
Hi!
2012/6/4 Richard Hughes <hughsient at gmail.com>:
> On 3 June 2012 23:03, Matthias Klumpp <matthias at tenstral.net> wrote:
>> Sounds sane to me! Thanks for thinking about this :-)
>
> Except we need a new name. Commit() is used quite a lot in PackageKit
> internally, and a new concept with the same name makes the code as
> confusing as hell. Better ideas welcome. Perhaps
> Transaction.Complete(), Transaction.Exec(), Transaction.Go()?
Transaction.Execute() sounds good, as "complete" would be more like a
state name ("transaction is completed")
Go() is also okay.
> There are also a few difficult to solve problems.
> * Does Transaction.Role enum then become a Transaction.Roles bitfield,
> or do we have a ROLE_COMPLETE which can mean 'any'?
Bitfield sounds good, if there are benefits in doing that - is it
important to know what the transaction did?
> * Does .Complete() need a PolicyKit authentication type?
No, probably not.
> * Do we ask for auth when we do InstallPackage() or when we do
> Complete()? Or both?
I'd ask when doing InstallPackages() - if user has no authorization to
do InstallPackages(), nothing can be executed on Complete() - Of
course, frontends should be able to handle that.
(Just my first thoughts about that)
--- Matthias
>
>> And btw, this shows how great and extensible the new TransactionFlags are!
>
> Yes, I think so too. :)
>
> Richard.
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
More information about the PackageKit
mailing list