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

Richard Hughes hughsient at kemper.freedesktop.org
Sun Sep 9 12:28:16 PDT 2007


 TODO                                |    5 +++--
 backends/apt/pk-backend-apt.cpp     |    4 ++--
 backends/box/pk-backend-box.c       |    4 ++--
 backends/conary/pk-backend-conary.c |    4 ++--
 backends/dummy/pk-backend-dummy.c   |    4 ++--
 backends/test/pk-backend-test.c     |    4 ++--
 backends/yum/pk-backend-yum.c       |    4 ++--
 client/pk-console.c                 |    3 +++
 libpackagekit/pk-enum-list.c        |   10 +++++-----
 libpackagekit/pk-enum-list.h        |    2 +-
 10 files changed, 24 insertions(+), 20 deletions(-)

New commits:
diff-tree ff19a54e01d74e7999ccc81f26d238764246bfe5 (from e2f75d1c4481d95ab75734ef147d655dce54b45e)
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Sep 9 20:27:56 2007 +0100

    use -1, not 0 for the enumlist terminator as 0 is some enum values

diff --git a/TODO b/TODO
index f0413eb..182df55 100644
--- a/TODO
+++ b/TODO
@@ -22,8 +22,9 @@ to expose in the UI.
 *** Valgrind everything ***
 We leak memory like there is no tommorrow.
 
-*** Add GetPercentage and GetSubPercentage for coldplugging ***
-We need this for the PkWatch code.
+*** Add methods for coldplugging ***
+We need GetLastPackage, GetLastPercentage and GetLastSubPercentage for the PkWatch code.
+NOTE: RELEASE BLOCKER
 
 *** task_client has to return GError ***
 Client programs using libpackagekit should know the error, rather than just
diff --git a/backends/apt/pk-backend-apt.cpp b/backends/apt/pk-backend-apt.cpp
index 5e24588..e743cbe 100644
--- a/backends/apt/pk-backend-apt.cpp
+++ b/backends/apt/pk-backend-apt.cpp
@@ -271,7 +271,7 @@ backend_get_groups (PkBackend *backend, 
 				      PK_GROUP_ENUM_ACCESSIBILITY,
 				      PK_GROUP_ENUM_GAMES,
 				      PK_GROUP_ENUM_SYSTEM,
-				      0);
+				      -1);
 }
 
 /**
@@ -285,7 +285,7 @@ backend_get_filters (PkBackend *backend,
 				      PK_FILTER_ENUM_GUI,
 				      PK_FILTER_ENUM_INSTALLED,
 				      PK_FILTER_ENUM_DEVELOPMENT,
-				      0);
+				      -1);
 }
 
 /**
diff --git a/backends/box/pk-backend-box.c b/backends/box/pk-backend-box.c
index c03c727..6602378 100644
--- a/backends/box/pk-backend-box.c
+++ b/backends/box/pk-backend-box.c
@@ -331,7 +331,7 @@ backend_get_groups (PkBackend *backend, 
 				      PK_GROUP_ENUM_ACCESSIBILITY,
 				      PK_GROUP_ENUM_GAMES,
 				      PK_GROUP_ENUM_SYSTEM,
-				      0);
+				      -1);
 }
 
 /**
@@ -345,7 +345,7 @@ backend_get_filters (PkBackend *backend,
 				      PK_FILTER_ENUM_GUI,
 				      PK_FILTER_ENUM_INSTALLED,
 				      PK_FILTER_ENUM_DEVELOPMENT,
-				      0);
+				      -1);
 }
 
 /**
diff --git a/backends/conary/pk-backend-conary.c b/backends/conary/pk-backend-conary.c
index c9e62e7..3b4070a 100644
--- a/backends/conary/pk-backend-conary.c
+++ b/backends/conary/pk-backend-conary.c
@@ -36,7 +36,7 @@ backend_get_groups (PkBackend *backend, 
 				      PK_GROUP_ENUM_ACCESSIBILITY,
 				      PK_GROUP_ENUM_GAMES,
 				      PK_GROUP_ENUM_SYSTEM,
-				      0);
+				      -1);
 }
 
 /**
@@ -50,7 +50,7 @@ backend_get_filters (PkBackend *backend,
 				      PK_FILTER_ENUM_GUI,
 				      PK_FILTER_ENUM_INSTALLED,
 				      PK_FILTER_ENUM_DEVELOPMENT,
-				      0);
+				      -1);
 }
 
 /**
diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index 1075ec6..c580532 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -56,7 +56,7 @@ backend_get_groups (PkBackend *backend, 
 				      PK_GROUP_ENUM_ACCESSIBILITY,
 				      PK_GROUP_ENUM_GAMES,
 				      PK_GROUP_ENUM_SYSTEM,
-				      0);
+				      -1);
 }
 
 /**
@@ -70,7 +70,7 @@ backend_get_filters (PkBackend *backend,
 				      PK_FILTER_ENUM_GUI,
 				      PK_FILTER_ENUM_INSTALLED,
 				      PK_FILTER_ENUM_DEVELOPMENT,
-				      0);
+				      -1);
 }
 
 /**
diff --git a/backends/test/pk-backend-test.c b/backends/test/pk-backend-test.c
index 333de71..6f0b833 100644
--- a/backends/test/pk-backend-test.c
+++ b/backends/test/pk-backend-test.c
@@ -53,7 +53,7 @@ backend_get_groups (PkBackend *backend, 
 				      PK_GROUP_ENUM_ACCESSIBILITY,
 				      PK_GROUP_ENUM_GAMES,
 				      PK_GROUP_ENUM_SYSTEM,
-				      0);
+				      -1);
 }
 
 /**
@@ -67,7 +67,7 @@ backend_get_filters (PkBackend *backend,
 				      PK_FILTER_ENUM_GUI,
 				      PK_FILTER_ENUM_INSTALLED,
 				      PK_FILTER_ENUM_DEVELOPMENT,
-				      0);
+				      -1);
 }
 
 /**
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index 8aa7b84..aecad4c 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -35,7 +35,7 @@ backend_get_groups (PkBackend *backend, 
 				      PK_GROUP_ENUM_ACCESSIBILITY,
 				      PK_GROUP_ENUM_GAMES,
 				      PK_GROUP_ENUM_SYSTEM,
-				      0);
+				      -1);
 }
 
 /**
@@ -49,7 +49,7 @@ backend_get_filters (PkBackend *backend,
 				      PK_FILTER_ENUM_GUI,
 				      PK_FILTER_ENUM_INSTALLED,
 				      PK_FILTER_ENUM_DEVELOPMENT,
-				      0);
+				      -1);
 }
 
 /**
diff --git a/libpackagekit/pk-enum-list.c b/libpackagekit/pk-enum-list.c
index 03bf318..28ef095 100644
--- a/libpackagekit/pk-enum-list.c
+++ b/libpackagekit/pk-enum-list.c
@@ -64,20 +64,20 @@ pk_enum_list_set_type (PkEnumList *elist
  * pk_enum_list_append_multiple:
  **/
 gboolean
-pk_enum_list_append_multiple (PkEnumList *elist, guint value, ...)
+pk_enum_list_append_multiple (PkEnumList *elist, gint value, ...)
 {
 	va_list args;
 	guint i;
 	guint value_temp;
 
 	/* create a new list. A list must have at least one entry */
-	g_ptr_array_add (elist->priv->data, GUINT_TO_POINTER(value));
+	g_ptr_array_add (elist->priv->data, GINT_TO_POINTER(value));
 
 	/* process the valist */
 	va_start (args, value);
 	for (i=0;; i++) {
-		value_temp = va_arg (args, guint);
-		if (value_temp == 0) break;
+		value_temp = va_arg (args, gint);
+		if (value_temp == -1) break;
 		g_ptr_array_add (elist->priv->data, GUINT_TO_POINTER(value_temp));
 	}
 	va_end (args);
@@ -335,7 +335,7 @@ libst_enum_list (LibSelfTest *test)
 
 	/************************************************************/
 	libst_title (test, "add multiple");
-	ret = pk_enum_list_append_multiple (elist, PK_ACTION_ENUM_SEARCH_DETAILS, PK_ACTION_ENUM_SEARCH_GROUP, 0);
+	ret = pk_enum_list_append_multiple (elist, PK_ACTION_ENUM_SEARCH_DETAILS, PK_ACTION_ENUM_SEARCH_GROUP, -1);
 	if (ret == TRUE) {
 		libst_success (test, NULL);
 	} else {
diff --git a/libpackagekit/pk-enum-list.h b/libpackagekit/pk-enum-list.h
index a65d120..8072803 100644
--- a/libpackagekit/pk-enum-list.h
+++ b/libpackagekit/pk-enum-list.h
@@ -67,7 +67,7 @@ gboolean	 pk_enum_list_append			(PkEnumL
 							 guint		 value);
 gboolean	 pk_enum_list_print			(PkEnumList	*elist);
 gboolean	 pk_enum_list_append_multiple		(PkEnumList	*elist,
-							 guint		 value, ...);
+							 gint		 value, ...);
 
 G_END_DECLS
 
diff-tree e2f75d1c4481d95ab75734ef147d655dce54b45e (from cd1005349652d909ea5c227c3081e638a520f951)
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Sep 9 18:36:04 2007 +0100

    add some extra debug text to the console program

diff --git a/client/pk-console.c b/client/pk-console.c
index 73c8201..f9f5301 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -125,6 +125,9 @@ pk_console_usage (const gchar *error)
 	g_print ("  pkcon [sync] [verbose] get depends <package_id>\n");
 	g_print ("  pkcon [sync] [verbose] get requires <package_id>\n");
 	g_print ("  pkcon [sync] [verbose] get description <package_id>\n");
+	g_print ("  pkcon [sync] [verbose] get actions\n");
+	g_print ("  pkcon [sync] [verbose] get groups\n");
+	g_print ("  pkcon [sync] [verbose] get filters\n");
 	g_print ("\n");
 	g_print ("    package_id is typically gimp;2:2.4.0-0.rc1.1.fc8;i386;development\n");
 }



More information about the PackageKit mailing list