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

Richard Hughes hughsient at kemper.freedesktop.org
Sun Oct 14 04:04:02 PDT 2007


 TODO            |    5 -----
 src/pk-engine.c |   25 +++++++++++++------------
 2 files changed, 13 insertions(+), 17 deletions(-)

New commits:
commit 7335f142b4c1c66645001df7f9b302e427b5f681
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Oct 14 12:02:32 2007 +0100

    update TODO

diff --git a/TODO b/TODO
index 3ae6fbc..d8124be 100644
--- a/TODO
+++ b/TODO
@@ -3,11 +3,6 @@ Order of no particular importance:
 *** Add new callback for status ***
 TimeRemaining()
 
-*** the backends will have repo controls ***
-Connect up pk-repo to actually get the data
-If pk-repo can't get repos, then display a message and quit
-If repos can't be enabled then grey out check boxes
-
 *** Prepare download to refresh system ***
 Either use a flag or a new method. I'm not sure which yet.
 
commit 84d085635a2a4603c1aacec1ddbe28caad569526
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Oct 14 11:47:47 2007 +0100

    do the cache invalidation _after_ the enable repo has finsihed

diff --git a/src/pk-engine.c b/src/pk-engine.c
index d00fe52..5460922 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -522,6 +522,19 @@ pk_engine_finished_cb (PkBackend *backend, PkExitEnum exit, PkEngine *engine)
 		}
 	}
 
+	/* this has to be done as different repos might have different updates */
+	if (role == PK_ROLE_ENUM_REPO_ENABLE ||
+	    role == PK_ROLE_ENUM_REPO_SET_DATA) {
+		if (engine->priv->updates_cache != NULL) {
+			pk_debug ("unreffing updates cache as we have just enabled/disabled a repo");
+			g_object_unref (engine->priv->updates_cache);
+			engine->priv->updates_cache = NULL;
+		}
+		/* this should cause the client program to requeue an update */
+		pk_debug ("emitting updates-changed tid: %s", item->tid);
+		g_signal_emit (engine, signals [PK_ENGINE_UPDATES_CHANGED], 0, item->tid);
+	}
+
 	/* find the length of time we have been running */
 	time = pk_backend_get_runtime (backend);
 
@@ -1794,18 +1807,6 @@ void
 pk_engine_repo_enable (PkEngine *engine, const gchar *tid, const gchar *repo_id, gboolean enabled,
 		       DBusGMethodInvocation *context, GError **dead_error)
 {
-#if 0
-xxx	has to be done when finished!
-	/* this has to be done as different repos might have different updates */
-	if (engine->priv->updates_cache != NULL) {
-		pk_debug ("unreffing updates cache as we have just enabled/disabled a repo");
-		g_object_unref (engine->priv->updates_cache);
-		engine->priv->updates_cache = NULL;
-	}
-		/* this should cause the client program to requeue an update */
-		pk_debug ("emitting updates-changed tid: %s", tid);
-		g_signal_emit (engine, signals [PK_ENGINE_UPDATES_CHANGED], 0, tid);
-#endif
 	gboolean ret;
 	PkTransactionItem *item;
 	GError *error;



More information about the PackageKit mailing list