Multiple issues with "global name not defined" in centos-errata.py
I finally got around to updating my errata sync stuff for spacewalk, and in so doing I ran into a number of issues with version 0.7 of the script. I wasn't aware of any other way to contact/submit the issues so I'll list out the changes here:
In centos-errata.py...
Line 854: Changed from: print "Errata '%s' doesnt match any of the known types " % erratum_subject Changed to: print "Errata '%s' doesnt match any of the known types " % message_subject
Line 1046: Changed from: mailarchive_url = MAILARCHIVE_BASE Changed to: mailarchive_url = MessageMailArchive.MAILARCHIVE_BASE
These changes addressed "global name not defined" issues that I would receive when running the script.
Also, my directory structure is not conducive to using the "dir" search strategy. I was looking for a quick solution, so I created a symlink directory with the various packages symlinked (added to my daily cron that runs spacewalk-repo-sync): rm -f /var/satellite/symlinks/* find /var/satellite -iname '*.rpm' -exec ln -s -t /var/satellite/symlinks {} ;
I think it'd be nice to have a find or locate search strategy added at some point. I may start working on it myself but I'm not great with Python.
I guess you got the 0.7 version off David Nutters website. The initial version on Github would be considered 0.8 so I suggest you try this to get around the errors you mentioned. Also there are two forks of this Script: Mine (https://github.com/philicious/Centos-Errata/tree/) that enables the script to run on the /var/satellite/ folder where spacewalk stores the rpms
And (https://github.com/unreality/Centos-Errata/tree/) which enables the spacewalk-strategy, which asks spacewalk over the API where the package is stored. Best solution in my eyes, but you need to have repos set up with sha265 checksum