Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple issues with "global name not defined" in centos-errata.py #3

Open
korymatu opened this issue Apr 13, 2012 · 1 comment
Open

Comments

@korymatu
Copy link

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.

@philicious
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants