Skip to content

Commit

Permalink
app: Use AS_FORMAT_STYLE_CATALOG if available
Browse files Browse the repository at this point in the history
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: #5472
Signed-off-by: Simon McVittie <[email protected]>
  • Loading branch information
smcv committed Jul 11, 2023
1 parent 556984e commit 7a55b7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/flatpak-builtins-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a55b7c

Please sign in to comment.