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
handle yum/dnf group long form names without @ #51907
base: devel
Are you sure you want to change the base?
handle yum/dnf group long form names without @ #51907
Conversation
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
|
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
|
# like "dnf install /usr/bin/vi" | ||
if '/' in name: | ||
if '/' in name and (not name.startswith("@"): |
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.
Missing closing parenthesis.
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.
OMG of course I am ... sigh
Thanks
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.
Except the syntax error, looks good to me
3124025
to
390d62e
Compare
Looks like we need to do (or diff --git a/lib/ansible/modules/packaging/os/dnf.py b/lib/ansible/modules/packaging/os/dnf.py
index 1597af2eb1..25f0125ef8 100644
--- a/lib/ansible/modules/packaging/os/dnf.py
+++ b/lib/ansible/modules/packaging/os/dnf.py
@@ -787,7 +787,10 @@ class DnfModule(YumDnf):
self.base.read_comps()
already_loaded_comps = True
- grp_env_mdl_candidate = name[1:].strip()
+ if '@' in name:
+ grp_env_mdl_candidate = name[1:].strip()
+ else:
+ grp_env_mdl_candidate = name.strip()
if self.with_modules:
mdl = self.module_base._get_modules(grp_env_mdl_candidate) |
390d62e
to
e9685d0
Compare
Fixes ansible#51888 Signed-off-by: Adam Miller <admiller@redhat.com>
Signed-off-by: Adam Miller <admiller@redhat.com>
Signed-off-by: Adam Miller <admiller@redhat.com>
Signed-off-by: Adam Miller <admiller@redhat.com>
e9685d0
to
5d84904
Compare
Signed-off-by: Adam Miller admiller@redhat.com
SUMMARY
We were throwing a failure if a package name contained a space, but this breaks backwards compatibility.
Fixes #51888
ISSUE TYPE
COMPONENT NAME
yum
dnf