#8937 Multiple issues in tasks's install/uninstall helpers
Closed: fixed 2 years ago by frenaud. Opened 2 years ago 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

2 years ago

Metadata Update from @fcami:
- Issue assigned to fcami

2 years ago

master:

  • c75be14 Fix string check in uninstall helper

ipa-4-9:

  • c5b5bc9 Fix string check in uninstall helper

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

2 years ago

Login to comment on this ticket.

Metadata