[PackageKit] Fix several reported problems with the offline-update funtionality.
Richard Hughes
rhughes at fedoraproject.org
Fri Jun 29 15:50:04 UTC 2012
commit 0a75a223b207330fab2652eea76ca3e650e85bbb
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Jun 29 16:48:28 2012 +0100
Fix several reported problems with the offline-update funtionality.
PackageKit-0.8.1-master.patch | 325 ++++++++++++++++++++++++++++++++++++-----
PackageKit.spec | 5 +-
2 files changed, 295 insertions(+), 35 deletions(-)
---
diff --git a/PackageKit-0.8.1-master.patch b/PackageKit-0.8.1-master.patch
index 0064025..d486aa8 100644
--- a/PackageKit-0.8.1-master.patch
+++ b/PackageKit-0.8.1-master.patch
@@ -132,6 +132,126 @@ index 491f044..896d32b 100755
pct = div * (ts_current - 1) + pct_start + ((div / 100.0) * val)
self.base.percentage(pct)
+diff --git a/contrib/systemd-updates/pk-offline-update.c b/contrib/systemd-updates/pk-offline-update.c
+index 5d6604d..a6fdaaf 100644
+--- a/contrib/systemd-updates/pk-offline-update.c
++++ b/contrib/systemd-updates/pk-offline-update.c
+@@ -27,6 +27,7 @@
+
+ #define PK_OFFLINE_UPDATE_RESULTS_GROUP "PackageKit Offline Update Results"
+ #define PK_OFFLINE_UPDATE_RESULTS_FILENAME "/var/lib/PackageKit/offline-update-competed"
++#define PK_OFFLINE_PREPARED_UPDATE_FILENAME "/var/lib/PackageKit/prepared-update"
+
+ /**
+ * pk_offline_update_set_plymouth_msg:
+@@ -38,6 +39,9 @@ pk_offline_update_set_plymouth_msg (const gchar *msg)
+ gchar *cmd;
+ GError *error = NULL;
+
++ /* allow testing without sending commands to plymouth */
++ if (g_getenv ("PK_OFFLINE_UPDATE_TEST") != NULL)
++ return;
+ cmd = g_strdup_printf ("plymouth display-message --text=\"%s\"", msg);
+ ret = g_spawn_command_line_async (cmd, &error);
+ if (!ret) {
+@@ -59,6 +63,9 @@ pk_offline_update_set_plymouth_mode (const gchar *mode)
+ GError *error = NULL;
+ gchar *cmdline;
+
++ /* allow testing without sending commands to plymouth */
++ if (g_getenv ("PK_OFFLINE_UPDATE_TEST") != NULL)
++ return;
+ cmdline = g_strdup_printf ("plymouth change-mode --%s", mode);
+ ret = g_spawn_command_line_async (cmdline, &error);
+ if (!ret) {
+@@ -79,6 +86,9 @@ pk_offline_update_set_plymouth_percentage (guint percentage)
+ GError *error = NULL;
+ gchar *cmdline;
+
++ /* allow testing without sending commands to plymouth */
++ if (g_getenv ("PK_OFFLINE_UPDATE_TEST") != NULL)
++ return;
+ cmdline = g_strdup_printf ("plymouth system-update --progress=%i",
+ percentage);
+ ret = g_spawn_command_line_async (cmdline, &error);
+@@ -128,6 +138,10 @@ pk_offline_update_reboot (void)
+ GError *error = NULL;
+ GVariant *val = NULL;
+
++ /* allow testing without rebooting */
++ if (g_getenv ("PK_OFFLINE_UPDATE_TEST") != NULL)
++ return;
++
+ /* reboot using systemd */
+ pk_offline_update_set_plymouth_mode ("shutdown");
+ pk_offline_update_set_plymouth_msg ("Rebooting after installing updates...");
+@@ -299,10 +313,13 @@ out:
+ int
+ main (int argc, char *argv[])
+ {
++ gboolean ret;
++ gchar **package_ids = NULL;
++ gchar *packages_data = NULL;
+ GError *error = NULL;
+ gint retval;
+- PkTask *task = NULL;
+ PkResults *results;
++ PkTask *task = NULL;
+
+ /* setup */
+ g_type_init ();
+@@ -314,16 +331,30 @@ main (int argc, char *argv[])
+ goto out;
+ }
+
++ /* get the list of packages to update */
++ ret = g_file_get_contents (PK_OFFLINE_PREPARED_UPDATE_FILENAME,
++ &packages_data,
++ NULL,
++ &error);
++ if (!ret) {
++ retval = EXIT_FAILURE;
++ g_warning ("failed to read: %s", error->message);
++ g_error_free (error);
++ goto out;
++ }
++
+ /* just update the system */
+ task = pk_task_new ();
+ pk_task_set_interactive (task, FALSE);
+ pk_offline_update_set_plymouth_mode ("updates");
+- results = pk_client_update_system (PK_CLIENT (task),
+- 0,
+- NULL, /* GCancellable */
+- pk_offline_update_progress_cb,
+- NULL, /* user_data */
+- &error);
++ package_ids = g_strsplit (packages_data, "\n", -1);
++ results = pk_client_update_packages (PK_CLIENT (task),
++ 0,
++ package_ids,
++ NULL, /* GCancellable */
++ pk_offline_update_progress_cb,
++ NULL, /* user_data */
++ &error);
+ if (results == NULL) {
+ retval = EXIT_FAILURE;
+ pk_offline_update_write_error (error);
+@@ -332,11 +363,13 @@ main (int argc, char *argv[])
+ goto out;
+ }
+ pk_offline_update_write_results (results);
+- g_unlink ("/var/lib/PackageKit/prepared-update");
++ g_unlink (PK_OFFLINE_PREPARED_UPDATE_FILENAME);
+ retval = EXIT_SUCCESS;
+ out:
+ g_unlink ("/system-update");
+ pk_offline_update_reboot ();
++ g_free (packages_data);
++ g_strfreev (package_ids);
+ if (task != NULL)
+ g_object_unref (task);
+ return retval;
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 5613f3e..4af44a7 100644
--- a/lib/packagekit-glib2/pk-client.c
@@ -191,7 +311,7 @@ index b9ae2b8..477552f 100644
}
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
-index afdd563..d30aaac 100644
+index afdd563..c5a29f1 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -689,23 +689,24 @@ pk_transaction_category_cb (PkBackend *backend,
@@ -224,7 +344,122 @@ index afdd563..d30aaac 100644
NULL);
}
-@@ -1751,7 +1752,7 @@ pk_transaction_transaction_cb (PkTransactionDb *tdb,
+@@ -1106,14 +1107,75 @@ pk_transaction_set_full_paths (PkTransaction *transaction,
+ }
+
+ /**
++ * pk_transaction_get_existing_prepared_updates:
++ **/
++static GPtrArray *
++pk_transaction_get_existing_prepared_updates (const gchar *filename)
++{
++ gboolean ret;
++ gchar **package_ids = NULL;
++ gchar *packages_data = NULL;
++ GError *error = NULL;
++ GPtrArray *packages;
++ guint i;
++
++ /* always return a valid array, even for failure */
++ packages = g_ptr_array_new_with_free_func (g_free);
++
++ /* does the file exist ? */
++ if (!g_file_test (filename, G_FILE_TEST_EXISTS))
++ goto out;
++
++ /* get the list of packages to update */
++ ret = g_file_get_contents (filename,
++ &packages_data,
++ NULL,
++ &error);
++ if (!ret) {
++ g_warning ("failed to read: %s", error->message);
++ g_error_free (error);
++ goto out;
++ }
++
++ /* add them to the new array */
++ package_ids = g_strsplit (packages_data, "\n", -1);
++ for (i = 0; package_ids[i] != NULL; i++)
++ g_ptr_array_add (packages, g_strdup (package_ids[i]));
++out:
++ g_free (packages_data);
++ g_strfreev (package_ids);
++ return packages;
++}
++
++/**
++ * pk_transaction_array_str_exists:
++ **/
++static gboolean
++pk_transaction_array_str_exists (GPtrArray *array, const gchar *str)
++{
++ guint i;
++ const gchar *tmp;
++ for (i = 0; i < array->len; i++) {
++ tmp = g_ptr_array_index (array, i);
++ if (g_strcmp0 (tmp, str) == 0)
++ return TRUE;
++ }
++ return FALSE;
++}
++
++/**
+ * pk_transaction_write_prepared_file:
+ **/
+ static void
+ pk_transaction_write_prepared_file (PkTransaction *transaction)
+ {
+ gboolean ret;
++ gchar **package_ids;
++ gchar *packages_str = NULL;
+ gchar *path;
+ GError *error = NULL;
++ GPtrArray *packages;
++ guint i;
+
+ /* not interesting to us */
+ if (transaction->priv->role != PK_ROLE_ENUM_UPDATE_PACKAGES &&
+@@ -1121,14 +1183,28 @@ pk_transaction_write_prepared_file (PkTransaction *transaction)
+ return;
+ }
+
+- /* write filename */
++ /* get the existing prepared updates */
+ path = g_build_filename (LOCALSTATEDIR,
+ "lib",
+ "PackageKit",
+ "prepared-update",
+ NULL);
++ packages = pk_transaction_get_existing_prepared_updates (path);
++
++ /* add any new ones */
++ package_ids = transaction->priv->cached_package_ids;
++ for (i = 0; package_ids[i] != NULL; i++) {
++ if (!pk_transaction_array_str_exists (packages, package_ids[i])) {
++ g_ptr_array_add (packages,
++ g_strdup (package_ids[i]));
++ }
++ }
++ g_ptr_array_add (packages, NULL);
++
++ /* write filename */
++ packages_str = g_strjoinv ("\n", (gchar **) packages->pdata);
+ ret = g_file_set_contents (path,
+- pk_role_enum_to_string (transaction->priv->role),
++ packages_str,
+ -1,
+ &error);
+ if (!ret) {
+@@ -1136,6 +1212,7 @@ pk_transaction_write_prepared_file (PkTransaction *transaction)
+ path, error->message);
+ g_error_free (error);
+ }
++ g_free (packages_str);
+ g_free (path);
+ }
+
+@@ -1751,7 +1828,7 @@ pk_transaction_transaction_cb (PkTransactionDb *tdb,
transaction->priv->tid,
PK_DBUS_INTERFACE_TRANSACTION,
"Transaction",
@@ -233,7 +468,29 @@ index afdd563..d30aaac 100644
tid,
timespec,
succeeded,
-@@ -3029,6 +3030,18 @@ pk_transaction_get_role (PkTransaction *transaction)
+@@ -2880,6 +2957,21 @@ pk_transaction_obtain_authorization (PkTransaction *transaction,
+
+ g_return_val_if_fail (priv->sender != NULL, FALSE);
+
++ /* we don't need to authenticate at all to just download packages */
++ if (pk_bitfield_contain (transaction->priv->cached_transaction_flags,
++ PK_TRANSACTION_FLAG_ENUM_ONLY_DOWNLOAD)) {
++ g_debug ("No authentication required for only-download");
++ ret = pk_transaction_commit (transaction);
++ if (!ret) {
++ g_set_error_literal (error,
++ PK_TRANSACTION_ERROR,
++ PK_TRANSACTION_ERROR_COMMIT_FAILED,
++ "Could not commit to a transaction object");
++ pk_transaction_release_tid (transaction);
++ goto out;
++ }
++ }
++
+ /* we should always have subject */
+ if (priv->subject == NULL) {
+ g_set_error (error, PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_REFUSED_BY_POLICY,
+@@ -3029,6 +3121,18 @@ pk_transaction_get_role (PkTransaction *transaction)
}
/**
@@ -252,7 +509,7 @@ index afdd563..d30aaac 100644
* pk_transaction_dbus_return:
**/
static void
-@@ -3065,7 +3078,6 @@ pk_transaction_accept_eula (PkTransaction *transaction,
+@@ -3065,7 +3169,6 @@ pk_transaction_accept_eula (PkTransaction *transaction,
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
@@ -260,7 +517,7 @@ index afdd563..d30aaac 100644
g_variant_get (params, "(&s)",
&eula_id);
-@@ -3077,6 +3089,8 @@ pk_transaction_accept_eula (PkTransaction *transaction,
+@@ -3077,6 +3180,8 @@ pk_transaction_accept_eula (PkTransaction *transaction,
goto out;
}
@@ -269,7 +526,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
PK_ROLE_ENUM_ACCEPT_EULA,
-@@ -3319,7 +3333,7 @@ pk_transaction_download_packages (PkTransaction *transaction,
+@@ -3319,7 +3424,7 @@ pk_transaction_download_packages (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_package_ids = g_strdupv (package_ids);
transaction->priv->cached_directory = g_strdup (directory);
@@ -278,7 +535,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3360,7 +3374,7 @@ pk_transaction_get_categories (PkTransaction *transaction,
+@@ -3360,7 +3465,7 @@ pk_transaction_get_categories (PkTransaction *transaction,
goto out;
}
@@ -287,7 +544,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3434,7 +3448,7 @@ pk_transaction_get_depends (PkTransaction *transaction,
+@@ -3434,7 +3539,7 @@ pk_transaction_get_depends (PkTransaction *transaction,
transaction->priv->cached_filters = filter;
transaction->priv->cached_package_ids = g_strdupv (package_ids);
transaction->priv->cached_force = recursive;
@@ -296,7 +553,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3504,7 +3518,7 @@ pk_transaction_get_details (PkTransaction *transaction,
+@@ -3504,7 +3609,7 @@ pk_transaction_get_details (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_package_ids = g_strdupv (package_ids);
@@ -305,7 +562,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3545,7 +3559,7 @@ pk_transaction_get_distro_upgrades (PkTransaction *transaction,
+@@ -3545,7 +3650,7 @@ pk_transaction_get_distro_upgrades (PkTransaction *transaction,
}
/* save so we can run later */
@@ -314,7 +571,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3613,7 +3627,7 @@ pk_transaction_get_files (PkTransaction *transaction,
+@@ -3613,7 +3718,7 @@ pk_transaction_get_files (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_package_ids = g_strdupv (package_ids);
@@ -323,7 +580,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3659,7 +3673,7 @@ pk_transaction_get_packages (PkTransaction *transaction,
+@@ -3659,7 +3764,7 @@ pk_transaction_get_packages (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_filters = filter;
@@ -332,7 +589,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3692,7 +3706,7 @@ pk_transaction_get_old_transactions (PkTransaction *transaction,
+@@ -3692,7 +3797,7 @@ pk_transaction_get_old_transactions (PkTransaction *transaction,
g_debug ("GetOldTransactions method called");
@@ -341,7 +598,7 @@ index afdd563..d30aaac 100644
pk_transaction_db_get_list (transaction->priv->transaction_db, number);
idle_id = g_idle_add ((GSourceFunc) pk_transaction_finished_idle_cb, transaction);
g_source_set_name_by_id (idle_id, "[PkTransaction] finished from get-old-transactions");
-@@ -3731,7 +3745,7 @@ pk_transaction_get_repo_list (PkTransaction *transaction,
+@@ -3731,7 +3836,7 @@ pk_transaction_get_repo_list (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_filters = filter;
@@ -350,7 +607,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3806,7 +3820,7 @@ pk_transaction_get_requires (PkTransaction *transaction,
+@@ -3806,7 +3911,7 @@ pk_transaction_get_requires (PkTransaction *transaction,
transaction->priv->cached_filters = filter;
transaction->priv->cached_package_ids = g_strdupv (package_ids);
transaction->priv->cached_force = recursive;
@@ -359,7 +616,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -3875,7 +3889,7 @@ pk_transaction_get_update_detail (PkTransaction *transaction,
+@@ -3875,7 +3980,7 @@ pk_transaction_get_update_detail (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_package_ids = g_strdupv (package_ids);
@@ -368,7 +625,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -4004,7 +4018,7 @@ pk_transaction_get_updates (PkTransaction *transaction,
+@@ -4004,7 +4109,7 @@ pk_transaction_get_updates (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_filters = filter;
@@ -377,7 +634,7 @@ index afdd563..d30aaac 100644
/* try and reuse cache */
ret = pk_transaction_try_emit_cache (transaction);
-@@ -4166,7 +4180,7 @@ pk_transaction_install_files (PkTransaction *transaction,
+@@ -4166,7 +4271,7 @@ pk_transaction_install_files (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_transaction_flags = transaction_flags;
transaction->priv->cached_full_paths = g_strdupv (full_paths);
@@ -386,7 +643,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -4239,7 +4253,7 @@ pk_transaction_install_packages (PkTransaction *transaction,
+@@ -4239,7 +4344,7 @@ pk_transaction_install_packages (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_transaction_flags = transaction_flags;
transaction->priv->cached_package_ids = g_strdupv (package_ids);
@@ -395,7 +652,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -4309,7 +4323,7 @@ pk_transaction_install_signature (PkTransaction *transaction,
+@@ -4309,7 +4414,7 @@ pk_transaction_install_signature (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_package_id = g_strdup (package_id);
transaction->priv->cached_key_id = g_strdup (key_id);
@@ -404,7 +661,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -4357,7 +4371,7 @@ pk_transaction_refresh_cache (PkTransaction *transaction,
+@@ -4357,7 +4462,7 @@ pk_transaction_refresh_cache (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_force = force;
@@ -413,7 +670,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -4435,7 +4449,7 @@ pk_transaction_remove_packages (PkTransaction *transaction,
+@@ -4435,7 +4540,7 @@ pk_transaction_remove_packages (PkTransaction *transaction,
transaction->priv->cached_package_ids = g_strdupv (package_ids);
transaction->priv->cached_allow_deps = allow_deps;
transaction->priv->cached_autoremove = autoremove;
@@ -422,7 +679,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -4491,7 +4505,7 @@ pk_transaction_repo_enable (PkTransaction *transaction,
+@@ -4491,7 +4596,7 @@ pk_transaction_repo_enable (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_repo_id = g_strdup (repo_id);
transaction->priv->cached_enabled = enabled;
@@ -431,7 +688,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -4550,7 +4564,7 @@ pk_transaction_repo_set_data (PkTransaction *transaction,
+@@ -4550,7 +4655,7 @@ pk_transaction_repo_set_data (PkTransaction *transaction,
transaction->priv->cached_repo_id = g_strdup (repo_id);
transaction->priv->cached_parameter = g_strdup (parameter);
transaction->priv->cached_value = g_strdup (value);
@@ -440,7 +697,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -4630,7 +4644,7 @@ pk_transaction_resolve (PkTransaction *transaction,
+@@ -4630,7 +4735,7 @@ pk_transaction_resolve (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_package_ids = g_strdupv (packages);
transaction->priv->cached_filters = filter;
@@ -449,7 +706,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -4687,7 +4701,7 @@ pk_transaction_search_details (PkTransaction *transaction,
+@@ -4687,7 +4792,7 @@ pk_transaction_search_details (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_filters = filter;
transaction->priv->cached_values = g_strdupv (values);
@@ -458,7 +715,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -4754,7 +4768,7 @@ pk_transaction_search_files (PkTransaction *transaction,
+@@ -4754,7 +4859,7 @@ pk_transaction_search_files (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_filters = filter;
transaction->priv->cached_values = g_strdupv (values);
@@ -467,7 +724,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -4821,7 +4835,7 @@ pk_transaction_search_groups (PkTransaction *transaction,
+@@ -4821,7 +4926,7 @@ pk_transaction_search_groups (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_filters = filter;
transaction->priv->cached_values = g_strdupv (values);
@@ -476,7 +733,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -4877,7 +4891,7 @@ pk_transaction_search_names (PkTransaction *transaction,
+@@ -4877,7 +4982,7 @@ pk_transaction_search_names (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_filters = filter;
transaction->priv->cached_values = g_strdupv (values);
@@ -485,7 +742,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -5112,7 +5126,7 @@ pk_transaction_update_packages (PkTransaction *transaction,
+@@ -5112,7 +5217,7 @@ pk_transaction_update_packages (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_transaction_flags = transaction_flags;
transaction->priv->cached_package_ids = g_strdupv (package_ids);
@@ -494,7 +751,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -5165,7 +5179,7 @@ pk_transaction_update_system (PkTransaction *transaction,
+@@ -5165,7 +5270,7 @@ pk_transaction_update_system (PkTransaction *transaction,
}
transaction->priv->cached_transaction_flags = transaction_flags;
@@ -503,7 +760,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -5225,7 +5239,7 @@ pk_transaction_what_provides (PkTransaction *transaction,
+@@ -5225,7 +5330,7 @@ pk_transaction_what_provides (PkTransaction *transaction,
transaction->priv->cached_filters = filter;
transaction->priv->cached_values = g_strdupv (values);
transaction->priv->cached_provides = provides;
@@ -512,7 +769,7 @@ index afdd563..d30aaac 100644
/* try to commit this */
ret = pk_transaction_commit (transaction);
-@@ -5274,7 +5288,7 @@ pk_transaction_upgrade_system (PkTransaction *transaction,
+@@ -5274,7 +5379,7 @@ pk_transaction_upgrade_system (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_value = g_strdup (distro_id);
transaction->priv->cached_provides = upgrade_kind;
@@ -521,7 +778,7 @@ index afdd563..d30aaac 100644
/* try to get authorization */
ret = pk_transaction_obtain_authorization (transaction,
-@@ -5319,7 +5333,7 @@ pk_transaction_repair_system (PkTransaction *transaction,
+@@ -5319,7 +5424,7 @@ pk_transaction_repair_system (PkTransaction *transaction,
/* save so we can run later */
transaction->priv->cached_transaction_flags = transaction_flags;
diff --git a/PackageKit.spec b/PackageKit.spec
index a28ac88..088c147 100644
--- a/PackageKit.spec
+++ b/PackageKit.spec
@@ -3,7 +3,7 @@
Summary: Package management service
Name: PackageKit
Version: 0.8.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.packagekit.org
Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
@@ -472,6 +472,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_libdir}/pkgconfig/packagekit-plugin.pc
%changelog
+* Fri Jun 29 2012 Richard Hughes <rhughes at redhat.com> - 0.8.1-3
+- Fix several reported problems with the offline-update funtionality.
+
* Thu Jun 28 2012 Richard Hughes <rhughes at redhat.com> - 0.8.1-2
- Apply a combined patch from master to fix several reported issues
with the OS update feature.
More information about the scm-commits
mailing list