I spent my evening discovering the lack of documentatoin the python rpm bindings have. I read the article
The Six Dumbest Ideas in Computer Security and started thinking about a point made in #2
Examine a typical antivirus package and you'll see it knows about 75,000+ viruses that might infect your machine. Compare that to the legitimate 30 or so apps that I've installed on my machine, and you can see it's rather dumb to try to track 75,000 pieces of Badness when even a simpleton could track 30 pieces of Goodness.
RPM already knows about all the "Goodness" on my system, so the idea is that anything not in places like /home, /tmp, /var or /usr/local wasn't put there by me.
I have no idea where I will go with this, or even if I'll do anything, but it struck me as useful if I could easily constuct a list of things that the RPM database doesn't know about, or things that don't have the permissions or content RPM thinks they should have. I'm aware of the "rpm -V" command, but that's not very extendable, and it doesn't tell me of files that aren't in the RPM database.
On the topic of the python rpm bindings ...
I had a terrible time figuring them out. Luckily I found enough from reading yum source and trial and error, I think I know what I need to know now.