mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-10 14:05:07 +00:00
flatpak: fix removal of runtimes (#11688)
* flatpak: fix removal of runtimes (issue #553) The module was using `--app` when listing installed flatpaks for name matching, which excluded runtimes from the results. This caused removal of runtimes to fail even though `flatpak_exists()` correctly detected them as installed (it lists both apps and runtimes). Fix by dropping `--app` from the three matching functions so that both apps and runtimes are searchable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * flatpak: add changelog fragment for PR #11688 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5a27cbdec6
commit
8568594453
2 changed files with 8 additions and 3 deletions
|
|
@ -261,7 +261,7 @@ def _match_installed_flat_name(module, binary, name, method):
|
|||
global result # pylint: disable=global-variable-not-assigned
|
||||
parsed_name = _parse_flatpak_name(name)
|
||||
# Try running flatpak list with columns feature
|
||||
command = [binary, "list", f"--{method}", "--app", "--columns=application"]
|
||||
command = [binary, "list", f"--{method}", "--columns=application"]
|
||||
_flatpak_command(module, False, command, ignore_failure=True)
|
||||
if result["rc"] != 0 and OUTDATED_FLATPAK_VERSION_ERROR_MESSAGE in result["stderr"]:
|
||||
# Probably flatpak before 1.2
|
||||
|
|
@ -283,7 +283,7 @@ def _match_installed_flat_name(module, binary, name, method):
|
|||
|
||||
def _match_flat_using_outdated_flatpak_format(module, binary, parsed_name, method):
|
||||
global result # pylint: disable=global-variable-not-assigned
|
||||
command = [binary, "list", f"--{method}", "--app", "--columns=application"]
|
||||
command = [binary, "list", f"--{method}", "--columns=application"]
|
||||
output = _flatpak_command(module, False, command)
|
||||
for row in output.split("\n"):
|
||||
if parsed_name.lower() == row.lower():
|
||||
|
|
@ -292,7 +292,7 @@ def _match_flat_using_outdated_flatpak_format(module, binary, parsed_name, metho
|
|||
|
||||
def _match_flat_using_flatpak_column_feature(module, binary, parsed_name, method):
|
||||
global result # pylint: disable=global-variable-not-assigned
|
||||
command = [binary, "list", f"--{method}", "--app"]
|
||||
command = [binary, "list", f"--{method}"]
|
||||
output = _flatpak_command(module, False, command)
|
||||
for row in output.split("\n"):
|
||||
if parsed_name.lower() in row.lower():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue