Commit Graph

14 Commits

Author SHA1 Message Date
Simon McVittie
2a01318e15 ref-utils: Remove dead store
We always set match_len before using it, discarding the result of this
assignment. Detected by scan-build.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-04-19 09:09:04 +02:00
Alexander Larsson
7b1b706f80 decomposed: Add flatpak_decomposed_id_is_subref_of()
This checks if e.g. `org.app.App.Locale` is a subref of `org.app.App`.
2020-11-16 11:23:10 +01:00
Alexander Larsson
8a32656380 Remove unused flatpak_[de]compose_ref functions
We now all use the FlatpakDecompose versions.
2020-11-10 14:32:13 +01:00
Alexander Larsson
1159004dc8 Add len argument to flatpak_decomposed_is_arches()
This allows this to be used both with strv (len=-1) and other arrays.
2020-11-10 14:32:13 +01:00
Alexander Larsson
59509fd82d Add flatpak_decomposed_id_has_prefix() 2020-11-10 14:32:13 +01:00
Alexander Larsson
e98376bdf1 decomposed: Add flatpak_decomposed_equal_except_branch ()
This is used in flatpak_dir_deploy()
2020-11-10 14:32:13 +01:00
Alexander Larsson
5a858230dd decomposed: Add flatpak_decomposed_get_kind_metadata_group()
This is a useful helper.
2020-11-10 14:32:13 +01:00
Alexander Larsson
105edb64f5 decomposed: Add flatpak_decomposed_new_from_pref()
This is useful as we have partial refs in the metadata files, like
the app runtime dependency.
2020-11-10 14:32:13 +01:00
Alexander Larsson
877cede50b decomposed: Store ref data inline if possible.
When we're not taking the string from elsewhere, store the string data
inline.
2020-11-10 14:32:13 +01:00
Alexander Larsson
840cb2ed3d decomposed: Add id_has_suffix() helper 2020-11-10 14:32:13 +01:00
Alexander Larsson
abb097f812 decomposed: Support defaults in flatpak_decomposed_new_from_parts
This allows NULL for arch and branch, similar to
e.g. flatpak_build_runtime_ref().
2020-11-05 10:43:10 +01:00
Alexander Larsson
3b63c51ce6 decomposed: Add support for FlatpakRefKind 2020-11-05 10:43:10 +01:00
Alexander Larsson
425147e4b1 Add flatpak_decomposed_new_from_parts() 2020-11-05 10:43:10 +01:00
Alexander Larsson
5dae1fc6bc Break out ref helper functions to separate file
flatpak-utils.c is getting large, and also I got some issues with
include order, so split out things that are purely handling ref stings
in various ways to its own file.
2020-11-05 10:43:10 +01:00