I'm writing a tool to verify RPMs in Python and print out the actual diffs in the files that changed.
I can fetch the RPMs from the ftp server with ftplib
. I was thinking of saving the rpm in /tmp
and using subprocess
module to run
rpm2cpio myrpmfile.rpm | cpio -idmv
to get the files in the RPM so that I can diff the files. Afterwards, I'll delete the temp files.
It seems a bit hacky, so is this the best approach, or is there a more elegant solution with Python?