-
Notifications
You must be signed in to change notification settings - Fork 12
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
Use init hook instead of prereposetup #6
Closed
dave-pollock
wants to merge
1
commit into
tellapart:master
from
dave-pollock:use-init-hook-instead-of-prereposetup
Closed
Use init hook instead of prereposetup #6
dave-pollock
wants to merge
1
commit into
tellapart:master
from
dave-pollock:use-init-hook-instead-of-prereposetup
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is working for us, I assume they changed the internal interface or behavior of YUM. This is targeting Cent 7.x what distro are you running? |
Hi @fabianmenges, I'm using CentOS 7 - see below for details. cat /etc/centos-release
yum --version
With `def prereposetup_hook(conduit):`
With `def init_hook(conduit):`
Hope that helps. Let me know if any other info would be useful. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into this issue: #3
When debugging, I could see that Yum was hitting the error inside the _baseurlSetup method: http://yum.baseurl.org/download/docs/yum-api/3.2.27/yum.yumRepo-pysrc.html#YumRepository._baseurlSetup
It seemed as if the YumRepository class was not being overridden by the GCSRepository class, so the normal validation was being applied to the GCS repo.
I added
conduit.info(2, 'prereposetup_hook')
at the beginning of theprereposetup_hook
method and as far as I could see it was never being called. It's as if the validation occurs in Yum before the prereposetup hook is run.Using the
init_hook
instead caused the code to run and everything started working. No more validation error.I don't really understand how this plugin ever worked given the behavior I'm seeing - No idea if this is specific to the version of Yum I'm using or what - and I have no idea if there will be unintended side effects of using the init hook instead, but this seems to be working for me..
I could be completely off track here so @fabianmenges please let me know if I'm doing something stupid.
Yum version: 3.4.3
CentOS 7