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/dnf: fail when space separated string of names #47109

Merged
merged 2 commits into from Oct 19, 2018

Conversation

mkrizek
Copy link
Contributor

@mkrizek mkrizek commented Oct 16, 2018

SUMMARY

@maxamillion I wonder if the failure is too much but the docs clarification is worth adding I think.

Related to #46301

ISSUE TYPE
  • Docs Pull Request
  • Feature Pull Request
COMPONENT NAME

yum
dnf

ANSIBLE VERSION
devel
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Oct 16, 2018

Hi @mkrizek, thank you for submitting this pull-request!

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Oct 16, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 docs This issue/PR relates to or includes documentation. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 16, 2018
@@ -98,6 +98,15 @@ def __init__(self, module):
self.enablerepo = self.listify_comma_sep_strings_in_list(self.enablerepo)
self.exclude = self.listify_comma_sep_strings_in_list(self.exclude)

# Fail if someone passed a space separated string
# https://github.com/ansible/ansible/issues/46301
if any((' ' in name for name in self.names)):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hrm, so my assumption "who would put space in a package name?" wasn't true of course. This breaks @Development Tools use case.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, so a rpm package name can not contain a space, but groups can. I guess you can just add a and '@' not in name to your conditional and that should handle it.

@mattclay
Copy link
Member

CI failure in integration tests: https://app.shippable.com/github/ansible/ansible/runs/88652/35/tests

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Oct 16, 2018
@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Oct 16, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 17, 2018
@maxamillion
Copy link
Contributor

rebuild_merge

@maxamillion
Copy link
Contributor

@mkrizek I think this should be backported to stable-2.7 once merged, do you agree?

@ansibot ansibot merged commit e8b6864 into ansible:devel Oct 19, 2018
@mkrizek mkrizek deleted the 46301-dnf-yum-name-usability branch October 22, 2018 11:41
mkrizek added a commit to mkrizek/ansible that referenced this pull request Oct 22, 2018
* yum/dnf: fail when space separated string of names

* Groups allow spaces in names

(cherry picked from commit e8b6864)
@mkrizek
Copy link
Contributor Author

mkrizek commented Oct 22, 2018

@maxamillion Created #47414.

abadger pushed a commit that referenced this pull request Oct 22, 2018
)

* yum/dnf: fail when space separated string of names (#47109)

* yum/dnf: fail when space separated string of names

* Groups allow spaces in names

(cherry picked from commit e8b6864)

* Add changelog
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
* yum/dnf: fail when space separated string of names

* Groups allow spaces in names
@dagwieers dagwieers added the packaging Packaging category label Mar 3, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. module This issue/PR relates to a module. packaging Packaging category support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants