Summary

We currently have a bunch of logs but no good overview about the what packages got installed when. This should be changed by adding code to libapt that writes out a package-transactions logfile when it spawns dpkg. And by providing a UI for this in software-center (and possibly synaptic).

Release Note

SoftwareCenter shows a complete history of all package transactions now.

Rationale

To understand why certain packages got installed/removed its important to see why something changed. The history provides such a mechanism.

User stories

Joe installed a new game yesterday but can't remember the name. He looks into the history and figure based on that what the name of the game was.

Design

This spec needs to be split into two parts. The backend implementation in libapt that writes out a logfile to /var/log/apt/apt.log when apt-pkg/deb/dpkgpm.cc spawns dpkg. The backend should look like this:

Start-Date: 2009-11-26 08:46:45
Transaction-ID: aa3423daf342adfsdf323
Remove: chromium chromium-bsu
Upgrade: synaptic (0.5+svn20091028r30374-0ubuntu1~ucd2, 0.5+svn20091028r30374-0ubuntu1~ucd3), foo (1.0, 2.0)
Install: 2vcard (1.0)
Result: False
Error: Sub-process exit with status 1
End-Date: 2009-11-26 09:46:45

Start-Date: ...
...

The parser needs to be robust against missing End-Data, Error or Result. Those may be missing because apt could not finish the transaction (power down etc). All version information is optional. The Transaction-ID must also be written to the /var/log/apt/term.log so that the history feature can find the corresponding term.log section (for details/error inspections). The log should be rotated (monthly?).

A frontend in software-center is added that reads this logfile and shows it in a nice UI to the user.

Implementation

See work items of the blueprint.

UI Changes

The UI needs to be defined by the design team.

Discussion

It was a long time since I used this wiki, so forgive if posting in the wrong place. I just wanted to say that /var/log/dpkg.log seems to contain the log of installed packages (including the time when they were installed. So creating a new backend for this is kind of reinventing the wheel? Maybe dpkg.log doesn't contain "all" information but at least it's saying when a package was installed (which at least I think is the most important thing). - tomplast


CategorySpec

FoundationsTeam/Specs/LucidSoftwareCenterHistory (last edited 2009-12-26 18:57:45 by tomplast)