#8937 Multiple issues in tasks's install/uninstall helpers
Closed: fixed by frenaud. Opened by cheimes.

Issue

The helpers install_packages, uninstall_packages, and is_package_installed have multiple issues:

  • The literal ('ubuntu') is not a tuple but a string with superfluous parenthesis. A tuple requires at least one comma. It's a common gotcha in Python. Therefore it is recommended to use set literals like {'ubuntu'} for item in items checks.
  • The functions only check for ubuntu but not for debian platform although only ipaplatform.debian exists and 'debian' is an ID_LIKE for ubuntu.
  • shlex is not necessary and should be avoided, too.

Metadata Update from @fcami:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/5959

Metadata Update from @fcami:
- Issue assigned to fcami

master:

  • c75be14bee9ded79b92cb0f92eb6c903b7b6c6dc Fix string check in uninstall helper

ipa-4-9:

  • c5b5bc9099fc26b863d7c964e47dbdcd0ff008c8 Fix string check in uninstall helper

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata