[gnome-software] Use source-id, not source for matching what package ships a repo
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Use source-id, not source for matching what package ships a repo
- Date: Wed, 28 Feb 2018 15:06:27 +0000 (UTC)
commit 715003e3a3e061c12a91d560230c25cc792d1e93
Author: Kalev Lember <klember redhat com>
Date: Wed Feb 28 15:47:25 2018 +0100
Use source-id, not source for matching what package ships a repo
This works around an issue where the appstream plugin incorrectly
refines package GsApps with repo metadata when their source packages
match.
plugins/packagekit/gs-plugin-packagekit-refine-repos.c | 1 -
src/gs-repos-dialog.c | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
b/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
index b8bf1115..1867b209 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
@@ -90,7 +90,6 @@ gs_plugin_packagekit_refine_repo_from_filename (GsPlugin *plugin,
packages = pk_results_get_package_array (results);
if (packages->len == 1) {
PkPackage *package = g_ptr_array_index (packages, 0);
- gs_app_add_source (app, pk_package_get_name (package));
gs_app_add_source_id (app, pk_package_get_id (package));
} else {
g_debug ("failed to find one package for repo %s, %s, [%u]",
diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
index 43a302b2..da60b8d9 100644
--- a/src/gs-repos-dialog.c
+++ b/src/gs-repos-dialog.c
@@ -312,8 +312,8 @@ get_list_box_for_repo (GsReposDialog *dialog, GsApp *repo)
const gchar *source_repo;
const gchar *source_third_party_package;
- source_repo = gs_app_get_source_default (repo);
- source_third_party_package = gs_app_get_source_default (dialog->third_party_repo);
+ source_repo = gs_app_get_source_id_default (repo);
+ source_third_party_package = gs_app_get_source_id_default (dialog->third_party_repo);
/* group repos from the same repo-release package together */
if (g_strcmp0 (source_repo, source_third_party_package) == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]