gs-utils: Let gs_utils_get_file_age() return guint64
Since https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1219 the cache
file age is turned into guint64. Having the gs_utils_get_file_age() return
guint and the cache file not existing meant returning G_MAXUINT, which is smaller
than G_MAXUINT64, thus when the file did not exist it was behaving like
the file exists and it failed later in the code.
This could be seen on start as a runtime warning when there's no ratings.json file
in the cache and automatic updates are enabled.
3ce9892...
by
Philip Withnall <email address hidden>
gs-odrs-provider: Consistently use 64-bit cache ages
This makes the API and internals consistent with the modern GLib
conventions for representing time.
It should introduce no functional changes.
Signed-off-by: Philip Withnall <email address hidden>
Helps: #1472
d5ee734...
by
Philip Withnall <email address hidden>
gs-external-appstream-utils: Consistently use 64-bit cache ages
This makes the API and internals consistent with the modern GLib
conventions for representing time.
It should introduce no functional changes.
Signed-off-by: Philip Withnall <email address hidden>
Helps: #1472
17e45a0...
by
Philip Withnall <email address hidden>
fedora-pkgdb-collections: Split JSON parsing out into a helper
It has quite complex control flow, so if `_ensure_cache()` is to be
made asynchronous, that will require a lot of `g_task_return_boolean()`
branches.
Easier to split it out into a helper function and call that, given that
the parsing is synchronous.
This will help with future refactoring.
This introduces no functional changes.
Signed-off-by: Philip Withnall <email address hidden>
Helps: #1472
eff6280...
by
Philip Withnall <email address hidden>
gs-utils: Use GFile rather than filename arguments
The callers can already provide a `GFile`, and these two functions just
create one internally, so avoid the potential for creating a redundant
`GFile` object and use one from the caller directly.
Signed-off-by: Philip Withnall <email address hidden>