[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: When packages are installed.

David H. Silber writes ("When packages are installed."):
> In working on the dbackup program, I find that I need to be able to determine
> the installation date (& time) of a package.  As a stopgap measure, I was
> using the date that the /var/lib/dpkg/info/<package>.list was last modified.
> This is unworkable as that file's modification date will change.
> Could you add an ``Installed:'' field to the package status database and
> put in that field the date and time (down to the second, at least) that the
> package was installed.

I've suggested to David that a log of actions taken by dpkg might
contain the infoormation he wants, and that's oon my wishlist anyway.

> P.S.  My program is reading the status file without support from dpkg.  If
> you ever change the database structure, dbackup will fail to work.  Perhaps
> an interface could be provided (dpkg-database?) which would provide certain
> types of information depending on the arguments specified.

The status database format is pretty static, because it's very similar
to the control file format (which is an interchange format).

If you're writing in C there's code in libdpkg.a in the lib
subdirectory of the dpkg source tree which can parse the status
database for you and load it into a C data structure.


Reply to: