Skip to content

Commit

Permalink
appstream: Check for .desktop suffixed ids also.
Browse files Browse the repository at this point in the history
The starts-with() function was originally used because some flatpak
appstream ids ended in .desktop for historical reasons. This fact was
forgotten in 7a4d6e0 due to lack of commenting.

Fixes #linuxmint/mint22.1-beta#81.
  • Loading branch information
mtwebster committed Dec 26, 2024
1 parent 25f207b commit 933069e
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,14 @@ def lookup_appstream_package(self, pkginfo):

try:
if kind == KIND_APP:
base_node = self.xmlb_silo.query_first(
f"components/component/id[text()='{pkginfo.name}']/.."
)
try:
base_node = self.xmlb_silo.query_first(
f"components/component/id[text()='{pkginfo.name}']/.."
)
except GLib.Error as e:
base_node = self.xmlb_silo.query_first(
f"components/component/id[text()='{pkginfo.name}.desktop']/.."
)
else:
base_nodes = self.xmlb_silo.query(
f"components/component/id[starts-with(text(),'{pkginfo.name}')]/..",
Expand Down

0 comments on commit 933069e

Please sign in to comment.