[gnome-software] Prefix the PackageKit metadata items with the correct scope
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Prefix the PackageKit metadata items with the correct scope
- Date: Mon, 9 Sep 2013 20:54:39 +0000 (UTC)
commit fabcb65c4b6b46f92bb3b94b61a46b5196efc63d
Author: Richard Hughes <richard hughsie com>
Date: Mon Sep 9 21:27:10 2013 +0100
Prefix the PackageKit metadata items with the correct scope
src/gs-plugin-loader.c | 2 +-
src/plugins/README.md | 6 +++---
src/plugins/gs-plugin-packagekit-refine.c | 8 ++++----
src/plugins/gs-plugin-packagekit.c | 7 +++----
4 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 63b487f..06cda07 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -267,7 +267,7 @@ gs_plugin_loader_get_app_str (GsApp *app)
return id;
/* first try the actual id */
- id = gs_app_get_metadata_item (app, "package-id");
+ id = gs_app_get_metadata_item (app, "PackageKit::package-id");
if (id != NULL)
return id;
diff --git a/src/plugins/README.md b/src/plugins/README.md
index a3ac272..ee18418 100644
--- a/src/plugins/README.md
+++ b/src/plugins/README.md
@@ -106,8 +106,8 @@ Uses the system PackageKit instance to return package data.
Overview: | <p>
-------------|---
Methods: | Search, AddUpdates, AddInstalled, AppInstall, AppRemove, AppUpdate
-Requires: | `{package-id}`
-Refines: | `{package-id}`, `[source]`, `{package-summary}`, `[update-details]`, `{install-kind}`
+Requires: | `{PackageKit::package-id}`
+Refines: | `{PackageKit::package-id}`, `[source]`, `{package-summary}`, `[update-details]`,
`{install-kind}`
### packagekit-refine ###
Uses the system PackageKit instance to return convert filenames to package-ids.
@@ -116,7 +116,7 @@ Overview: | <p>
-------------|---
Methods: | `nothing`
Requires: | `{datadir-desktop-filename}`
-Refines: | `{package-id}`, `[installed]`
+Refines: | `{PackageKit::package-id}`, `[installed]`
### desktopdb ###
Uses the PackageKit desktop.db cache to map package names to, desktop names.
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index 70dd807..e9bf46f 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -191,7 +191,7 @@ gs_plugin_packagekit_refine_packages (GsPlugin *plugin,
for (i = 0; i < packages->len; i++) {
package = g_ptr_array_index (packages, i);
if (g_strcmp0 (pk_package_get_name (package), pkgname) == 0) {
- gs_app_set_metadata (app, "package-id", pk_package_get_id (package));
+ gs_app_set_metadata (app, "PackageKit::package-id", pk_package_get_id
(package));
if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN) {
gs_app_set_state (app,
pk_package_get_info (package) ==
PK_INFO_ENUM_INSTALLED ?
@@ -265,7 +265,7 @@ gs_plugin_packagekit_refine_from_desktop (GsPlugin *plugin,
packages = pk_results_get_package_array (results);
if (packages->len == 1) {
package = g_ptr_array_index (packages, 0);
- gs_app_set_metadata (app, "package-id", pk_package_get_id (package));
+ gs_app_set_metadata (app, "PackageKit::package-id", pk_package_get_id (package));
gs_app_set_state (app, GS_APP_STATE_INSTALLED);
} else {
g_warning ("Failed to find one package for %s, %s, [%d]",
@@ -301,7 +301,7 @@ gs_plugin_refine (GsPlugin *plugin,
/* can we resolve in one go? */
for (l = list; l != NULL; l = l->next) {
app = GS_APP (l->data);
- if (gs_app_get_metadata_item (app, "package-id") != NULL)
+ if (gs_app_get_metadata_item (app, "PackageKit::package-id") != NULL)
continue;
tmp = gs_app_get_source (app);
if (tmp != NULL)
@@ -318,7 +318,7 @@ gs_plugin_refine (GsPlugin *plugin,
/* add any missing ratings data */
for (l = list; l != NULL; l = l->next) {
app = GS_APP (l->data);
- if (gs_app_get_metadata_item (app, "package-id") != NULL)
+ if (gs_app_get_metadata_item (app, "PackageKit::package-id") != NULL)
continue;
tmp = gs_app_get_metadata_item (app, "datadir-desktop-filename");
if (tmp == NULL)
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index 1c49004..7b9cef2 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -192,7 +192,7 @@ gs_plugin_packagekit_add_installed_results (GsPlugin *plugin,
app = gs_app_new (NULL);
gs_app_set_metadata (app,
- "package-id",
+ "PackageKit::package-id",
pk_package_get_id (package));
gs_app_set_metadata (app,
"package-summary",
@@ -375,7 +375,6 @@ gs_plugin_packagekit_add_updates_results (GsPlugin *plugin,
gs_app_set_source (app, split[PK_PACKAGE_ID_NAME]);
gs_app_set_update_details (app, update_text);
gs_app_set_update_version (app, split[PK_PACKAGE_ID_VERSION]);
- gs_app_set_metadata (app, "update-package-id", package_id);
gs_app_set_metadata (app, "install-kind", "package");
gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
gs_app_set_kind (app, GS_APP_KIND_PACKAGE);
@@ -474,7 +473,7 @@ gs_plugin_app_install (GsPlugin *plugin,
PkError *error_code = NULL;
PkResults *results = NULL;
- package_id = gs_app_get_metadata_item (app, "package-id");
+ package_id = gs_app_get_metadata_item (app, "PackageKit::package-id");
if (package_id == NULL) {
ret = FALSE;
g_set_error_literal (error,
@@ -532,7 +531,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
PkError *error_code = NULL;
PkResults *results = NULL;
- package_id = gs_app_get_metadata_item (app, "package-id");
+ package_id = gs_app_get_metadata_item (app, "PackageKit::package-id");
if (package_id == NULL) {
ret = FALSE;
g_set_error_literal (error,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]