Commit Graph

17 Commits

Author SHA1 Message Date
Phaedrus Leeds
600e18567c Add a vim modeline and .editorconfig
To make indentation work with less effort. The modeline was copied from
libostree with minor modification and the .editorconfig from GLib.

The advantage of having both a modeline and an editorconfig is we can
work out of the box on more editor setups, and the modeline allows us to
specify the style with a lot more fine grained control.
2022-08-22 19:48:10 -07:00
Phaedrus Leeds
43768b2510 common: Remove erroneous Since: annotations
I think these were accidentally copied from GLib.
2022-07-18 18:51:07 -05:00
Philip Withnall
9c059def69 app: Port to libappstream
libappstream-glib is mostly unmaintained, and libappstream is more
actively developed (and up to date with the AppStream specification).

Port from libappstream-glib to libappstream. Handily, a lot of the APIs
are exactly the same. The main changes are:
 * `AsApp` → `AsComponent`
 * `AsStore` → `AsMetadata`

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

(Mostly done by Philip, then Phaedrus finished this)
2022-02-17 08:29:20 -06:00
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