[packagekit] packagekit: Branch 'master' - 5 commits

Richard Hughes hughsient at kemper.freedesktop.org
Tue Oct 2 11:22:29 PDT 2007


 TODO                      |    7 -------
 client/pk-console.c       |    4 ++--
 libpackagekit/pk-client.c |   38 +++++++++++++++++++++++---------------
 src/pk-backend.c          |    4 ++--
 src/pk-engine.c           |   14 ++++++++------
 src/pk-interface.xml      |    2 +-
 src/pk-marshal.list       |    4 ++--
 7 files changed, 38 insertions(+), 35 deletions(-)

New commits:
diff-tree f28a3317b1115b21088eba68e20e01cef8cf956a (from b78ef19f8aca4e8c115beb32892965124f1bbf27)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 2 19:22:13 2007 +0100

    make size into a guint64 not a gulong. DBUS hates me and refuses to demarshal gulong

diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index 14daf9e..5a81872 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -426,7 +426,7 @@ pk_client_description_cb (DBusGProxy  *p
 			  const gchar *group_text,
 			  const gchar *description,
 			  const gchar *url,
-			  gulong       size,
+			  guint64      size,
 			  const gchar *filelist,
 			  PkClient    *client)
 {
@@ -437,7 +437,7 @@ pk_client_description_cb (DBusGProxy  *p
 	if (pk_transaction_id_equal (tid, client->priv->tid) == TRUE) {
 		group = pk_group_enum_from_text (group_text);
 		pk_debug ("emit description %s, %s, %i, %s, %s, %ld, %s",
-			  package_id, licence, group, description, url, size, filelist);
+			  package_id, licence, group, description, url, (long int) size, filelist);
 		g_signal_emit (client , signals [PK_CLIENT_DESCRIPTION], 0,
 			       package_id, licence, group, description, url, size, filelist);
 	}
@@ -1718,9 +1718,9 @@ pk_client_class_init (PkClientClass *kla
 	signals [PK_CLIENT_DESCRIPTION] =
 		g_signal_new ("description",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
-			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_UINT_STRING_STRING_ULONG_STRING,
+			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_UINT_STRING_STRING_UINT64_STRING,
 			      G_TYPE_NONE, 7, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING,
-			      G_TYPE_STRING, G_TYPE_ULONG, G_TYPE_STRING);
+			      G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_STRING);
 	signals [PK_CLIENT_ERROR_CODE] =
 		g_signal_new ("error-code",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
@@ -1820,9 +1820,9 @@ pk_client_init (PkClient *client)
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
 
 	/* Description */
-	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_ULONG_STRING,
+	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_UINT64_STRING,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, 
-					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_ULONG,
+					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64,
 					   G_TYPE_STRING, G_TYPE_INVALID);
 
 	/* Package */
@@ -1887,7 +1887,7 @@ pk_client_init (PkClient *client)
 
 	dbus_g_proxy_add_signal (proxy, "Description",
 				 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
-				 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_ULONG,
+				 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64,
 				 G_TYPE_STRING, G_TYPE_INVALID);
 	dbus_g_proxy_connect_signal (proxy, "Description",
 				     G_CALLBACK (pk_client_description_cb), client, NULL);
diff --git a/src/pk-backend.c b/src/pk-backend.c
index d2e3754..28c353d 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -1485,9 +1485,9 @@ pk_backend_class_init (PkBackendClass *k
 	signals [PK_BACKEND_DESCRIPTION] =
 		g_signal_new ("description",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
-			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_UINT_STRING_STRING_ULONG_STRING,
+			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_UINT_STRING_STRING_UINT64_STRING,
 			      G_TYPE_NONE, 7, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING,
-			      G_TYPE_ULONG,G_TYPE_STRING);
+			      G_TYPE_UINT64, G_TYPE_STRING);
 	signals [PK_BACKEND_ERROR_CODE] =
 		g_signal_new ("error-code",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 9afc1b7..8f2bde3 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -387,8 +387,8 @@ pk_engine_require_restart_cb (PkBackend 
  **/
 static void
 pk_engine_description_cb (PkBackend *backend, const gchar *package_id, const gchar *licence, PkGroupEnum group,
-			  const gchar *detail, const gchar *url, gulong size, const gchar *filelist, 
-			  PkEngine *engine)
+			  const gchar *detail, const gchar *url,
+			  guint64 size, const gchar *filelist, PkEngine *engine)
 {
 	PkTransactionItem *item;
 	const gchar *group_text;
@@ -404,7 +404,7 @@ pk_engine_description_cb (PkBackend *bac
 	group_text = pk_group_enum_to_text (group);
 
 	pk_debug ("emitting description tid:%s, %s, %s, %s, %s, %s, %ld, %s",
-		  item->tid, package_id, licence, group_text, detail, url, size, filelist);
+		  item->tid, package_id, licence, group_text, detail, url, (long int) size, filelist);
 	g_signal_emit (engine, signals [PK_ENGINE_DESCRIPTION], 0,
 		       item->tid, package_id, licence, group_text, detail, url, size, filelist);
 }
@@ -1950,9 +1950,9 @@ pk_engine_class_init (PkEngineClass *kla
 	signals [PK_ENGINE_DESCRIPTION] =
 		g_signal_new ("description",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
-			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_ULONG_STRING,
+			      0, NULL, NULL, pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_UINT64_STRING,
 			      G_TYPE_NONE, 8, G_TYPE_STRING, G_TYPE_STRING,
-			      G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_ULONG, G_TYPE_STRING);
+			      G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_STRING);
 	signals [PK_ENGINE_FINISHED] =
 		g_signal_new ("finished",
 			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
diff --git a/src/pk-interface.xml b/src/pk-interface.xml
index e7bb6ab..840a0d3 100644
--- a/src/pk-interface.xml
+++ b/src/pk-interface.xml
@@ -108,7 +108,7 @@
       <arg type="s" name="group" direction="out"/>
       <arg type="s" name="detail" direction="out"/>
       <arg type="s" name="url" direction="out"/>
-      <arg type="u" name="size" direction="out"/> <!-- size of package file in bytes -->
+      <arg type="t" name="size" direction="out"/> <!-- size of package file in bytes -->
       <arg type="s" name="file_list" direction="out"/> <!-- list of files and dirs separated by ';' -->
     </signal>
     <signal name="UpdateDetail">
diff --git a/src/pk-marshal.list b/src/pk-marshal.list
index f1cd591..79270e2 100644
--- a/src/pk-marshal.list
+++ b/src/pk-marshal.list
@@ -13,8 +13,8 @@ VOID:STRING,STRING,STRING,STRING
 VOID:STRING,STRING,STRING,STRING,STRING
 VOID:STRING,STRING,STRING,STRING,STRING,STRING
 VOID:STRING,STRING,STRING,STRING,STRING,STRING,STRING
-VOID:STRING,STRING,UINT,STRING,STRING,ULONG,STRING
-VOID:STRING,STRING,STRING,STRING,STRING,STRING,ULONG,STRING
+VOID:STRING,STRING,UINT,STRING,STRING,UINT64,STRING
+VOID:STRING,STRING,STRING,STRING,STRING,STRING,UINT64,STRING
 VOID:STRING,UINT,STRING,STRING
 VOID:STRING,STRING,UINT,UINT,UINT
 VOID:STRING,STRING,BOOL,UINT,UINT,STRING
diff-tree b78ef19f8aca4e8c115beb32892965124f1bbf27 (from parents)
Merge: 97103fbf3ee38e16796884024f5ce36ab6a4fc14 1bae414c33657093b53beb39b39ed47d9c506fd0
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 2 18:29:32 2007 +0100

    Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit

diff-tree 97103fbf3ee38e16796884024f5ce36ab6a4fc14 (from 4b18b9c8a328d00de0a1f4e1f8b22abf56750b29)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Oct 2 18:27:53 2007 +0100

    update the mashall, and make other cosmetic changes

diff --git a/client/pk-console.c b/client/pk-console.c
index 6efa360..c358183 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -406,8 +406,8 @@ pk_console_error_code_cb (PkClient *clie
 static void
 pk_console_description_cb (PkClient *client, const gchar *package_id,
 			   const gchar *licence, PkGroupEnum group,
-			   const gchar *description, const gchar *url, gulong size, const gchar *filelist,
-			   gpointer data)
+			   const gchar *description, const gchar *url,
+			   gulong size, const gchar *filelist, gpointer data)
 {
 	g_print ("description\n");
 	g_print ("  package:     '%s'\n", package_id);
diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index 1a4d969..14daf9e 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -426,7 +426,7 @@ pk_client_description_cb (DBusGProxy  *p
 			  const gchar *group_text,
 			  const gchar *description,
 			  const gchar *url,
-			  gulong size,
+			  gulong       size,
 			  const gchar *filelist,
 			  PkClient    *client)
 {
@@ -436,8 +436,10 @@ pk_client_description_cb (DBusGProxy  *p
 
 	if (pk_transaction_id_equal (tid, client->priv->tid) == TRUE) {
 		group = pk_group_enum_from_text (group_text);
-		pk_debug ("emit description %s, %s, %i, %s, %s, %ld, %s", package_id, licence, group, description, url, size, filelist);
-		g_signal_emit (client , signals [PK_CLIENT_DESCRIPTION], 0, package_id, licence, group, description, url, size, filelist);
+		pk_debug ("emit description %s, %s, %i, %s, %s, %ld, %s",
+			  package_id, licence, group, description, url, size, filelist);
+		g_signal_emit (client , signals [PK_CLIENT_DESCRIPTION], 0,
+			       package_id, licence, group, description, url, size, filelist);
 	}
 }
 
@@ -1802,30 +1804,36 @@ pk_client_init (PkClient *client)
 	/* use PolicyKit */
 	client->priv->polkit = pk_polkit_client_new ();
 
+	/* PercentageChanged et al */
 	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_UINT,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INVALID);
-	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_UINT,
+
+	/* TransactionStatusChanged */
+	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
 	/* Finished */
 	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_UINT,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INVALID);
 
+	/* ErrorCode, RequireRestart */
 	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING,
+
+	/* Description */
+	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_ULONG_STRING,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, 
-					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_ULONG,
+					   G_TYPE_STRING, G_TYPE_INVALID);
+
+	/* Package */
 	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING,
-					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
-					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_UINT_STRING_STRING,
-					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+
+	/* UpdateDetail */
 	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_STRING,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
 					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	/* transaction */
+	/* Transaction */
 	dbus_g_object_register_marshaller (pk_marshal_VOID__STRING_STRING_STRING_BOOL_STRING_UINT_STRING,
 					   G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN,
 					   G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_INVALID);
diff --git a/src/pk-engine.c b/src/pk-engine.c
index de49f30..9afc1b7 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -403,8 +403,10 @@ pk_engine_description_cb (PkBackend *bac
 	}
 	group_text = pk_group_enum_to_text (group);
 
-	pk_debug ("emitting description tid:%s, %s, %s, %s, %s, %s, %ld, %s", item->tid, package_id, licence, group_text, detail, url, size, filelist);
-	g_signal_emit (engine, signals [PK_ENGINE_DESCRIPTION], 0, item->tid, package_id, licence, group_text, detail, url, size, filelist);
+	pk_debug ("emitting description tid:%s, %s, %s, %s, %s, %s, %ld, %s",
+		  item->tid, package_id, licence, group_text, detail, url, size, filelist);
+	g_signal_emit (engine, signals [PK_ENGINE_DESCRIPTION], 0,
+		       item->tid, package_id, licence, group_text, detail, url, size, filelist);
 }
 
 /**
diff-tree 1bae414c33657093b53beb39b39ed47d9c506fd0 (from parents)
Merge: 47b69c8c102efa044b8b8befd71d3936654a2fe2 4b18b9c8a328d00de0a1f4e1f8b22abf56750b29
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Tue Oct 2 12:49:20 2007 -0400

    Merge branch 'master' of git+ssh://rnorwood@git.packagekit.org/srv/git/PackageKit

diff-tree 47b69c8c102efa044b8b8befd71d3936654a2fe2 (from fc87623193abc49701ea39f07503647666e7038e)
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Tue Oct 2 12:49:03 2007 -0400

    Remove description and package size TODO items.

diff --git a/TODO b/TODO
index 1f2eb3d..9ec46c5 100644
--- a/TODO
+++ b/TODO
@@ -30,13 +30,6 @@ In fedora, if you add a signed repo you 
 *** Split up PolicyKit install into different types ***
 Have different permissions for signed and unsigned repos.
 
-*** Add files in package into Description signal ***
-We need a way to get the installed files into the UI.
-
-*** Add package size into description signal ***
-We need a way to work out how long something is going to take, and
-to expose in the UI.
-
 *** task_client has to return GError ***
 Client programs using libpackagekit should know the error, rather than just
 "it failed"


More information about the PackageKit mailing list