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

to

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.

http://skvidal.fedorapeople.org/misc/mungingdiff.py

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: