-
Notifications
You must be signed in to change notification settings - Fork 23.9k
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
Fix apt delete package by wildcard if it is not found #70333
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansibot
added
affects_2.11
bug
This issue/PR relates to a bug.
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.
new_contributor
This PR is the first contribution by a new community member.
packaging
Packaging category
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
traceback
This issue/PR includes a traceback.
labels
Jun 26, 2020
nickgryg
added a commit
to nickgryg/ansible
that referenced
this pull request
Jun 26, 2020
ansibot
added
the
support:community
This issue/PR relates to code supported by the Ansible community.
label
Jun 26, 2020
samdoran
removed
the
needs_triage
Needs a first human triage before being processed.
label
Jun 30, 2020
bcoca
requested changes
Jun 30, 2020
ansibot
added
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
core_review
In order to be merged, this PR must follow the core review workflow.
and removed
core_review
In order to be merged, this PR must follow the core review workflow.
new_contributor
This PR is the first contribution by a new community member.
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
labels
Jun 30, 2020
bcoca
approved these changes
Jul 1, 2020
bcoca
requested changes
Jul 1, 2020
ansibot
added
core_review
In order to be merged, this PR must follow the core review workflow.
and removed
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
labels
Jul 2, 2020
ansibot
added
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
and removed
core_review
In order to be merged, this PR must follow the core review workflow.
labels
Jul 2, 2020
ansibot
added
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
stale_review
Updates were made after the last review and the last review is more than 7 days old.
labels
Jul 10, 2020
ansibot
added
core_review
In order to be merged, this PR must follow the core review workflow.
and removed
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
labels
Aug 3, 2022
The test
|
ansibot
added
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.
and removed
core_review
In order to be merged, this PR must follow the core review workflow.
labels
Aug 3, 2022
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
Aug 3, 2022
ansibot
added
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
and removed
core_review
In order to be merged, this PR must follow the core review workflow.
labels
Aug 3, 2022
ansibot
added
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
stale_review
Updates were made after the last review and the last review is more than 7 days old.
labels
Aug 11, 2022
ansibot
added
needs_rebase
https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html
and removed
stale_review
Updates were made after the last review and the last review is more than 7 days old.
labels
Sep 28, 2022
@nickgryg can you resolve the conflict and add tests? |
ansibot
added
stale_review
Updates were made after the last review and the last review is more than 7 days old.
has_issue
and removed
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
labels
Jul 12, 2023
ansibot
removed
the
needs_rebase
https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html
label
Sep 7, 2023
ansibot
added
the
needs_rebase
https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html
label
Sep 14, 2023
ansibot
removed
the
needs_rebase
https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html
label
Sep 28, 2023
ansibot
added
the
needs_rebase
https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html
label
Oct 5, 2023
I am unable to reproduce the original issue with Ansible 2.14/2.15/2.16 and devel. Closing this PR. @nickgryg Thanks for the contribution. Please feel free to open a new PR if the problem persists. Thanks. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.11
bug
This issue/PR relates to a bug.
has_issue
module
This issue/PR relates to a module.
needs_rebase
https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html
packaging
Packaging category
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
stale_review
Updates were made after the last review and the last review is more than 7 days old.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
traceback
This issue/PR includes a traceback.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
When we install/delete package(s) by wildcard using apt module, we always use function
expand_pkgspec_from_fnmatches()
to find the exact package(s) name(s). The thing is that we match our wildcard name only among packages in apt cache. That's totally correct when we install packages, because we need to be sure that we can install them in the target OS.But it's not a case when we are trying to remove package(s) from the target system (
state: 'absent'
). We shouldn't care if we didn't find package(s) for removal in apt cache. The only explanation that there is(are) no package(s) installed in the target system which is(are) matched by wildcard. If so, we don't need to remove them. Ansible shouldn't throw an error in this case.Fixes #62262
ISSUE TYPE
COMPONENT NAME
apt
ADDITIONAL INFORMATION
We have a simple
playbook.yaml
:Before this PR:
After this PR: