[gnome-software: 3/10] gs-appstream: Fix querying for language support
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 3/10] gs-appstream: Fix querying for language support
- Date: Fri, 13 Aug 2021 12:10:36 +0000 (UTC)
commit 1577a5180cc4ece2bd2504d04a07196883182043
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Aug 11 15:25:39 2021 +0100
gs-appstream: Fix querying for language support
Due to a bug in libxmlb (I’m currently on version 0.3.3), using two
predicates sequentially doesn’t seem to work. Work around that by
combining the predicates into a single one with an `and` operator.
https://github.com/hughsie/libxmlb/issues/95
Signed-off-by: Philip Withnall <pwithnall endlessos org>
lib/gs-appstream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
index 6bd00fb73..565b1df25 100644
--- a/lib/gs-appstream.c
+++ b/lib/gs-appstream.c
@@ -1157,7 +1157,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
/* @variants includes @tmp */
for (gsize i = 0; variants[i] != NULL; i++)
- xb_string_append_union (xpath, "languages/lang[text()='%s'][@percentage>50]",
variants[i]);
+ xb_string_append_union (xpath, "languages/lang[(text()='%s') and
(@percentage>50)]", variants[i]);
if (xb_node_query_text (component, xpath->str, NULL) != NULL)
gs_app_add_kudo (app, GS_APP_KUDO_MY_LANGUAGE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]