mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-18 05:38:34 -04:00
app: Use AS_FORMAT_STYLE_CATALOG if available
AS_FORMAT_STYLE_COLLECTION is a deprecated alias for ..._CATALOG, and was removed entirely in appstream git main (presumably version 0.17 or 1.0). Resolves: https://github.com/flatpak/flatpak/issues/5472 Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
@@ -1130,7 +1130,12 @@ flatpak_dir_load_appstream_store (FlatpakDir *self,
|
||||
NULL);
|
||||
|
||||
appstream_file = g_file_new_for_path (appstream_path);
|
||||
#if AS_CHECK_VERSION(0, 16, 0)
|
||||
as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
|
||||
#else
|
||||
/* Deprecated name for the same thing */
|
||||
as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
|
||||
#endif
|
||||
#if AS_CHECK_VERSION(0, 14, 0)
|
||||
success = as_metadata_parse_file (mdata, appstream_file, AS_FORMAT_KIND_XML, &local_error);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user