ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
833 stars 1.53k forks source link

[PR #8909/2d660a12 backport][stable-9] flatpak: improve flatpak name parsing in `_parse_flatpak_name` #8961

Closed patchback[bot] closed 1 month ago

patchback[bot] commented 1 month ago

This is a backport of PR #8909 as merged into main (2d660a1252c5c40333f0378ba485680426c33cd0).

SUMMARY

This pull request updates the Flatpak name parsing functionality to handle additional valid cases for Flatpak identifiers.

ISSUE TYPE
COMPONENT NAME

flatpak

ADDITIONAL INFORMATION

While trying to install com.chatterino.chatterino from Flathub, I encountered a problem with the multiple versions of this package available: stable and nightly. To install it properly, it has to be the full name: app/com.chatterino.chatterino/x86_64/stable or com.chatterino.chatterino/x86_64/stable. But the module doesn't handle those names very well and tries to install the package even if it's already installed, returning changed instead of ok.

- name: Install applications from flathub
  community.general.flatpak:
    name:
      - app/com.brave.Browser
      - app/com.google.Chrome/
      - org.mozilla.firefox/
      - app/com.chatterino.chatterino/x86_64/stable
      - io.freetubeapp.FreeTube/x86_64/stable
    remote: flathub

All the names above are valid and return ok when running multiple times, with the changes.

ansibullbot commented 1 month ago

cc @JayKayy @oolongbrothers click here for bot help