3

Although I use apt-listchanges I don't always have time to read through all the changes (news and changelogs). I would like to instead review changes after-the-fact, for example by listing the changes for all packages that I updated in the last 48 hours.

For example, can I:

  • store the results of apt-listchanges in a time-based sequence
  • query apt for "all changelogs from all packages updated in the last 48 hours"
  • something else?

Ideally this list would include new packages, and packages that have been updated but have no news or changelog content.

4

store the results of apt-listchanges in a time-based sequence

The approach I like best for this is to configure apt-listchanges to send me an email with the changes; the time-based sequence is then maintained by my email client.

query apt for "all changelogs from all packages updated in the last 48 hours"

There isn’t anything built-in for this (apt doesn’t specifically track the date/time at which packages are installed or upgraded), however you can find this out from the logs. Look at /var/log/apt/history.log*; you’ll find all the operations performed by apt and siblings, with the following information for each:

  • the start and end date/time;
  • the requesting user (if run using sudo);
  • the list of upgraded packages, if any, with the previously installed version and the version upgraded to;
  • the list of installed packages, if any, with the installed version and an indication of whether they were automatically installed;
  • the list of removed packages, if any;
  • the list of purged packages, if any.

You could parse that to determine changes made in the last 48 hours, and for upgrades, use the version information to extract the relevant portions of the changelogs and news.

This will ignore package operations performed directly with dpkg; you could look at /var/log/dpkg.log* for details of those, but they’re a bit harder to parse (and you’d have to filter out operations corresponding to apt operations).

(Note that upgraded packages will always have at least changelog content, at least if they come from Debian; in some cases it will be an arch-specific changelog, but there will always be something.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.