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

ignore additional dnf error when removing packages by wildcard #83295

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

mheiges
Copy link

@mheiges mheiges commented May 22, 2024

SUMMARY

Ignore additional dnf error when removing packages by wildcard.

ISSUE TYPE
  • Bugfix Pull Request
ADDITIONAL INFORMATION

fixes,

$ ansible all -i "localhost," -c local -m yum -a 'state=absent name=xorg-x11* '

localhost | FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/libexec/platform-python"
    },
    "changed": false,
    "failures": [
        "xorg-x11* - All matches were filtered out by exclude filtering for argument: xorg-x11*"
    ],
    "msg": "Failed to install some of the specified packages",
    "rc": 1,
    "results": []
}
$ dnf --version
4.7.0
  Installed: dnf-0:4.7.0-19.el8.noarch at Thu 16 May 2024 10:51:25 AM GMT
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at Wed 28 Jun 2023 08:49:12 AM GMT

similar to #69241

@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. module This issue/PR relates to a module. labels May 22, 2024
@@ -443,7 +443,8 @@ def _sanitize_dnf_error_msg_remove(self, spec, error):
"""
if (
'no package matched' in to_native(error) or
'No match for argument:' in to_native(error)
'No match for argument:' in to_native(error) or
'All matches were filtered out by exclude filtering for argument:' in to_native(error)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should try and remove scraping text on exceptions rather than adding more cases. My attempt #83297.

@mattclay mattclay removed the needs_triage Needs a first human triage before being processed. label May 23, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. module This issue/PR relates to a module. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants