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

yum: fix yum version comparison #36573

Merged
merged 2 commits into from Feb 23, 2018
Merged

Conversation

mkrizek
Copy link
Contributor

@mkrizek mkrizek commented Feb 22, 2018

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

yum

ANSIBLE VERSION
devel
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Feb 22, 2018

@ansibot ansibot added bugfix_pull_request core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. owner_pr This PR is made by the module's maintainer. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 22, 2018
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Feb 22, 2018
@@ -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'):
Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@mkrizek mkrizek added this to READY TO REVIEW in CEM Feb 22, 2018
@mkrizek mkrizek changed the title yum: use distutils.version for check yum: fix yum version comparison Feb 22, 2018
Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed core_review In order to be merged, this PR must follow the core review workflow. labels Feb 22, 2018
@mkrizek mkrizek merged commit a79a543 into ansible:devel Feb 23, 2018
@mkrizek mkrizek deleted the yum-version-check-fix branch February 23, 2018 07:55
@mkrizek mkrizek moved this from READY TO REVIEW to DONE in CEM Feb 23, 2018
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@dagwieers dagwieers added the packaging Packaging category label Mar 3, 2019
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. module This issue/PR relates to a module. owner_pr This PR is made by the module's maintainer. packaging Packaging category shipit This PR is ready to be merged by Core support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
CEM
DONE
Development

Successfully merging this pull request may close these issues.

None yet

5 participants