Skip to content

Commit

Permalink
[flatpak] Capture details about branch
Browse files Browse the repository at this point in the history
Gather details about branch, so it complements
the version number (which can be empty sometimes).

Fixes: #3404

Signed-off-by: Jose Castillo <[email protected]>
  • Loading branch information
jcastill committed Nov 3, 2023
1 parent c47c78a commit bacc258
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions sos/policies/package_managers/flatpak.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@ class FlatpakPackageManager(PackageManager):
"""Package Manager for Flatpak distributions
"""

query_command = 'flatpak list --columns=name,version'
query_command = 'flatpak list --columns=name,version,branch'
query_path_command = ''
files_command = ''
verify_command = ''
verify_filter = ''

def _parse_pkg_list(self, pkg_list):
for line in pkg_list.splitlines():
pkg = line.split()
name, version = pkg[0], pkg[1]
yield (name, version, None)
for line in pkg_list.splitlines()[1:]:
pkg = line.split("\t")
name, branch = pkg[0], pkg[2]
if not pkg[1]:
version = ''
else:
version = pkg[1]
yield (name, version, branch)

# vim: set et ts=4 sw=4 :

0 comments on commit bacc258

Please sign in to comment.