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
yum: fix yum version comparison #36573
Conversation
@@ -347,7 +348,7 @@ def is_group_env_installed(name, conf_file, installroot='/'): | |||
name_lower = name.lower() | |||
|
|||
my = yum_base(conf_file, installroot) | |||
if yum.__version__ >= '3.4': | |||
if LooseVersion(yum.__version__) >= LooseVersion('3.4'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LooseVersion is broken in Python 3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abadger any hints on what is proper way of doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For yum, use yum.__version_info__
to compare against.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SUMMARY
ISSUE TYPE
COMPONENT NAME
yum
ANSIBLE VERSION
ADDITIONAL INFORMATION