[packagekit] packagekit: Branch 'master'

Richard Hughes hughsient at kemper.freedesktop.org
Mon Oct 15 00:04:04 PDT 2007


 libpackagekit/pk-client.c |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit b3342782a9a8134f32ba7dad2ed837ebe5d6697c
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Oct 15 08:00:38 2007 +0100

    preserve the role when we do pk_client_requeue

diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index 737c941..a4f359e 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -2141,6 +2141,8 @@ pk_client_get_filters (PkClient *client)
 gboolean
 pk_client_requeue (PkClient *client)
 {
+	PkRoleEnum role;
+
 	g_return_val_if_fail (client != NULL, FALSE);
 	g_return_val_if_fail (PK_IS_CLIENT (client), FALSE);
 
@@ -2150,9 +2152,15 @@ pk_client_requeue (PkClient *client)
 		return FALSE;
 	}
 
+	/* save the role */
+	role = client->priv->role;
+
 	/* reset this client, which doesn't clear cached data */
 	pk_client_reset (client);
 
+	/* restore the role */
+	client->priv->role = role;
+
 	/* do the correct action with the cached parameters */
 	if (client->priv->role == PK_ROLE_ENUM_GET_DEPENDS) {
 		pk_client_get_depends (client, client->priv->xcached_package_id);



More information about the PackageKit mailing list