[gnome-software/1453-flathub-repo-misleadingly-considered-present-on-fedora-35-with-filtered-flathub] flatpak: Save also remote's filter on the flatpak-app
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1453-flathub-repo-misleadingly-considered-present-on-fedora-35-with-filtered-flathub] flatpak: Save also remote's filter on the flatpak-app
- Date: Tue, 21 Sep 2021 12:09:02 +0000 (UTC)
commit 576f9e6d25fcd3edd7fdf769e342a382af1307e3
Author: Milan Crha <mcrha redhat com>
Date: Tue Sep 21 13:58:03 2021 +0200
flatpak: Save also remote's filter on the flatpak-app
This can be used when updating existing remote, to reflect the new
filter. It can be also used to verify the installed and existing
remotes match with its filter.
plugins/flatpak/gs-flatpak-app.c | 12 ++++++++++++
plugins/flatpak/gs-flatpak-app.h | 3 +++
2 files changed, 15 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak-app.c b/plugins/flatpak/gs-flatpak-app.c
index cf98248a8..b59515b2f 100644
--- a/plugins/flatpak/gs-flatpak-app.c
+++ b/plugins/flatpak/gs-flatpak-app.c
@@ -176,3 +176,15 @@ gs_flatpak_app_get_main_app_ref_name (GsApp *app)
{
return gs_app_get_metadata_item (app, "flatpak::mainApp");
}
+
+void
+gs_flatpak_app_set_repo_filter (GsApp *app, const gchar *filter)
+{
+ gs_app_set_metadata (app, "flatpak::RepoFilter", filter);
+}
+
+const gchar *
+gs_flatpak_app_get_repo_filter (GsApp *app)
+{
+ return gs_app_get_metadata_item (app, "flatpak::RepoFilter");
+}
diff --git a/plugins/flatpak/gs-flatpak-app.h b/plugins/flatpak/gs-flatpak-app.h
index ab6c10af4..610c8a8f3 100644
--- a/plugins/flatpak/gs-flatpak-app.h
+++ b/plugins/flatpak/gs-flatpak-app.h
@@ -58,5 +58,8 @@ void gs_flatpak_app_set_runtime_url (GsApp *app,
void gs_flatpak_app_set_main_app_ref_name (GsApp *app,
const gchar *main_app_ref);
const gchar *gs_flatpak_app_get_main_app_ref_name (GsApp *app);
+void gs_flatpak_app_set_repo_filter (GsApp *app,
+ const gchar *filter);
+const gchar *gs_flatpak_app_get_repo_filter (GsApp *app);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]