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

Richard Hughes hughsient at kemper.freedesktop.org
Wed Aug 29 17:01:26 PDT 2007


 helpers/BACKENDS                |   14 ++++++++++++++
 helpers/README                  |   34 +++++++++++-----------------------
 libpackagekit/pk-task-monitor.c |    2 +-
 libpackagekit/pk-task-utils.c   |    2 +-
 src/pk-task-conary.c            |   18 +++++++++---------
 5 files changed, 36 insertions(+), 34 deletions(-)

New commits:
diff-tree 2f016f3ef111d1750b05a55a510d87acfe7346c3 (from 0ca07c92472f3bdf5b3f591e7c01c4d9ef548a8b)
Author: Richard Hughes <richard at hughsie.com>
Date:   Thu Aug 30 01:01:15 2007 +0100

    make the spec clearer, and depricate data for package

diff --git a/helpers/README b/helpers/README
index ae925c8..b591511 100644
--- a/helpers/README
+++ b/helpers/README
@@ -247,11 +247,6 @@ STDERR		status<tab>$state
 		$state:		One of "download", "install", "update", "remove"
 		notes:		This is optional.
 
-STDERR		data<tab>$current_data
-		$current_data:	The current worked on package
-		notes:		This is optional, but allows the UI to show what
-				package is being installed on for that sub-transaction.
-
 STDERR		error<tab>$enum<tab>description
 		enum:		Enumerated type, e.g. "no-network", "package-id-invalid",
 				"not-supported", "package-already-installed"
@@ -260,12 +255,12 @@ STDERR		error<tab>$enum<tab>description
 		notes:		Errors should only be send on fatal abortion.
 
 STDOUT		package<tab>$status<tab>$package_id<tab>$summary
-		$status:	Always "1"
+		$status:	"0" if downloading, "1" if installing or updating
 		$package_id:	The package ID name, e.g. openoffice;2.6.22;ppc64;fedora
 				A package_id always has to have three sections.
 		$summary:	The one line package summary, e.g. "Clipart for OpenOffice"
-		NOTE:		As packages are installed then emit them to the screen.
-				This allows a summary to be presented after the transaction.
+		NOTE:		As packages are downloaded or installed then emit them to the screen.
+				This allows a summary to be presented after and during the transaction.
 
 NOTES		The installer should always install extra packages automatically
 		as the use could call GetDeps prior to the intstall if a
@@ -291,11 +286,6 @@ STDERR		status<tab>$state
 		$state:		One of "download", "install", "update", "remove"
 		notes:		This is optional.
 
-STDERR		data<tab>$current_data
-		$current_data:	The current worked on package
-		notes:		This is optional, but allows the UI to show what
-				package is being installed on for that sub-transaction.
-
 STDERR		error<tab>$enum<tab>description
 		enum:		Enumerated type, e.g. "no-network", "package-id-invalid",
 				"not-supported", "package-not-installed"
@@ -304,12 +294,12 @@ STDERR		error<tab>$enum<tab>description
 		notes:		Errors should only be send on fatal abortion.
 
 STDOUT		package<tab>$status<tab>$package_id<tab>$summary
-		$status:	Always "1"
+		$status:	"0" if downloading, "1" if updating
 		$package_id:	The package ID name, e.g. openoffice;2.6.22;ppc64;fedora
 				A package_id always has to have three sections.
 		$summary:	The one line package summary, e.g. "Clipart for OpenOffice"
-		NOTE:		As packages are updated then emit them to the screen.
-				This allows a summary to be presented after the transaction.
+		NOTE:		As packages are downloaded or updated then emit them to the screen.
+				This allows a summary to be presented after and during the transaction.
 
 NOTES		The installer should always update extra packages automatically
 		if required.
@@ -334,11 +324,6 @@ STDERR		subpercentage<tab>$value
 		$value:		Percentage complete of the sub-transaction
 		notes:		This is optional.
 
-STDERR		data<tab>$current_data
-		$current_data:	The current worked on package
-		notes:		This is optional, but allows the UI to show what
-				package is being installed on for that sub-transaction.
-
 STDERR		error<tab>$enum<tab>description
 		enum:		Enumerated type, e.g. "no-network",
 				"not-supported", "package-not-installed", "package-id-invalid"
@@ -405,9 +390,9 @@ STDERR		requirerestart<tab>$type<tab>$de
 				the 'worst' method in the UI notification.
 
 STDOUT		package<tab>$status<tab>$package_id<tab>$summary
-		$status:	Always "1"
+		$status:	"0" if downloading, "1" if updating or installing
 		$package_id:	The package ID name, e.g. openoffice;2.6.22;ppc64;fedora
-		$summary:	The one line package summary.
+		$summary:	The one line package summary. (optional)
 		NOTE:		As packages are updated then emit them to the screen.
 				This allows a summary to be presented after the transaction.
 
diff --git a/libpackagekit/pk-task-monitor.c b/libpackagekit/pk-task-monitor.c
index 374c6f6..97fdba4 100644
--- a/libpackagekit/pk-task-monitor.c
+++ b/libpackagekit/pk-task-monitor.c
@@ -177,7 +177,7 @@ pk_task_monitor_sub_percentage_changed_c
 
 	if (job == tmonitor->priv->job) {
 		pk_debug ("emit sub-percentage-changed %i", percentage);
-		g_signal_emit (tmonitor , signals [PK_TASK_MONITOR_SUB_PERCENTAGE_CHANGED], 0, percentage);
+		g_signal_emit (tmonitor, signals [PK_TASK_MONITOR_SUB_PERCENTAGE_CHANGED], 0, percentage);
 	}
 }
 
diff-tree 0ca07c92472f3bdf5b3f591e7c01c4d9ef548a8b (from c3fd54fad490376bc3e80ded31c255c73c21e058)
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Aug 29 22:24:27 2007 +0100

    add the completed yum action

diff --git a/helpers/BACKENDS b/helpers/BACKENDS
index 60a5be8..25e6b70 100644
--- a/helpers/BACKENDS
+++ b/helpers/BACKENDS
@@ -2,13 +2,13 @@ Current status of the backends
 
                 |   conary  |   yum |   apt |
 ---------------------------------------------
-refresh-cache   |     X     |       |       |
-search-name     |     X     |       |       |
-search-details  |           |       |       |
-get-updates     |     X     |       |       |
-update-system   |           |       |       |
-install         |           |       |       |
-remove          |           |       |       |
-get-deps        |           |       |       |
+refresh-cache   |     X     |   X   |       |
+search-name     |     X     |   X   |       |
+search-details  |           |   X   |       |
+get-updates     |     X     |   X   |       |
+update-system   |           |   X   |       |
+install         |           |   X   |       |
+remove          |           |   X   |       |
+get-deps        |           |   X   |       |
 get-description |           |       |       |
 search-file     |           |       |       |
diff-tree c3fd54fad490376bc3e80ded31c255c73c21e058 (from 33a0dc070c4056a7ffe74127c3dd5e60844429aa)
Author: Ken VanDine <ken at vandine.org>
Date:   Wed Aug 29 16:54:20 2007 -0400

    Added a note about keeping the BACKENDS file updated

diff --git a/helpers/README b/helpers/README
index 346b2c3..ae925c8 100644
--- a/helpers/README
+++ b/helpers/README
@@ -9,6 +9,9 @@ PackageKit executes scripts written in p
 This means we need a standard for what goes on stdin, stdout and stderr to
 try and maximise the common code between the backends.
 
+Please see the helpers/BACKENDS file for the current status of the existing 
+backends.  Backend maintainers, please keep this file updates.
+
 Package Id:
 
 One important idea is the package_id. This is the name;version;arch;data in
diff-tree 33a0dc070c4056a7ffe74127c3dd5e60844429aa (from c7ef5eb0d8284a929171730b494ff7403d556c1f)
Author: Ken VanDine <ken at vandine.org>
Date:   Wed Aug 29 16:45:44 2007 -0400

    Added a file for tracking the status of backends

diff --git a/helpers/BACKENDS b/helpers/BACKENDS
new file mode 100644
index 0000000..60a5be8
--- /dev/null
+++ b/helpers/BACKENDS
@@ -0,0 +1,14 @@
+Current status of the backends
+
+                |   conary  |   yum |   apt |
+---------------------------------------------
+refresh-cache   |     X     |       |       |
+search-name     |     X     |       |       |
+search-details  |           |       |       |
+get-updates     |     X     |       |       |
+update-system   |           |       |       |
+install         |           |       |       |
+remove          |           |       |       |
+get-deps        |           |       |       |
+get-description |           |       |       |
+search-file     |           |       |       |
diff-tree c7ef5eb0d8284a929171730b494ff7403d556c1f (from 49ecebb23384e752342b148d70be00dc4eb9eca8)
Author: Ken VanDine <ken at vandine.org>
Date:   Wed Aug 29 16:26:12 2007 -0400

    Disable what isn't implemented yet

diff --git a/src/pk-task-conary.c b/src/pk-task-conary.c
index 816375b..8a9ffbc 100644
--- a/src/pk-task-conary.c
+++ b/src/pk-task-conary.c
@@ -65,18 +65,18 @@ gchar *
 pk_task_get_actions (void)
 {
 	gchar *actions;
-	actions = pk_task_action_build (PK_TASK_ACTION_INSTALL,
-				        PK_TASK_ACTION_REMOVE,
-				        PK_TASK_ACTION_UPDATE,
+	actions = pk_task_action_build (/*PK_TASK_ACTION_INSTALL,*/
+/*				        PK_TASK_ACTION_REMOVE,*/
+/*				        PK_TASK_ACTION_UPDATE,*/
 				        PK_TASK_ACTION_GET_UPDATES,
 				        PK_TASK_ACTION_REFRESH_CACHE,
-				        PK_TASK_ACTION_UPDATE_SYSTEM,
+/*				        PK_TASK_ACTION_UPDATE_SYSTEM,*/
 				        PK_TASK_ACTION_SEARCH_NAME,
-				        PK_TASK_ACTION_SEARCH_DETAILS,
-				        PK_TASK_ACTION_SEARCH_GROUP,
-				        PK_TASK_ACTION_SEARCH_FILE,
-				        PK_TASK_ACTION_GET_DEPS,
-				        PK_TASK_ACTION_GET_DESCRIPTION,
+/*				        PK_TASK_ACTION_SEARCH_DETAILS,*/
+/*				        PK_TASK_ACTION_SEARCH_GROUP,*/
+/*				        PK_TASK_ACTION_SEARCH_FILE,*/
+/*				        PK_TASK_ACTION_GET_DEPS,*/
+/*				        PK_TASK_ACTION_GET_DESCRIPTION,*/
 				        0);
 	return actions;
 }
diff-tree 49ecebb23384e752342b148d70be00dc4eb9eca8 (from 4f545bced45da6c06392244dc465fbc57b9e386a)
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Aug 29 19:37:28 2007 +0100

    support more than 4 actions

diff --git a/libpackagekit/pk-task-utils.c b/libpackagekit/pk-task-utils.c
index 03fc198..12948a7 100644
--- a/libpackagekit/pk-task-utils.c
+++ b/libpackagekit/pk-task-utils.c
@@ -457,7 +457,7 @@ pk_task_action_contains (const gchar *ac
 	guint ret = FALSE;
 
 	/* split by delimeter ';' */
-	sections = g_strsplit (actions, ";", 4);
+	sections = g_strsplit (actions, ";", 0);
 
 	for (i=0; sections[i]; i++) {
 		if (pk_task_action_from_text (sections[i]) == action) {



More information about the PackageKit mailing list