[packagekit] packagekit: Branch 'master' - 3 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Sun Oct 7 14:09:48 PDT 2007
TODO | 1 -
src/pk-engine.c | 12 ++++++++++++
src/pk-spawn.c | 5 +++--
3 files changed, 15 insertions(+), 3 deletions(-)
New commits:
diff-tree 6262e85f79900e02cb37909c50d473b020c8a7ac (from 3dc6f8e1255385f3b61d0c6e20bf798e25c1eeaf)
Author: Richard Hughes <richard at hughsie.com>
Date: Sun Oct 7 21:55:56 2007 +0100
check the backends are not emitting installed when it should be emmiting installing
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 8f658b3..d3a0e31 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -270,6 +270,7 @@ static void
pk_engine_package_cb (PkBackend *backend, PkInfoEnum info, const gchar *package_id, const gchar *summary, PkEngine *engine)
{
PkTransactionItem *item;
+ PkRoleEnum role;
const gchar *info_text;
gboolean ret;
@@ -291,6 +292,17 @@ pk_engine_package_cb (PkBackend *backend
/* add to package cache */
pk_package_list_add (item->package_list, info, package_id, summary);
+ /* check the backend is doing the right thing */
+ pk_backend_get_role (item->backend, &role, NULL);
+ if (role == PK_ROLE_ENUM_UPDATE_SYSTEM ||
+ role == PK_ROLE_ENUM_INSTALL_PACKAGE ||
+ role == PK_ROLE_ENUM_UPDATE_PACKAGE) {
+ if (info == PK_INFO_ENUM_INSTALLED) {
+ pk_error ("backend emitted 'installed' rather than 'installing' "
+ "- you need to do the package *before* you do the action");
+ }
+ }
+
info_text = pk_info_enum_to_text (info);
pk_debug ("emitting package tid:%s info=%s %s, %s", item->tid, info_text, package_id, summary);
g_signal_emit (engine, signals [PK_ENGINE_PACKAGE], 0, item->tid, info_text, package_id, summary);
diff-tree 3dc6f8e1255385f3b61d0c6e20bf798e25c1eeaf (from fe2c149880c6303e65cc2a875436732b6d8100fa)
Author: Ken VanDine <ken at vandine.org>
Date: Sun Oct 7 14:44:26 2007 -0400
Removed a blocker from the list, it is done
diff --git a/TODO b/TODO
index 294c4e7..86da67d 100644
--- a/TODO
+++ b/TODO
@@ -7,7 +7,6 @@ NOTE: RELEASE BLOCKER
*** pk-update-icon (client) ***
-* When updates are available, the menu for the icon should say "Show updates" instead of "Software Update Viewer"
* Don't re-run get-updates when selecting "Show updates" from the update icon, just populate it with the previous results.
NOTE: RELEASE BLOCKER
diff-tree fe2c149880c6303e65cc2a875436732b6d8100fa (from 3e0038355bfeb267b8afd2b401c08c675575e85f)
Author: Richard Hughes <richard at hughsie.com>
Date: Sun Oct 7 18:16:30 2007 +0100
use a 100ms not a 250ms spawn check interval
diff --git a/src/pk-spawn.c b/src/pk-spawn.c
index 7901e38..d3561b1 100644
--- a/src/pk-spawn.c
+++ b/src/pk-spawn.c
@@ -50,6 +50,7 @@ static void pk_spawn_init (PkSpawn
static void pk_spawn_finalize (GObject *object);
#define PK_SPAWN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_SPAWN, PkSpawnPrivate))
+#define PK_SPAWN_POLL_DELAY 100 /* ms */
struct PkSpawnPrivate
{
@@ -236,8 +237,8 @@ pk_spawn_command (PkSpawn *spawn, const
fcntl (spawn->priv->stdout_fd, F_SETFL, O_NONBLOCK);
fcntl (spawn->priv->stderr_fd, F_SETFL, O_NONBLOCK);
- /* poll every 250ms */
- g_timeout_add (250, (GSourceFunc) pk_spawn_check_child, spawn);
+ /* poll every quickly */
+ g_timeout_add (PK_SPAWN_POLL_DELAY, (GSourceFunc) pk_spawn_check_child, spawn);
return TRUE;
}
More information about the PackageKit
mailing list