Checkmirror mirror synchronization helper

This checkmirror script is used with William Stearn's yum-pull script (modified) to try to reduce unwanted downloads of stale RPMs.

The yum-pull script, as distributed on Mr. Stearn's site is really pretty good. It keeps track of everything it has downloaded and if the proper tools are available on your site will expire old RPMs for you and keep track of them so they aren't downloaded again. That's pretty handy.

Unfortunately, you have to download them at least once before they are excluded. You can create the exclusion files by hand if you want, but this is quite a lot of bother. Some mirror sites keep all the old update releases and others keep only the most recent. You can think you have everything excluded that you need and then hit some mirror that keeps everything around and suddenly you're downloading ancient stuff for no purpose.

The checkmirror script goes through a list of files on the mirror site and compares them with files on your own site. Old RPMs on the mirror are automatically excluded so you never download them at all. This used to be done with a very nice version comparison provided by the perl package. Sadly, its maintenance is in doubt, so I've had to roll my own. I don't guarantee that this new hand coded variation is completely bug free, but it has been doing much better of late. If RPM naming and version identification conventions were standardized and everyone followed the standard it would be a very good thing.

I'm sure this script could find some other uses as well, but reducing the bandwidth overhead of multiple downloads of old RPMs only to delete them automatically when done made it worth writing.

You can access the script download page via this checkmirror link using the password checkmirror.