community.general icon indicating copy to clipboard operation
community.general copied to clipboard

change fail_not_found to False for zypper absent

Open hv15 opened this issue 8 months ago • 7 comments

SUMMARY

For the zypper module, when doing a remove operation (state: absent), the current design causes the task to fail whenever zypper returns a 104 status. This status, called ZYPPER_EXIT_INF_CAP_NOT_FOUND, indicates that zypper could not fully complete the remove because one of the package arguments could not be found on the system.

I believe that the task should not fail, as our intention is to remove the package(s) from the system... if it cannot be found on the system, then that is exactly the intention. Furthermore, with --non-interaction, the remove operation will still try to remove any package(s) it does find on the system.

This MR changes the behaviour of zypper status: absent to not fail on status return 104.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

module zypper

ADDITIONAL INFORMATION

hv15 avatar Oct 24 '23 14:10 hv15