[gnome-packagekit] Fix compile with libpackagekit-glib >= 0.5.0
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-packagekit] Fix compile with libpackagekit-glib >= 0.5.0
- Date: Wed, 17 Jun 2009 17:08:55 -0400 (EDT)
commit 477428267efd53dd886de079f19bd73d5e7926e6
Author: Richard Hughes <richard hughsie com>
Date: Wed Jun 17 13:06:47 2009 +0100
Fix compile with libpackagekit-glib >= 0.5.0
src/gpk-application.c | 4 ++++
src/gpk-check-update.c | 12 ++++++++++++
src/gpk-dbus-task.c | 9 ++++++---
src/gpk-firmware.c | 4 ++++
src/gpk-hardware.c | 4 ++++
src/gpk-update-viewer.c | 4 ++++
6 files changed, 34 insertions(+), 3 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 2760d52..16fecef 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -2845,7 +2845,11 @@ gpk_application_deps_install_event_cb (GpkHelperDepsInstall *helper_deps_install
/* actually remove packages this time */
package_ids = pk_ptr_array_to_strv (application->priv->package_list);
+#if PK_CHECK_VERSION(0,5,0)
+ ret = pk_client_install_packages (application->priv->client_primary, TRUE, package_ids, &error);
+#else
ret = pk_client_install_packages (application->priv->client_primary, package_ids, &error);
+#endif
if (!ret) {
egg_warning ("cannot install packages: %s", error->message);
g_error_free (error);
diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index 9769714..7a683ad 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -363,7 +363,11 @@ gpk_check_update_update_system (GpkCheckUpdate *cupdate)
goto out;
}
+#if PK_CHECK_VERSION(0,5,0)
+ ret = pk_client_update_system (cupdate->priv->client_primary, TRUE, &error);
+#else
ret = pk_client_update_system (cupdate->priv->client_primary, &error);
+#endif
if (!ret) {
/* we failed, show the icon */
egg_warning ("cannot update system: %s", error->message);
@@ -488,7 +492,11 @@ gpk_check_update_libnotify_cb (NotifyNotification *notification, gchar *action,
/* just update the important updates */
package_ids = pk_package_ids_from_array (cupdate->priv->important_updates_array);
+#if PK_CHECK_VERSION(0,5,0)
+ ret = pk_client_update_packages (cupdate->priv->client_primary, TRUE, package_ids, &error);
+#else
ret = pk_client_update_packages (cupdate->priv->client_primary, package_ids, &error);
+#endif
if (!ret) {
egg_warning ("Individual updates failed: %s", error->message);
g_error_free (error);
@@ -979,7 +987,11 @@ gpk_check_update_process_updates (GpkCheckUpdate *cupdate, PkPackageList *list,
/* convert */
package_ids = pk_package_ids_from_array (security_array);
+#if PK_CHECK_VERSION(0,5,0)
+ ret = pk_client_update_packages (cupdate->priv->client_primary, TRUE, package_ids, &error);
+#else
ret = pk_client_update_packages (cupdate->priv->client_primary, package_ids, &error);
+#endif
if (!ret) {
egg_warning ("Individual updates failed: %s", error->message);
g_error_free (error);
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index ce779b9..1d3c611 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -476,7 +476,11 @@ gpk_dbus_task_install_package_ids (GpkDbusTask *task)
/* set timeout */
pk_client_set_timeout (task->priv->client_primary, task->priv->timeout, NULL);
+#if PK_CHECK_VERSION(0,5,0)
+ ret = pk_client_install_packages (task->priv->client_primary, TRUE, task->priv->package_ids, &error_local);
+#else
ret = pk_client_install_packages (task->priv->client_primary, task->priv->package_ids, &error_local);
+#endif
if (!ret) {
/* TRANSLATORS: error: failed to install, detailed error follows */
gpk_dbus_task_error_msg (task, _("Failed to install package"), error_local);
@@ -679,9 +683,8 @@ gpk_dbus_task_finished_cb (PkClient *client, PkExitEnum exit_enum, guint runtime
if (exit_enum != PK_EXIT_ENUM_SUCCESS) {
/* we failed because of failed exit code */
- if (task->priv->last_exit_code == PK_ERROR_ENUM_GPG_FAILURE ||
- task->priv->last_exit_code == PK_ERROR_ENUM_BAD_GPG_SIGNATURE ||
- task->priv->last_exit_code == PK_ERROR_ENUM_MISSING_GPG_SIGNATURE) {
+ ret = gpk_is_error_code_retry_trusted (task->priv->last_exit_code);
+ if (ret) {
egg_warning ("showing untrusted ui");
gpk_helper_untrusted_show (task->priv->helper_untrusted, task->priv->last_exit_code);
goto out;
diff --git a/src/gpk-firmware.c b/src/gpk-firmware.c
index 170a6b8..cb9c50a 100644
--- a/src/gpk-firmware.c
+++ b/src/gpk-firmware.c
@@ -80,7 +80,11 @@ gpk_firmware_install_file (GpkFirmware *firmware)
g_error_free (error);
goto out;
}
+#if PK_CHECK_VERSION(0,5,0)
+ ret = pk_client_install_packages (firmware->priv->client_primary, TRUE, package_ids, &error);
+#else
ret = pk_client_install_packages (firmware->priv->client_primary, package_ids, &error);
+#endif
if (!ret) {
egg_warning ("failed to install provide file: %s", error->message);
g_error_free (error);
diff --git a/src/gpk-hardware.c b/src/gpk-hardware.c
index 05accf0..0704e99 100644
--- a/src/gpk-hardware.c
+++ b/src/gpk-hardware.c
@@ -80,7 +80,11 @@ gpk_hardware_install_package (GpkHardware *hardware)
/* FIXME: this needs to be async and connect up to the repo signature stuff */
pk_client_set_synchronous (client, TRUE, NULL);
+#if PK_CHECK_VERSION(0,5,0)
+ ret = pk_client_install_packages (client, TRUE, hardware->priv->package_ids, &error);
+#else
ret = pk_client_install_packages (client, hardware->priv->package_ids, &error);
+#endif
if (!ret) {
egg_warning ("failed to install package: %s", error->message);
g_error_free (error);
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 598ccd2..21cef3c 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -1673,7 +1673,11 @@ gpk_update_viewer_deps_update_event_cb (GpkHelperDepsUpdate *helper, GtkResponse
}
/* actually install packages this time */
+#if PK_CHECK_VERSION(0,5,0)
+ ret = pk_client_update_packages (client_primary, TRUE, install_package_ids, &error);
+#else
ret = pk_client_update_packages (client_primary, install_package_ids, &error);
+#endif
if (!ret) {
egg_warning ("cannot install packages: %s", error->message);
g_error_free (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]