[gnome-software/gnome-3-30] flatpak: Do not hardcode 'user' scope when installing flatpakrepo files
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-30] flatpak: Do not hardcode 'user' scope when installing flatpakrepo files
- Date: Tue, 16 Oct 2018 12:03:10 +0000 (UTC)
commit f55a8822acc3cbf26492256d0d4558e319386757
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 8 18:27:44 2018 +0100
flatpak: Do not hardcode 'user' scope when installing flatpakrepo files
This needs to follow the user GSetting preference.
plugins/flatpak/gs-flatpak.c | 3 ++-
plugins/flatpak/gs-self-test.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 134f0a1a..35f64f1a 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1901,7 +1901,8 @@ gs_flatpak_refine_app (GsFlatpak *self,
}
/* scope is fast, do unconditionally */
- gs_plugin_refine_item_scope (self, app);
+ if (gs_app_get_state (app) != AS_APP_STATE_AVAILABLE_LOCAL)
+ gs_plugin_refine_item_scope (self, app);
/* if the state was changed, perhaps set the version from the release */
if (old_state != gs_app_get_state (app)) {
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index 6d672d82..03a771df 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -93,7 +93,7 @@ gs_plugins_flatpak_repo_non_ascii_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert (app != NULL);
- g_assert_cmpstr (gs_app_get_unique_id (app), ==, "user/*/*/source/example__1____/master");
+ g_assert_cmpstr (gs_app_get_unique_id (app), ==, "*/*/*/source/example__1____/master");
}
static void
@@ -801,7 +801,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
g_assert_cmpint (gs_app_get_kind (app_src), ==, AS_APP_KIND_SOURCE);
g_assert_cmpint (gs_app_get_state (app_src), ==, AS_APP_STATE_AVAILABLE_LOCAL);
g_assert_cmpstr (gs_app_get_id (app_src), ==, "test");
- g_assert_cmpstr (gs_app_get_unique_id (app_src), ==, "user/*/*/source/test/master");
+ g_assert_cmpstr (gs_app_get_unique_id (app_src), ==, "*/*/*/source/test/master");
g_assert (gs_app_get_local_file (app_src) != NULL);
/* install the source manually */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]