munging rpm diff
June 15, 2009
For checking changes from one package to another we’ve discussed a better rpmdiff that wouldn’t report so many bogons in the filelists and provides, requires, obsoletes, conflicts.
After giving it a bit of a think I worked out a mungingdiff for pkgs.
It reports items that matter, not all the stuff you EXPECT to change. For example:
if the pkg goes from foo-1.1-1 to foo-1.2-1
and its provides change from:
Provides: fooball = 1.1-1
Provides: fooball = 1.2-1
it’s a little silly to report that in a diff. Same thing with filenames. If a bunch of files move from /usr/share/doc/foo-1.1 to /usr/share/doc/foo-1.2 but don’t change otherwise does it matter? No. Not in any functional way.
So I cobbled together a proof of concept that I’ll be moving internal to yum package objects so they can provide a diff between two pkg objects, I think.
Run it like:
mungingdiff.py pkg1 pkg2
a couple of minor things. It doesn’t return diffs between the name, arch, epoch, ver, release. It is working on the assumption that if you don’t know those things have changed then you’re Sorry out of Luck.
I also know the output sucks, big surprise.