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

Pavol Rusnak prusnak at suse.cz
Fri Mar 20 04:51:17 PDT 2009


Richard Hughes wrote:
> 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?

INSTALLTIME does not tell popularity directly. It is only one parameter
used in the computation. We check when the package was last used (atime
of its files). If it is less than one month the package is marked as
recently used. If it is more than one month the package is marked as old
(installed but not used). Howerver if it was installed less then a month
ago (here we use INSTALLTIME), mark it as recently installed and the
previous results have no meaning. More info here:
http://repo.or.cz/w/popcorn.git?a=blob;f=README

-- 
Best Regards / S pozdravom,

Pavol RUSNAK                                       SUSE LINUX, s.r.o
Package Maintainer                                Lihovarska 1060/12
PGP 0xA6917144                                     19000 Praha 9, CR
prusnak[at]suse.cz                                http://www.suse.cz



More information about the PackageKit mailing list