[packagekit] How to get an install time of package?

Richard Hughes hughsient at gmail.com
Fri Mar 20 04:42:48 PDT 2009

On Fri, 2009-03-20 at 10:09 +0100, Michal Vyskocil wrote:
> is there any way how to get an install time of package using PackageKit? Rpm 
> has an INSTALLTIME tag, but I'd like to use PackageKit. I read the 
> documentation, but it seems PackageKit does not provide it.

No, we don't provide such low level data as this.

> The first thinking was just get a Debian implementation, sed 's/dpkg/rpm' and 
> everything would be done. But even if dpkg call is relative cheap, the rpm 
> opens and closes a transaction, so run of the popcon client on rpm system is 
> very slow.

Yes, you don't want to do it that way, in fact, I don't think dpkg
should be doing that either for that matter...

> So my colleague implemented a new client called popcorn [3], which produces a 
> same output as Debian script, but uses a python rpm module, so all queries are 
> done in one transaction, which is much faster than calling rpm binary.

Sounds good.

> But it would be nice to make popcorn usable on every Linux distribution (and 
> I've found some notices about popularity contest in appinstall archive [4]

To be honest, if the overhead of calling rpm is too high, then I think
the overhead of the daemon transaction setup, daemon message validation
and the dbus calls is also going to be too high for you. Just getting a
complete raw package list using PackageKit can take over a second.

I'm also a little confused about how the INSTALLTIME tag can tell you
popularity -- surely the number of times the application was started
would be a better metric?


More information about the PackageKit mailing list