[packagekit] Adding properties to the transaction interface

Sebastian Heinlein sebi at glatzor.de
Sun Sep 6 01:01:40 PDT 2009


On Tue, Sep 01, 2009 at 12:23:26PM +0100, Richard Hughes wrote:
> I've just merged a commit[1] that adds properties to each transaction
> object, such as role, status, allow-cancel etc. The old methods to get
> this state (GetRole, GetStatus, GetAllowCancel, etc) are now
> deprecated, but are not going to be removed any time soon (perhaps for
> 0.6.0 in a few months time).
> 
> So, why is the interface switching to properties rather than a method
> for each one:
> 
> * Clients that want to "coldplug" the state to watch the transaction
> needed to perform 3-4 synchronous methods before they could show any
> UI
> * The only reason they were not properties before is I didn't know how
> to expose properties in dbus-glib when I prototyped PackageKit over
> two years ago
> * We do not need the overhead of a method, this data is public and
> will not be protected by PolicyKit
> 
> So, the benefits of switching to properties are that we can coldplug
> in one DBus call (GetAll on the .Properties interface) and than there
> will be a metric shedload less method code when we remove the old
> methods. It'll be a better interface, and easier to debug and use in
> python.

Unfortunately there is no implementation of the
dbus.PROPERTIES_IFACE in the D-Bus python bindings - no introspection
and not automatic signal matching. So this has to be done manually.

But actually the Python client bindings of PackageKit are in a bad
shape. There isn't any real async support, still uses obsolete
policykit and a nested main loop.

Did you attend the optimize and profile D-Bus talk of Will Thomas? After 
watching the recording I also switched to the protperties interface in my other
project.

Cheers,

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/packagekit/attachments/20090906/080d943d/attachment.pgp 


More information about the PackageKit mailing list