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

Richard Hughes hughsient at kemper.freedesktop.org
Fri Sep 7 12:38:29 PDT 2007


 Makefile.am             |    1 
 TODO                    |   80 +++++++++++++++++++++++++++++++++++-------------
 configure.ac            |    2 +
 etc/.gitignore          |    4 ++
 etc/Makefile.am         |   13 +++++++
 etc/PackageKit.conf.in  |   18 ++++++++++
 libpackagekit/pk-enum.c |   12 +++----
 7 files changed, 103 insertions(+), 27 deletions(-)

New commits:
diff-tree a6523dedb467c945e5ac1189c658908c66fc80de (from 61746619adf032fb0282b21323d686a241f6c3f6)
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Sep 7 20:37:52 2007 +0100

    Revert "The box backend is too fast :)"
    
    This reverts commit 1219474cb4e276114744fc05ee744572998cef51.

diff --git a/src/pk-engine.c b/src/pk-engine.c
index 611e156..343db08 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -666,7 +666,6 @@ pk_engine_refresh_cache (PkEngine *engin
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_refresh_cache (task, force);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -674,6 +673,7 @@ pk_engine_refresh_cache (PkEngine *engin
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -699,7 +699,6 @@ pk_engine_get_updates (PkEngine *engine,
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_get_updates (task);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -707,6 +706,7 @@ pk_engine_get_updates (PkEngine *engine,
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -797,7 +797,6 @@ pk_engine_search_name (PkEngine *engine,
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_search_name (task, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -805,6 +804,7 @@ pk_engine_search_name (PkEngine *engine,
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -843,7 +843,6 @@ pk_engine_search_details (PkEngine *engi
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_search_details (task, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -851,6 +850,7 @@ pk_engine_search_details (PkEngine *engi
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -889,7 +889,6 @@ pk_engine_search_group (PkEngine *engine
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_search_group (task, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -897,6 +896,7 @@ pk_engine_search_group (PkEngine *engine
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -935,7 +935,6 @@ pk_engine_search_file (PkEngine *engine,
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_search_file (task, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -943,6 +942,7 @@ pk_engine_search_file (PkEngine *engine,
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -977,7 +977,6 @@ pk_engine_get_depends (PkEngine *engine,
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_get_depends (task, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -985,6 +984,7 @@ pk_engine_get_depends (PkEngine *engine,
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -1019,7 +1019,6 @@ pk_engine_get_requires (PkEngine *engine
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_get_requires (task, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1027,6 +1026,7 @@ pk_engine_get_requires (PkEngine *engine
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -1053,7 +1053,6 @@ pk_engine_get_description (PkEngine *eng
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_get_description (task, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1061,6 +1060,7 @@ pk_engine_get_description (PkEngine *eng
 		g_object_unref (task);
 		return FALSE;
 	}
+	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -1111,7 +1111,6 @@ pk_engine_update_system (PkEngine *engin
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_update_system (task);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1120,6 +1119,7 @@ pk_engine_update_system (PkEngine *engin
 		dbus_g_method_return_error (context, error);
 		return;
 	}
+	pk_engine_add_task (engine, task);
 
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
@@ -1162,7 +1162,6 @@ pk_engine_remove_package (PkEngine *engi
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_remove_package (task, package_id, allow_deps);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1171,6 +1170,7 @@ pk_engine_remove_package (PkEngine *engi
 		dbus_g_method_return_error (context, error);
 		return;
 	}
+	pk_engine_add_task (engine, task);
 
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
@@ -1215,7 +1215,6 @@ pk_engine_install_package (PkEngine *eng
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_install_package (task, package_id);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1224,6 +1223,7 @@ pk_engine_install_package (PkEngine *eng
 		dbus_g_method_return_error (context, error);
 		return;
 	}
+	pk_engine_add_task (engine, task);
 
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
@@ -1268,7 +1268,6 @@ pk_engine_update_package (PkEngine *engi
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
-	pk_engine_add_task (engine, task);
 	ret = pk_backend_update_package (task, package_id);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1277,6 +1276,7 @@ pk_engine_update_package (PkEngine *engi
 		dbus_g_method_return_error (context, error);
 		return;
 	}
+	pk_engine_add_task (engine, task);
 
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
diff-tree 61746619adf032fb0282b21323d686a241f6c3f6 (from 967472b6e865b8bc9df7641b2372cab40cdc094d)
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Sep 7 20:37:37 2007 +0100

    add a config file

diff --git a/Makefile.am b/Makefile.am
index 4cae20d..3ac4952 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
 SUBDIRS = 			\
 	policy			\
+	etc			\
 	man			\
 	data			\
 	libselftest		\
diff --git a/TODO b/TODO
index 2107fa9..e9d5e81 100644
--- a/TODO
+++ b/TODO
@@ -4,6 +4,12 @@ Order of no particular importance:
 Jobs need to be queued so that read only jobs can be done in parallel,
 but write jobs are done in serial. Maybe spawn each task and put it into a
 paused state?
+NOTE: RELEASE BLOCKER
+
+*** Write some XML documentation ***
+The backends/README file is woefully inadaquate for backend writers or even
+people who just want to know how PK works.
+NOTE: RELEASE BLOCKER
 
 *** Add a way to import GPG keys ***
 In fedora, if you add a signed repo you have to agree to the GPG key.
@@ -47,6 +53,7 @@ string update_text
 
 *** Have to have an UpdatesChanged signal ***
 For the icon to update after we've done a system upgrade
+NOTE: RELEASE BLOCKER
 
 *** Have to load parameters from a conf file ***
   - autoshutdown-timeout
diff --git a/configure.ac b/configure.ac
index c4d5da9..620573c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -305,6 +305,7 @@ if test x$with_backend = xbox; then
 	AC_SUBST(BOX_LIBS)
 fi
 
+AC_SUBST(PK_CONF_DIR, "\$(sysconfdir)/PackageKit")
 AC_SUBST(PK_PLUGIN_DIR, "\$(libdir)/packagekit-backend")
 AC_SUBST(PK_PLUGIN_CFLAGS, "-I\$(top_srcdir)/src -I\$(top_srcdir)/libpackagekit $GLIB_CFLAGS $DBUS_CFLAGS $GMODULE_CFLAGS")
 AC_SUBST(PK_PLUGIN_LIBS, "$GLIB_LIBS $DBUS_LIBS $GMODULE_LIBS")
@@ -322,6 +323,7 @@ dnl ------------------------------------
 AC_OUTPUT([
 packagekit.pc
 Makefile
+etc/Makefile
 man/Makefile
 backends/Makefile
 backends/apt/Makefile
diff --git a/etc/.gitignore b/etc/.gitignore
new file mode 100644
index 0000000..3475160
--- /dev/null
+++ b/etc/.gitignore
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+PackageKit.conf
+
diff --git a/etc/Makefile.am b/etc/Makefile.am
new file mode 100644
index 0000000..ba80a91
--- /dev/null
+++ b/etc/Makefile.am
@@ -0,0 +1,13 @@
+NULL =
+
+confdir = $(PK_CONF_DIR)
+conf_in_files = PackageKit.conf.in
+conf_DATA = $(conf_in_files:.conf.in=.conf)
+
+$(conf_DATA): $(conf_in_files) Makefile
+	@sed -e "s|\@defaultbackend\@|BACKEND_PREFIX|" $< > $@
+
+EXTRA_DIST =						\
+	$(conf_in_files)				\
+	$(NULL)
+
diff --git a/etc/PackageKit.conf.in b/etc/PackageKit.conf.in
new file mode 100644
index 0000000..f7051e6
--- /dev/null
+++ b/etc/PackageKit.conf.in
@@ -0,0 +1,18 @@
+# Only the system administrator should modify this file, ordinary users
+# should not have to change anything.
+
+[Daemon]
+
+# Log transactions to the database
+# default=yes
+TransactionLogging=yes
+
+# Shut down the daemon after this many seconds idle. 0 means don't shutdown.
+# default=60
+ShutdownTimeout=60
+
+# Default backend, as chosen in the configure script. This will be used where
+# no --backend="foo" option is given to the daemon.
+# default=@defaultbackend@
+DefaultBackend=@defaultbackend@
+
diff-tree 967472b6e865b8bc9df7641b2372cab40cdc094d (from parents)
Merge: 1219474cb4e276114744fc05ee744572998cef51 fe402d5524586a7c090fb795638cd1789085ae17
Author: Grzegorz Dabrowski <gdx at o2.pl>
Date:   Fri Sep 7 20:33:26 2007 +0000

    Merge branch 'master' of ssh://kaliber@hughsient.no-ip.org/srv/git/PackageKit

diff-tree 1219474cb4e276114744fc05ee744572998cef51 (from c3d3c7a0d46504ac6d5619a0373ef8e362310d8e)
Author: Grzegorz Dabrowski <gdx at o2.pl>
Date:   Fri Sep 7 20:32:49 2007 +0000

    The box backend is too fast :)
    Call pk_engine_add_task before real function from backend (e.g. pk_backend_search_name),
    because callback may be called before pk_engine_add_task.

diff --git a/src/pk-engine.c b/src/pk-engine.c
index 343db08..611e156 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -666,6 +666,7 @@ pk_engine_refresh_cache (PkEngine *engin
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_refresh_cache (task, force);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -673,7 +674,6 @@ pk_engine_refresh_cache (PkEngine *engin
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -699,6 +699,7 @@ pk_engine_get_updates (PkEngine *engine,
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_get_updates (task);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -706,7 +707,6 @@ pk_engine_get_updates (PkEngine *engine,
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -797,6 +797,7 @@ pk_engine_search_name (PkEngine *engine,
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_search_name (task, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -804,7 +805,6 @@ pk_engine_search_name (PkEngine *engine,
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -843,6 +843,7 @@ pk_engine_search_details (PkEngine *engi
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_search_details (task, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -850,7 +851,6 @@ pk_engine_search_details (PkEngine *engi
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -889,6 +889,7 @@ pk_engine_search_group (PkEngine *engine
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_search_group (task, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -896,7 +897,6 @@ pk_engine_search_group (PkEngine *engine
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -935,6 +935,7 @@ pk_engine_search_file (PkEngine *engine,
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_search_file (task, filter, search);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -942,7 +943,6 @@ pk_engine_search_file (PkEngine *engine,
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -977,6 +977,7 @@ pk_engine_get_depends (PkEngine *engine,
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_get_depends (task, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -984,7 +985,6 @@ pk_engine_get_depends (PkEngine *engine,
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -1019,6 +1019,7 @@ pk_engine_get_requires (PkEngine *engine
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_get_requires (task, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1026,7 +1027,6 @@ pk_engine_get_requires (PkEngine *engine
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -1053,6 +1053,7 @@ pk_engine_get_description (PkEngine *eng
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_get_description (task, package_id);
 	if (ret == FALSE) {
 		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1060,7 +1061,6 @@ pk_engine_get_description (PkEngine *eng
 		g_object_unref (task);
 		return FALSE;
 	}
-	pk_engine_add_task (engine, task);
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
 		pk_warning ("could not find task");
@@ -1111,6 +1111,7 @@ pk_engine_update_system (PkEngine *engin
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_update_system (task);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1119,7 +1120,6 @@ pk_engine_update_system (PkEngine *engin
 		dbus_g_method_return_error (context, error);
 		return;
 	}
-	pk_engine_add_task (engine, task);
 
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
@@ -1162,6 +1162,7 @@ pk_engine_remove_package (PkEngine *engi
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_remove_package (task, package_id, allow_deps);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1170,7 +1171,6 @@ pk_engine_remove_package (PkEngine *engi
 		dbus_g_method_return_error (context, error);
 		return;
 	}
-	pk_engine_add_task (engine, task);
 
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
@@ -1215,6 +1215,7 @@ pk_engine_install_package (PkEngine *eng
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_install_package (task, package_id);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1223,7 +1224,6 @@ pk_engine_install_package (PkEngine *eng
 		dbus_g_method_return_error (context, error);
 		return;
 	}
-	pk_engine_add_task (engine, task);
 
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
@@ -1268,6 +1268,7 @@ pk_engine_update_package (PkEngine *engi
 
 	/* create a new task and start it */
 	task = pk_engine_new_task (engine);
+	pk_engine_add_task (engine, task);
 	ret = pk_backend_update_package (task, package_id);
 	if (ret == FALSE) {
 		error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_NOT_SUPPORTED,
@@ -1276,7 +1277,6 @@ pk_engine_update_package (PkEngine *engi
 		dbus_g_method_return_error (context, error);
 		return;
 	}
-	pk_engine_add_task (engine, task);
 
 	map = pk_get_map_from_task (engine, task);
 	if (map == NULL) {
diff-tree fe402d5524586a7c090fb795638cd1789085ae17 (from c3d3c7a0d46504ac6d5619a0373ef8e362310d8e)
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Sep 7 18:09:40 2007 +0100

    re-format the todo

diff --git a/TODO b/TODO
index fbbb22d..2107fa9 100644
--- a/TODO
+++ b/TODO
@@ -1,20 +1,42 @@
 Order of no particular importance:
 
-Core:
-* Add a queing API
-* Add a way to import GPG keys
-* Split up PolicyKit install into different types
-* Add files in package into Description signal
-* Add package size into description signal
-* Valgrind everything
-* Add GetPercentage and GetSubPercentage for coldplugging
-* Add a Launch() method to startup when pk-application is launched
-* task_client has to return GError
-* Add logging so we can see what was installed/removed and when
-* Add "when installed" data into description
-* Add "installed by 'Richard Hughes'" data into description
-* package_di,installed_by, when_installed into sqlite database
-* Add GetUpdateDetail(s=package_id)
+*** Add a queing API ***
+Jobs need to be queued so that read only jobs can be done in parallel,
+but write jobs are done in serial. Maybe spawn each task and put it into a
+paused state?
+
+*** Add a way to import GPG keys ***
+In fedora, if you add a signed repo you have to agree to the GPG key.
+
+*** 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.
+
+*** Valgrind everything ***
+We leak memory like there is no tommorrow.
+
+*** Add GetPercentage and GetSubPercentage for coldplugging ***
+We need this for the PkWatch code.
+
+*** task_client has to return GError ***
+Client programs using libpackagekit should know the error, rather than just
+"it failed"
+
+*** Add logging so we can see what was installed/removed and when ***
+Depends on transaction_id and sqlite integration.
+
+*** Add "when installed" and "installed by" data into UI ***
+Is this useful?
+We would need to store package_id,installed_by,when_installed in a sqlite database
+
+*** Add GetUpdateDetail
+GetUpdateDetail(s=package_id)
 UpdateDetail(
 string url
 string restart_enum
@@ -22,14 +44,23 @@ string updates
 string obsoletes
 string update_text
 }
-* Have to have an UpdatesChanged signal for the icon to update after we've done
-  a system upgrade
-* Have to load parameters from a conf file:
+
+*** Have to have an UpdatesChanged signal ***
+For the icon to update after we've done a system upgrade
+
+*** Have to load parameters from a conf file ***
   - autoshutdown-timeout
   - default-backend
   - logging-detail
 
-Backends:
-* Complete conary backend
-* Dummy backend should use subpercent and install deps
+*** Dummy backend should use subpercent and install deps ***
+It's not a great test case right now...
+
+*** Handle rollbacks for select backends ***
+To do rollbacks sanely in PK we need a few things:
+ * convert the job into a transaction_id
+ * save the transaction_id's and descriptions to a database
+ * add a method to get the transaction_id's in the last x transactions
+ * write an application that can see the description of the transactions
+ * use an new method to handle the rollbacks and pass it to the backend
 
diff --git a/libpackagekit/pk-enum.c b/libpackagekit/pk-enum.c
index 32098b4..a739917 100644
--- a/libpackagekit/pk-enum.c
+++ b/libpackagekit/pk-enum.c
@@ -67,13 +67,13 @@ static PkTaskEnumMatch task_role[] = {
 };
 
 static PkTaskEnumMatch task_error[] = {
-	{PK_ERROR_ENUM_UNKNOWN,		"unknown"},	/* fall though value */
-	{PK_ERROR_ENUM_OOM,		"out-of-memory"},
+	{PK_ERROR_ENUM_UNKNOWN,			"unknown"},	/* fall though value */
+	{PK_ERROR_ENUM_OOM,			"out-of-memory"},
 	{PK_ERROR_ENUM_NO_NETWORK,		"no-network"},
-	{PK_ERROR_ENUM_NOT_SUPPORTED,	"not-supported"},
-	{PK_ERROR_ENUM_INTERNAL_ERROR,	"internal-error"},
-	{PK_ERROR_ENUM_GPG_FAILURE,	"gpg-failure"},
-	{PK_ERROR_ENUM_FILTER_INVALID,	"filter-invalid"},
+	{PK_ERROR_ENUM_NOT_SUPPORTED,		"not-supported"},
+	{PK_ERROR_ENUM_INTERNAL_ERROR,		"internal-error"},
+	{PK_ERROR_ENUM_GPG_FAILURE,		"gpg-failure"},
+	{PK_ERROR_ENUM_FILTER_INVALID,		"filter-invalid"},
 	{PK_ERROR_ENUM_PACKAGE_ID_INVALID,	"package-id-invalid"},
 	{PK_ERROR_ENUM_TRANSACTION_ERROR,	"transaction-error"},
 	{PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED,	"package-not-installed"},



More information about the PackageKit mailing list