[gnome-software] trivial: Remove the architecture from the unique-id
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Remove the architecture from the unique-id
- Date: Tue, 9 Aug 2016 10:43:41 +0000 (UTC)
commit 3e3c8a0b64bbd70710096fc0bc22284a2d28a1bd
Author: Richard Hughes <richard hughsie com>
Date: Tue Aug 9 09:13:54 2016 +0100
trivial: Remove the architecture from the unique-id
src/gs-app.c | 1 -
src/gs-self-test.c | 12 ++++++------
src/plugins/gs-flatpak.c | 1 -
src/plugins/gs-plugin-dummy.c | 2 +-
src/plugins/gs-plugin-limba.c | 1 -
src/plugins/gs-plugin-shell-extensions.c | 1 -
src/plugins/gs-plugin-snap.c | 1 -
7 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index eb713a5..0ae6583 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -845,7 +845,6 @@ gs_app_get_unique_id (GsApp *app)
app->origin,
app->kind,
app->id,
- NULL, /* arch */
NULL); /* branch */
}
return app->unique_id;
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index 0c19b25..70c27bc 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -155,34 +155,34 @@ gs_plugin_func (void)
/* respect priority when deduplicating */
list = gs_app_list_new ();
app = gs_app_new ("e");
- gs_app_set_unique_id (app, "user/foo/*/*/e/*/*");
+ gs_app_set_unique_id (app, "user/foo/*/*/e/*");
gs_app_list_add (list, app);
gs_app_set_priority (app, 0);
g_object_unref (app);
app = gs_app_new ("e");
- gs_app_set_unique_id (app, "user/bar/*/*/e/*/*");
+ gs_app_set_unique_id (app, "user/bar/*/*/e/*");
gs_app_list_add (list, app);
gs_app_set_priority (app, 99);
g_object_unref (app);
app = gs_app_new ("e");
- gs_app_set_unique_id (app, "user/baz/*/*/e/*/*");
+ gs_app_set_unique_id (app, "user/baz/*/*/e/*");
gs_app_list_add (list, app);
gs_app_set_priority (app, 50);
g_object_unref (app);
g_assert_cmpint (gs_app_list_length (list), ==, 3);
gs_app_list_filter_duplicates (list, GS_APP_LIST_FILTER_FLAG_PRIORITY);
g_assert_cmpint (gs_app_list_length (list), ==, 1);
- g_assert_cmpstr (gs_app_get_unique_id (gs_app_list_index (list, 0)), ==, "user/bar/*/*/e/*/*");
+ g_assert_cmpstr (gs_app_get_unique_id (gs_app_list_index (list, 0)), ==, "user/bar/*/*/e/*");
g_object_unref (list);
/* use globs when adding */
list = gs_app_list_new ();
app = gs_app_new ("b");
- gs_app_set_unique_id (app, "a/b/c/d/e/f/g");
+ gs_app_set_unique_id (app, "a/b/c/d/e/f");
gs_app_list_add (list, app);
g_object_unref (app);
app = gs_app_new ("b");
- gs_app_set_unique_id (app, "a/b/c/*/e/f/g");
+ gs_app_set_unique_id (app, "a/b/c/*/e/f");
gs_app_list_add (list, app);
g_object_unref (app);
g_assert_cmpint (gs_app_list_length (list), ==, 1);
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 06155f8..324e667 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -312,7 +312,6 @@ gs_flatpak_build_unique_id (FlatpakInstallation *installation, FlatpakRef *xref)
NULL, /* origin */
kind,
id,
- flatpak_ref_get_arch (xref),
flatpak_ref_get_branch (xref));
}
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index b17abd4..c0abc5c 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -305,7 +305,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
/* add again, this time with a prefix so it gets deduplicated */
app2 = gs_app_new ("zeus.desktop");
- gs_app_set_unique_id (app2, "user/dummy/*/*/zeus.desktop/*/*");
+ gs_app_set_unique_id (app2, "user/dummy/*/*/zeus.desktop/*");
gs_app_set_metadata (app2, "GnomeSoftware::Creator",
gs_plugin_get_name (plugin));
gs_app_list_add (list, app2);
diff --git a/src/plugins/gs-plugin-limba.c b/src/plugins/gs-plugin-limba.c
index 8375b90..b7c5f09 100644
--- a/src/plugins/gs-plugin-limba.c
+++ b/src/plugins/gs-plugin-limba.c
@@ -304,7 +304,6 @@ gs_plugin_app_from_pki (LiPkgInfo *pki)
NULL, /* origin */
AS_APP_KIND_UNKNOWN,
id,
- NULL, /* arch */
NULL); /* branch */
gs_app_set_unique_id (app, unique_id);
diff --git a/src/plugins/gs-plugin-shell-extensions.c b/src/plugins/gs-plugin-shell-extensions.c
index 117acfa..1806697 100644
--- a/src/plugins/gs-plugin-shell-extensions.c
+++ b/src/plugins/gs-plugin-shell-extensions.c
@@ -129,7 +129,6 @@ gs_plugin_shell_extensions_add_app (GsPlugin *plugin,
NULL, /* origin */
AS_APP_KIND_SHELL_EXTENSION,
id,
- NULL, /* arch */
NULL); /* branch */
gs_app_set_id (app, id);
gs_app_set_unique_id (app, unique_id);
diff --git a/src/plugins/gs-plugin-snap.c b/src/plugins/gs-plugin-snap.c
index 6d20adb..4940ff4 100644
--- a/src/plugins/gs-plugin-snap.c
+++ b/src/plugins/gs-plugin-snap.c
@@ -341,7 +341,6 @@ get_apps (GsPlugin *plugin,
NULL, /* origin */
AS_APP_KIND_UNKNOWN,
id,
- NULL, /* arch */
NULL); /* branch */
app = gs_app_new (id);
gs_app_set_unique_id (app, unique_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]