diff --git a/0001-as-app-Also-unwrap-description-in-metainfo-files.patch b/0001-as-app-Also-unwrap-description-in-metainfo-files.patch new file mode 100644 index 0000000..d8254d7 --- /dev/null +++ b/0001-as-app-Also-unwrap-description-in-metainfo-files.patch @@ -0,0 +1,33 @@ +From 004a4e60e2433c404e7c36b94770c94e592db0fc Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Tue, 8 Feb 2022 15:50:40 +0100 +Subject: [PATCH] as-app: Also unwrap description in metainfo files + +According to the specification, there is no difference between both kinds +of upstream metainfo files. + +Fixes #381 +--- + libappstream-glib/as-app.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c +index b65f08d..76c0727 100644 +--- a/libappstream-glib/as-app.c ++++ b/libappstream-glib/as-app.c +@@ -4972,8 +4972,11 @@ as_app_node_parse_child (AsApp *app, GNode *n, guint32 flags, + /* */ + case AS_TAG_DESCRIPTION: + { +- /* unwrap appdata inline */ ++ /* unwrap appdata and metainfo inline */ + AsFormat *format = as_app_get_format_by_kind (app, AS_FORMAT_KIND_APPDATA); ++ if (format == NULL) ++ format = as_app_get_format_by_kind (app, AS_FORMAT_KIND_METAINFO); ++ + if (format != NULL) { + GError *error_local = NULL; + g_autoptr(GHashTable) unwrapped = NULL; +-- +2.34.1 + diff --git a/appstream-glib.changes b/appstream-glib.changes index 7e636d7..33c7dff 100644 --- a/appstream-glib.changes +++ b/appstream-glib.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 8 15:25:24 UTC 2022 - Fabian Vogt + +- Add patch to fix descriptions in .metainfo.xml files + (boo#1192243, gh#hughsie/appstream-glib#381): + * 0001-as-app-Also-unwrap-description-in-metainfo-files.patch + ------------------------------------------------------------------- Sun Sep 13 19:12:51 UTC 2020 - elimat@opensuse.org diff --git a/appstream-glib.spec b/appstream-glib.spec index d8caec9..b75bc51 100644 --- a/appstream-glib.spec +++ b/appstream-glib.spec @@ -1,7 +1,7 @@ # # spec file for package appstream-glib # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # Copyright (c) 2014 Dominique Leuenberger, Amsterdam, The Netherlands # # All modifications and additions to the file contributed by third parties @@ -21,10 +21,12 @@ Name: appstream-glib Version: 0.7.18 Release: 0 Summary: AppStream Abstraction Library -License: LGPL-2.1-or-later AND GPL-2.0-or-later +License: GPL-2.0-or-later AND LGPL-2.1-or-later URL: https://people.freedesktop.org/~hughsient/appstream-glib/ Source0: %{name}-%{version}.tar.xz Source1: openSUSE-appstream-process +# PATCH-FIX-UPSTREAM +Patch1: 0001-as-app-Also-unwrap-description-in-metainfo-files.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: gcab >= 0.6 BuildRequires: gobject-introspection-devel @@ -85,7 +87,7 @@ nodes and convert to and from the standardized XML representation. %package devel Summary: Development files for the AppStream abstraction library -License: LGPL-2.1-or-later AND GPL-2.0-or-later +License: GPL-2.0-or-later AND LGPL-2.1-or-later Requires: %{name} = %{version} Requires: libappstream-glib8 = %{version} Requires: typelib-1_0-AppStreamGlib-1_0 = %{version} @@ -110,7 +112,7 @@ This library allows to: %package -n openSUSE-appstream-process Summary: Appstream processor employed by kiwi -License: LGPL-2.1-or-later AND GPL-2.0-or-later +License: GPL-2.0-or-later AND LGPL-2.1-or-later Requires: appstream-glib >= %{version} Requires: openSUSE-appdata-extra