[gnome-software/wip/hughsie/flatpak-repo-scope] flatpak: Do not hardcode 'user' scope when installing flatpakrepo files
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/flatpak-repo-scope] flatpak: Do not hardcode 'user' scope when installing flatpakrepo files
- Date: Mon, 8 Oct 2018 17:50:03 +0000 (UTC)
commit 2ba6b574bceb20d4bd9511e133579d2ebc398891
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 5218e9b9..ce3f5594 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1898,7 +1898,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]