0
votes

I need to patch a yum plugin hosted at: https://github.com/seporaitis/yum-s3-iam/blob/master/s3iam.py, essentially if the s3 repo is unreachable the script throws an error and yum dies ungracefully. I need to change it so that if the repo is unreachable, yum will continue to search other available repos.

Wrapping any thrown exceptions in a URLGrabError nearly fixed the problem except when yum tries to install an rpm that is local to the machine.

Unfortunately yum.baseurl.org has been unreachable for several days now so I don't have any access to documentation on how to write/fix yum plugins. If anyone has those pages cached somewhere or can find another in depth guide I would really appreciate them.

1

1 Answers

0
votes

yum.baseurl.org is still down but it turns out yum is pretty much all Python code. The best way I could come up to fix the repo was to do a test url grab within a try catch. If any errors occur, the repo will just disable itself. I had to add the code twice since different yum hooks are called depending on whether you are installing locally or remotely.