Is there any way to get source diffs between a locally-installed package and its updated one? This will be useful to check exactly which parts have been fixed, changed or added.
For example, say you have the linux-libc-dev package installed on your system and
sudo apt-get update && sudo apt-get upgrade
shows
The following packages will be upgraded:
linux-libc-dev
but you want to check, before upgrading it, the exact changes that have been made compared to your local version of the same package.
How can we do it?
Afaik the only way to do this is to get the source and make the diff's your self. You can get the actual source used for compiling the packages with apt-get. fx:
This will print out all differences between all files in a standard patch format.
Here's another solution I hacked together: whatchanged.
It takes the name of the binary package you're interested in as the only argument. To use a recent SRU as an example:
This is what it does:
debdiff
and output to stdout (you'll probably want to redirect for easier reading)It probably needs to better handle certain things that may go wrong during source retrieval, the flow control is probably a bit off, and there must be more elegant ways for version checking, but it worked fine in my limited testing so far. For now, consider it a quick hack that works, and improvements are most welcome. I'll push it to a bzr repository and/or create a Launchpad project if it's useful to a few people.
Edit: Rather than let it rot on pastebin, I've started a Launchpad project for it; you can get the latest trunk revision with
bzr branch lp:whatchanged
. Feel free to report bugs, branch it, rewrite it in Perl, etc.Here's one (probably not optimal) UDD way of doing it:
Pull -updates branch for your release (assuming Lucid) that (assumption follows) should contain the latest SRU:
Get the changes introduced by the latest revision, which (assumption follows) should correspond to the latest SRU:
If you want to see file differences in the package archives, extract their md5sums files, sort and diff those, and then you can narrow the list of actual files to compare dramatically.
May not be the "exact" changes, but
apt-listchanges
lists the changelog entries for the changes that have been made since the installed version.It works by adding a step after you finish downloading the new packages, but before the installation starts, where it shows you the changelog entry for each package about to be upgraded. You can then continue or cancel. You can install it with
then set it up with