[PackageKit-commit] packagekit: Branch 'master' - 28 commits

Richard Hughes hughsient at kemper.freedesktop.org
Wed Dec 24 09:11:54 PST 2008


 backends/alpm/Makefile.am                      |    2 
 backends/apt.deprecated/Makefile.am            |    2 
 backends/apt/Makefile.am                       |    2 
 backends/box/Makefile.am                       |    2 
 backends/conary/Makefile.am                    |    2 
 backends/dummy/Makefile.am                     |    2 
 backends/opkg/Makefile.am                      |    2 
 backends/pisi/Makefile.am                      |    2 
 backends/pisi/pk-backend-pisi.c                |    2 
 backends/poldek/Makefile.am                    |    2 
 backends/razor/Makefile.am                     |    2 
 backends/smart/Makefile.am                     |    2 
 backends/smart/pk-backend-smart.c              |    4 
 backends/test/Makefile.am                      |   12 -
 backends/test/pk-backend-test-succeed.c        |    2 
 backends/urpmi/Makefile.am                     |    2 
 backends/urpmi/pk-backend-urpmi.c              |    2 
 backends/yum/Makefile.am                       |    2 
 backends/yum/pk-backend-yum.c                  |    9 -
 backends/zypp/Makefile.am                      |    2 
 client/Makefile.am                             |   12 +
 client/pk-console.c                            |   44 +++----
 client/pk-generate-pack.c                      |    6 
 client/pk-tools-common.c                       |    2 
 configure.ac                                   |   48 ++++++-
 contrib/browser-plugin/Makefile.am             |    1 
 contrib/command-not-found/Makefile.am          |    4 
 contrib/gstreamer-plugin/Makefile.am           |    4 
 contrib/gtk-module/Makefile.am                 |    2 
 contrib/ruck/src/Makefile.am                   |    1 
 contrib/ruck/src/rucklocks.py                  |   67 ----------
 contrib/ruck/src/ruckpackagecmds.py            |    8 -
 docs/api/Makefile.am                           |    1 
 docs/html/img/gpk-client-mime-type.png         |binary
 docs/html/img/gpk-log.png                      |binary
 lib/packagekit-glib/Makefile.am                |    4 
 lib/packagekit-glib/egg-debug.h                |    2 
 lib/packagekit-glib/pk-bitfield.c              |    2 
 lib/packagekit-glib/pk-catalog.c               |    2 
 lib/packagekit-glib/pk-client.c                |   14 --
 lib/packagekit-glib/pk-client.h                |    3 
 lib/packagekit-glib/pk-common.c                |   85 +------------
 lib/packagekit-glib/pk-common.h                |    3 
 lib/packagekit-glib/pk-control.c               |    2 
 lib/packagekit-glib/pk-desktop.c               |    2 
 lib/packagekit-glib/pk-enum.c                  |    8 -
 lib/packagekit-glib/pk-obj-list.c              |   12 -
 lib/packagekit-glib/pk-package-ids.c           |    4 
 lib/packagekit-glib/pk-package-list.c          |    2 
 lib/packagekit-glib/pk-task-list.c             |    6 
 lib/packagekit-qt/Makefile.am                  |    3 
 lib/packagekit-qt/README                       |   23 ---
 lib/packagekit-qt/src/CMakeLists.txt           |    1 
 lib/packagekit-qt/src/Makefile.am              |    7 -
 lib/packagekit-qt/src/polkitclient.cpp         |   21 +--
 lib/packagekit-qt/src/polkitclient.h           |    4 
 lib/packagekit-qt/src/polkitthread.cpp         |   58 ---------
 lib/packagekit-qt/src/polkitthread.h           |   24 ---
 src/Makefile.am                                |    4 
 src/egg-dbus-monitor.c                         |    2 
 src/org.freedesktop.PackageKit.Transaction.xml |    4 
 src/pk-backend-dbus.c                          |   10 -
 src/pk-backend-spawn.c                         |   10 -
 src/pk-backend.c                               |    6 
 src/pk-engine.c                                |    4 
 src/pk-file-monitor-gio.c                      |    2 
 src/pk-main.c                                  |    4 
 src/pk-network-nm.c                            |    2 
 src/pk-network-unix.c                          |    2 
 src/pk-network.c                               |    2 
 src/pk-post-trans.c                            |    2 
 src/pk-shared.c                                |    1 
 src/pk-spawn.c                                 |   16 +-
 src/pk-store.c                                 |    4 
 src/pk-time.c                                  |  156 ++++++++++++-------------
 src/pk-transaction-db.c                        |   25 ++--
 src/pk-transaction-id.c                        |    8 -
 src/pk-transaction-list.c                      |    8 -
 src/pk-transaction.c                           |   54 ++++----
 79 files changed, 333 insertions(+), 544 deletions(-)

New commits:
commit 6dc4dac050874799b03a82f39d9c71612a423358
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 24 16:31:24 2008 +0000

    bugfix: enable more compiler warnings on GCC, and stop abusing global CFLAGS in configure

diff --git a/backends/alpm/Makefile.am b/backends/alpm/Makefile.am
index 445d23c..6156218 100644
--- a/backends/alpm/Makefile.am
+++ b/backends/alpm/Makefile.am
@@ -3,5 +3,5 @@ plugin_LTLIBRARIES = libpk_backend_alpm.la
 libpk_backend_alpm_la_SOURCES = pk-backend-alpm.c
 libpk_backend_alpm_la_LIBADD = $(PK_PLUGIN_LIBS) -lalpm
 libpk_backend_alpm_la_LDFLAGS = -module -avoid-version
-libpk_backend_alpm_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_alpm_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
diff --git a/backends/apt.deprecated/Makefile.am b/backends/apt.deprecated/Makefile.am
index 07b4131..8262223 100644
--- a/backends/apt.deprecated/Makefile.am
+++ b/backends/apt.deprecated/Makefile.am
@@ -6,7 +6,7 @@ plugin_LTLIBRARIES = libpk_backend_apt.la
 
 libpk_backend_apt_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_apt_la_LDFLAGS = -module -avoid-version $(APT_LIBS)
-libpk_backend_apt_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(APT_CFLAGS)
+libpk_backend_apt_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(APT_CFLAGS) $(WARNINGFLAGS_CPP)
 libpk_backend_apt_la_CXXFLAGS = $(PK_PLUGIN_CFLAGS) $(APT_CFLAGS) -DPK_DB_DIR=\""$(PK_DB_DIR)"\"
 
 libpk_backend_apt_la_SOURCES =				\
diff --git a/backends/apt/Makefile.am b/backends/apt/Makefile.am
index 42c5197..6f390d4 100644
--- a/backends/apt/Makefile.am
+++ b/backends/apt/Makefile.am
@@ -5,7 +5,7 @@ plugin_LTLIBRARIES = libpk_backend_apt.la
 libpk_backend_apt_la_SOURCES = pk-backend-apt.c
 libpk_backend_apt_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_apt_la_LDFLAGS = -module -avoid-version
-libpk_backend_apt_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_apt_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 dbusinstancedir = $(LIBEXECDIR)
 dbusinstance_DATA =                                     \
diff --git a/backends/box/Makefile.am b/backends/box/Makefile.am
index 3096dae..38e335b 100644
--- a/backends/box/Makefile.am
+++ b/backends/box/Makefile.am
@@ -3,6 +3,6 @@ plugin_LTLIBRARIES = libpk_backend_box.la
 libpk_backend_box_la_SOURCES = pk-backend-box.c
 libpk_backend_box_la_LIBADD = $(PK_PLUGIN_LIBS) $(BOX_LIBS)
 libpk_backend_box_la_LDFLAGS = -module -avoid-version
-libpk_backend_box_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_box_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 libpk_backend_box_la_INCLUDES = $(BOX_CFLAGS)
 
diff --git a/backends/conary/Makefile.am b/backends/conary/Makefile.am
index 364c93f..400f706 100644
--- a/backends/conary/Makefile.am
+++ b/backends/conary/Makefile.am
@@ -12,7 +12,7 @@ plugin_LTLIBRARIES = libpk_backend_conary.la
 libpk_backend_conary_la_SOURCES = pk-backend-conary.c
 libpk_backend_conary_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_conary_la_LDFLAGS = -module -avoid-version
-libpk_backend_conary_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_conary_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 install-data-hook:
 	chmod a+rx $(DESTDIR)$(helperdir)/*.py
diff --git a/backends/dummy/Makefile.am b/backends/dummy/Makefile.am
index dc713fa..051cba0 100644
--- a/backends/dummy/Makefile.am
+++ b/backends/dummy/Makefile.am
@@ -3,5 +3,5 @@ plugin_LTLIBRARIES = libpk_backend_dummy.la
 libpk_backend_dummy_la_SOURCES = pk-backend-dummy.c
 libpk_backend_dummy_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_dummy_la_LDFLAGS = -module -avoid-version
-libpk_backend_dummy_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_dummy_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
diff --git a/backends/opkg/Makefile.am b/backends/opkg/Makefile.am
index ac05d44..f824316 100644
--- a/backends/opkg/Makefile.am
+++ b/backends/opkg/Makefile.am
@@ -4,5 +4,5 @@ libpk_backend_opkg_la_SOURCES = pk-backend-opkg.c
 libpk_backend_opkg_la_LIBADD = $(PK_PLUGIN_LIBS) $(OPKG_LIBS)
 
 libpk_backend_opkg_la_LDFLAGS = -module -avoid-version
-libpk_backend_opkg_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(OPKG_CFLAGS)
+libpk_backend_opkg_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(OPKG_CFLAGS) $(WARNINGFLAGS_C)
 
diff --git a/backends/pisi/Makefile.am b/backends/pisi/Makefile.am
index 1b49b3d..4ba597f 100644
--- a/backends/pisi/Makefile.am
+++ b/backends/pisi/Makefile.am
@@ -7,7 +7,7 @@ plugin_LTLIBRARIES = libpk_backend_pisi.la
 libpk_backend_pisi_la_SOURCES = pk-backend-pisi.c
 libpk_backend_pisi_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_pisi_la_LDFLAGS = -module -avoid-version
-libpk_backend_pisi_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_pisi_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 install-data-hook:
 	chmod a+rx $(DESTDIR)$(helperdir)/*.py
diff --git a/backends/poldek/Makefile.am b/backends/poldek/Makefile.am
index 5ea44ed..cf923bc 100644
--- a/backends/poldek/Makefile.am
+++ b/backends/poldek/Makefile.am
@@ -3,4 +3,4 @@ plugin_LTLIBRARIES = libpk_backend_poldek.la
 libpk_backend_poldek_la_SOURCES = pk-backend-poldek.c
 libpk_backend_poldek_la_LIBADD = $(PK_PLUGIN_LIBS) $(POLDEK_LIBS)
 libpk_backend_poldek_la_LDFLAGS = -module -avoid-version
-libpk_backend_poldek_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(POLDEK_CFLAGS)
+libpk_backend_poldek_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(POLDEK_CFLAGS) $(WARNINGFLAGS_C)
diff --git a/backends/razor/Makefile.am b/backends/razor/Makefile.am
index ff6d3ff..43112f9 100644
--- a/backends/razor/Makefile.am
+++ b/backends/razor/Makefile.am
@@ -4,5 +4,5 @@ libpk_backend_razor_la_SOURCES = pk-backend-razor.c
 libpk_backend_razor_la_LIBADD = $(PK_PLUGIN_LIBS) $(RAZOR_LIBS)
 
 libpk_backend_razor_la_LDFLAGS = -module -avoid-version
-libpk_backend_razor_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(RAZOR_CFLAGS)
+libpk_backend_razor_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(RAZOR_CFLAGS) $(WARNINGFLAGS_C)
 
diff --git a/backends/smart/Makefile.am b/backends/smart/Makefile.am
index edf67db..a5f8762 100644
--- a/backends/smart/Makefile.am
+++ b/backends/smart/Makefile.am
@@ -7,7 +7,7 @@ plugin_LTLIBRARIES = libpk_backend_smart.la
 libpk_backend_smart_la_SOURCES = pk-backend-smart.c
 libpk_backend_smart_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_smart_la_LDFLAGS = -module -avoid-version
-libpk_backend_smart_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_smart_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 install-data-hook:
 	chmod a+rx $(DESTDIR)$(helperdir)/*.py
diff --git a/backends/test/Makefile.am b/backends/test/Makefile.am
index 6879d45..04e97fa 100644
--- a/backends/test/Makefile.am
+++ b/backends/test/Makefile.am
@@ -11,30 +11,30 @@ plugin_LTLIBRARIES =			\
 libpk_backend_test_dbus_la_SOURCES = pk-backend-test-dbus.c
 libpk_backend_test_dbus_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_test_dbus_la_LDFLAGS = -module -avoid-version
-libpk_backend_test_dbus_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_test_dbus_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 libpk_backend_test_nop_la_SOURCES = pk-backend-test-nop.c
 libpk_backend_test_nop_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_test_nop_la_LDFLAGS = -module -avoid-version
-libpk_backend_test_nop_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_test_nop_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 libpk_backend_test_fail_la_SOURCES = pk-backend-test-fail.c
 libpk_backend_test_fail_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_test_fail_la_LDFLAGS = -module -avoid-version
-libpk_backend_test_fail_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_test_fail_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 libpk_backend_test_spawn_la_SOURCES = pk-backend-test-spawn.c
 libpk_backend_test_spawn_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_test_spawn_la_LDFLAGS = -module -avoid-version
-libpk_backend_test_spawn_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_test_spawn_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 libpk_backend_test_succeed_la_SOURCES = pk-backend-test-succeed.c
 libpk_backend_test_succeed_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_test_succeed_la_LDFLAGS = -module -avoid-version
-libpk_backend_test_succeed_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_test_succeed_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 libpk_backend_test_thread_la_SOURCES = pk-backend-test-thread.c
 libpk_backend_test_thread_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_test_thread_la_LDFLAGS = -module -avoid-version
-libpk_backend_test_thread_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_test_thread_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
diff --git a/backends/urpmi/Makefile.am b/backends/urpmi/Makefile.am
index 56743a1..4f2be2d 100644
--- a/backends/urpmi/Makefile.am
+++ b/backends/urpmi/Makefile.am
@@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libpk_backend_urpmi.la
 libpk_backend_urpmi_la_SOURCES = pk-backend-urpmi.c
 libpk_backend_urpmi_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_urpmi_la_LDFLAGS = -module -avoid-version
-libpk_backend_urpmi_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_urpmi_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 clean-local:
 	rm -f *.gcno
diff --git a/backends/yum/Makefile.am b/backends/yum/Makefile.am
index 9ba6386..5a42e58 100644
--- a/backends/yum/Makefile.am
+++ b/backends/yum/Makefile.am
@@ -9,7 +9,7 @@ plugin_LTLIBRARIES = libpk_backend_yum.la
 libpk_backend_yum_la_SOURCES = pk-backend-yum.c
 libpk_backend_yum_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_yum_la_LDFLAGS = -module -avoid-version
-libpk_backend_yum_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_yum_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
 
 install-data-hook:
 	chmod a+rx $(DESTDIR)$(helperdir)/*.py
diff --git a/backends/zypp/Makefile.am b/backends/zypp/Makefile.am
index 0de41d2..fabf1e6 100644
--- a/backends/zypp/Makefile.am
+++ b/backends/zypp/Makefile.am
@@ -6,7 +6,7 @@ libpk_backend_zypp_la_SOURCES =		\
 	zypp-utils.cpp
 libpk_backend_zypp_la_LIBADD = $(PK_PLUGIN_LIBS)
 libpk_backend_zypp_la_LDFLAGS = -module -avoid-version $(ZYPP_LIBS)
-libpk_backend_zypp_la_CFLAGS = $(PK_PLUGIN_CFLAGS)
+libpk_backend_zypp_la_CFLAGS = $(PK_PLUGIN_CFLAGS) $(WARNINGFLAGS_CPP)
 libpk_backend_zypp_la_CPPFLAGS = $(PK_PLUGIN_CFLAGS) $(ZYPP_CFLAGS) -Wno-deprecated
 
 EXTRA_DIST =		\
diff --git a/client/Makefile.am b/client/Makefile.am
index 45ae396..b6c644f 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -48,6 +48,10 @@ pkcon_LDADD =						\
 	$(PK_GLIB_LIBS)					\
 	$(NULL)
 
+pkcon_CFLAGS =						\
+	$(WARNINGFLAGS_C)				\
+	$(NULL)
+
 pkmon_SOURCES =						\
 	egg-debug.c					\
 	egg-debug.h					\
@@ -60,6 +64,10 @@ pkmon_LDADD =						\
 	$(PK_GLIB_LIBS)					\
 	$(NULL)
 
+pkmon_CFLAGS =						\
+	$(WARNINGFLAGS_C)				\
+	$(NULL)
+
 pkgenpack_SOURCES =					\
 	egg-debug.c					\
 	egg-debug.h					\
@@ -77,6 +85,10 @@ pkgenpack_LDADD = 					\
 	$(PK_GLIB_LIBS)					\
 	$(NULL)
 
+pkgenpack_CFLAGS =					\
+	$(WARNINGFLAGS_C)				\
+	$(NULL)
+
 if EGG_BUILD_TESTS
 
 check_PROGRAMS =					\
diff --git a/configure.ac b/configure.ac
index 5d5b7e5..5949fb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,15 +54,49 @@ AC_SUBST(PYTHON_PACKAGE_DIR)
 dnl ---------------------------------------------------------------------------
 dnl - Extra verbose warning switches
 dnl ---------------------------------------------------------------------------
+CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
+CPPFLAGS="$CPPFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
+CPPFLAGS="$CPPFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
+
 if test "$GCC" = "yes"; then
-	CPPFLAGS="$CPPFLAGS -Wcast-align -Wno-uninitialized"
-	CPPFLAGS="$CPPFLAGS -Wall -Wreturn-type"
-#	CPPFLAGS="$CPPFLAGS -Wformat-security"
-	CPPFLAGS="$CPPFLAGS -Werror"
-	CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
-	CPPFLAGS="$CPPFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
-	CPPFLAGS="$CPPFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
+	# work both in C and C++
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wall"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Werror"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wcast-align -Wno-uninitialized"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wmissing-declarations"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wredundant-decls"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wmissing-noreturn"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wpointer-arith"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wcast-align"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wwrite-strings"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Winit-self"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wreturn-type"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wformat-nonliteral"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wformat-security"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wmissing-include-dirs"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wmissing-format-attribute"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wclobbered"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wempty-body"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wignored-qualifiers"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wsign-compare"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wtype-limits"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wuninitialized"
+
+	# work only in C
+	WARNINGFLAGS_C="$WARNINGFLAGS_CPP"
+	WARNINGFLAGS_C="$WARNINGFLAGS_C -Waggregate-return"
+	WARNINGFLAGS_C="$WARNINGFLAGS_C -Wdeclaration-after-statement"
+	WARNINGFLAGS_C="$WARNINGFLAGS_C -Wshadow"
+	WARNINGFLAGS_C="$WARNINGFLAGS_C -Winline"
+	WARNINGFLAGS_C="$WARNINGFLAGS_C -Wswitch-enum"
+	WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-parameter-type"
+	WARNINGFLAGS_C="$WARNINGFLAGS_C -Woverride-init"
+else
+	WARNINGFLAGS_C=""
+	WARNINGFLAGS_CPP=""
 fi
+AC_SUBST(WARNINGFLAGS_C)
+AC_SUBST(WARNINGFLAGS_CPP)
 
 dnl ---------------------------------------------------------------------------
 dnl - gettext stuff
diff --git a/contrib/browser-plugin/Makefile.am b/contrib/browser-plugin/Makefile.am
index 40fdd09..7141a56 100644
--- a/contrib/browser-plugin/Makefile.am
+++ b/contrib/browser-plugin/Makefile.am
@@ -4,6 +4,7 @@ plugin_LTLIBRARIES = packagekit-plugin.la
 packagekit_plugin_la_LDFLAGS = -rpath $(plugindir) -module -avoid-version -no-undefined
 packagekit_plugin_la_CPPFLAGS =			\
 	$(PK_BROWSER_PLUGIN_CFLAGS)		\
+	$(WARNINGFLAGS_CPP)			\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"	\
 	-I$(top_srcdir)/lib			\
 	-I$(srcdir)/sdk
diff --git a/contrib/command-not-found/Makefile.am b/contrib/command-not-found/Makefile.am
index cf900b7..509f1e0 100644
--- a/contrib/command-not-found/Makefile.am
+++ b/contrib/command-not-found/Makefile.am
@@ -32,6 +32,10 @@ pk_command_not_found_LDADD =				\
 	$(PK_GLIB_LIBS)					\
 	$(NULL)
 
+pk_command_not_found_CFLAGS =				\
+	$(WARNINGFLAGS_C)				\
+	$(NULL)
+
 bashprofiledir = ${SYSCONFDIR}/profile.d
 dist_bashprofile_DATA = PackageKit.sh
 
diff --git a/contrib/gstreamer-plugin/Makefile.am b/contrib/gstreamer-plugin/Makefile.am
index fce0a4f..57e0025 100644
--- a/contrib/gstreamer-plugin/Makefile.am
+++ b/contrib/gstreamer-plugin/Makefile.am
@@ -28,6 +28,10 @@ pk_gstreamer_install_LDADD =				\
 	$(PK_GSTREAMER_PLUGIN_LIBS)			\
 	$(NULL)
 
+pk_gstreamer_install_CFLAGS =				\
+	$(WARNINGFLAGS_C)				\
+	$(NULL)
+
 clean-local:
 	rm -f *~
 
diff --git a/contrib/gtk-module/Makefile.am b/contrib/gtk-module/Makefile.am
index 7b98e1b..e18a935 100644
--- a/contrib/gtk-module/Makefile.am
+++ b/contrib/gtk-module/Makefile.am
@@ -6,7 +6,7 @@ module_LTLIBRARIES = libpk-gtk-module.la
 libpk_gtk_module_la_SOURCES = pk-gtk-module.c
 libpk_gtk_module_la_LIBADD = $(PK_GTK_MODULE_LIBS)
 libpk_gtk_module_la_LDFLAGS = -module -avoid-version
-libpk_gtk_module_la_CFLAGS = $(PK_GTK_MODULE_CFLAGS)
+libpk_gtk_module_la_CFLAGS = $(PK_GTK_MODULE_CFLAGS) $(WARNINGFLAGS_C)
 
 clean-local:
 	rm -f *~
diff --git a/lib/packagekit-glib/Makefile.am b/lib/packagekit-glib/Makefile.am
index 94ebd8b..5bc612d 100644
--- a/lib/packagekit-glib/Makefile.am
+++ b/lib/packagekit-glib/Makefile.am
@@ -114,6 +114,10 @@ libpackagekit_glib_la_LDFLAGS =					\
 	-export-symbols-regex '^pk_.*'				\
 	$(NULL)
 
+libpackagekit_glib_la_CFLAGS =					\
+	$(WARNINGFLAGS_C)					\
+	$(NULL)
+
 if EGG_BUILD_TESTS
 check_PROGRAMS =						\
 	pk-self-test
diff --git a/lib/packagekit-qt/src/Makefile.am b/lib/packagekit-qt/src/Makefile.am
index d6c386b..fa7e8ff 100644
--- a/lib/packagekit-qt/src/Makefile.am
+++ b/lib/packagekit-qt/src/Makefile.am
@@ -63,6 +63,10 @@ libpackagekit_qt_la_LIBADD =					\
 	$(POLKIT_LIBS)						\
 	$(NULL)
 
+libpackagekit_qt_la_CFLAGS =					\
+	$(WARNINGFLAGS_CPP)					\
+	$(NULL)
+
 libpackagekit_qt_la_LDFLAGS =					\
 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)	\
 	-export-dynamic						\
diff --git a/src/Makefile.am b/src/Makefile.am
index ee79123..eb68831 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -148,6 +148,10 @@ packagekitd_LDADD =					\
 	$(ARCHIVE_LIBS)					\
 	$(NULL)
 
+packagekitd_CFLAGS =					\
+	$(WARNINGFLAGS_C)				\
+	$(NULL)
+
 if BACKEND_TYPE_BOX
 packagekitd_INCLUDES =	 				\
 	$(BOX_CFLAGS)
commit 28c474dc53bc4756639319ec0493723b88f85c82
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 24 16:15:40 2008 +0000

    bugfix: fix a signed vs. unsigned problem when checking a PkBitfield

diff --git a/lib/packagekit-glib/pk-bitfield.c b/lib/packagekit-glib/pk-bitfield.c
index 009f429..fe5118d 100644
--- a/lib/packagekit-glib/pk-bitfield.c
+++ b/lib/packagekit-glib/pk-bitfield.c
@@ -53,7 +53,7 @@ pk_bitfield_contain_priority (PkBitfield values, gint value, ...)
 {
 	va_list args;
 	guint i;
-	guint value_temp;
+	gint value_temp;
 	gint retval = -1;
 
 	/* we must query at least one thing */
commit b2f6bf77fa5e7046648a515a72a61f1af5a0175a
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 24 16:14:47 2008 +0000

    trivial: __init can be marked static

diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index 89b5e25..81b12bd 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -4577,7 +4577,7 @@ pk_client_new (void)
  * privileges.
  */
 __attribute__ ((constructor))
-void init()
+static void init()
 {
 	/* this is a bandaid */
 	prctl (PR_SET_DUMPABLE, 0);
commit 122400729c60ee2c4c363ae545105d25ea346f2c
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 24 16:14:12 2008 +0000

    trivial: remove a compiler warning of declare before use in the backends

diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index 613ff79..71a96c6 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -205,8 +205,8 @@ static void
 backend_get_requires (PkBackend *backend, PkBitfield filters, gchar **package_ids, gboolean recursive)
 {
 	gchar *package_ids_temp;
-	package_ids_temp = pk_package_ids_to_text (package_ids);
 	gchar *filters_text;
+	package_ids_temp = pk_package_ids_to_text (package_ids);
 	filters_text = pk_filter_bitfield_to_text (filters);
 	pk_backend_spawn_helper (spawn, BACKEND("get-requires"), filters_text, package_ids_temp, pk_backend_bool_to_text (recursive), NULL);
 	g_free (filters_text);
diff --git a/backends/urpmi/pk-backend-urpmi.c b/backends/urpmi/pk-backend-urpmi.c
index 4b568ec..ded449c 100644
--- a/backends/urpmi/pk-backend-urpmi.c
+++ b/backends/urpmi/pk-backend-urpmi.c
@@ -269,8 +269,8 @@ static void
 backend_get_requires (PkBackend *backend, PkBitfield filters, gchar **package_ids, gboolean recursive)
 {
 	gchar *package_ids_temp;
-	package_ids_temp = pk_package_ids_to_text (package_ids);
 	gchar *filters_text;
+	package_ids_temp = pk_package_ids_to_text (package_ids);
 	filters_text = pk_filter_bitfield_to_text (filters);
 	pk_backend_spawn_helper (spawn, "urpmi-dispatched-backend.pl", "get-requires", filters_text, package_ids_temp, pk_backend_bool_to_text (recursive), NULL);
 	g_free (filters_text);
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index d5fa7c8..d7e8328 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -226,8 +226,8 @@ static void
 backend_get_requires (PkBackend *backend, PkBitfield filters, gchar **package_ids, gboolean recursive)
 {
 	gchar *package_ids_temp;
-	package_ids_temp = pk_package_ids_to_text (package_ids);
 	gchar *filters_text;
+	package_ids_temp = pk_package_ids_to_text (package_ids);
 	filters_text = pk_filter_bitfield_to_text (filters);
 	pk_backend_spawn_helper (spawn, "yumBackend.py", "get-requires", filters_text, package_ids_temp, pk_backend_bool_to_text (recursive), NULL);
 	g_free (filters_text);
commit 409ab7ee51e56786ce6effba14596b2a8777c31a
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 24 16:13:17 2008 +0000

    trivial: remove a compiler warning of declare before use and signed

diff --git a/client/pk-console.c b/client/pk-console.c
index 3a0cfe2..49d7dd7 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -383,7 +383,7 @@ pk_console_repo_detail_cb (PkClient *client, const gchar *repo_id,
 static gboolean
 pk_console_pulse_bar (PulseState *pulse_state)
 {
-	guint i;
+	gint i;
 
 	if (!has_output_bar)
 		return TRUE;
@@ -1421,6 +1421,7 @@ pk_console_files_cb (PkClient *client, const gchar *package_id,
 {
 	PkRoleEnum role;
 	gchar **filevector;
+	gchar **current_file;
 
 	/* don't print if we are DownloadPackages */
 	pk_client_get_role (client, &role, NULL, NULL);
@@ -1437,8 +1438,7 @@ pk_console_files_cb (PkClient *client, const gchar *package_id,
 	if (*filevector != NULL) {
 		/* TRANSLATORS: This a list files contained in the package */
 		g_print ("%s\n", _("Package files"));
-		gchar **current_file = filevector;
-
+		current_file = filevector;
 		while (*current_file != NULL) {
 			g_print ("  %s\n", *current_file);
 			current_file++;
@@ -1687,14 +1687,13 @@ main (int argc, char *argv[])
 	gchar *filter = NULL;
 	gchar *summary;
 	gchar **package_ids;
-	gboolean ret;
+	gboolean ret = FALSE;
 	const gchar *mode;
 	const gchar *value = NULL;
 	const gchar *details = NULL;
 	const gchar *parameter = NULL;
 	PkBitfield groups;
 	gchar *text;
-	ret = FALSE;
 	gboolean maybe_sync = TRUE;
 	PkBitfield filters = 0;
 
commit b7a546e973a6dff96a2b1cc5d24639c57aa2b543
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 24 16:12:42 2008 +0000

    bugfix: fix a signed vs. unsigned problem when checking the error of a spawned backend that is killed

diff --git a/src/pk-spawn.c b/src/pk-spawn.c
index 34b87b3..6e59a80 100644
--- a/src/pk-spawn.c
+++ b/src/pk-spawn.c
@@ -305,7 +305,7 @@ static gboolean
 pk_spawn_send_stdin (PkSpawn *spawn, const gchar *command)
 {
 	gint wrote;
-	guint length;
+	gint length;
 	gchar *buffer = NULL;
 	gboolean ret = TRUE;
 
commit afe7588d11be37a90454185860a3d5f3fed0ab86
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 24 16:11:50 2008 +0000

    trivial: remove a signed vs. unsigned warning on gcc

diff --git a/client/pk-tools-common.c b/client/pk-tools-common.c
index 310a90c..dc7d33f 100644
--- a/client/pk-tools-common.c
+++ b/client/pk-tools-common.c
@@ -152,7 +152,7 @@ pk_console_get_number (const gchar *question, guint maxnum)
 		retval = scanf("%u", &answer);
 
 		/* positive */
-		if (retval == 1 && answer > 0 && answer <= maxnum)
+		if (retval == 1 && answer > 0 && answer <= (gint) maxnum)
 			break;
 		g_print (_("Please enter a number from 1 to %i: "), maxnum);
 	} while (TRUE);
commit c3674c1972ad422bb3bad42e44300cd820dc5b55
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 16:55:23 2008 +0000

    trivial: fix the automake build due to polkitthread being removed

diff --git a/lib/packagekit-qt/Makefile.am b/lib/packagekit-qt/Makefile.am
index 96faeec..d7de443 100644
--- a/lib/packagekit-qt/Makefile.am
+++ b/lib/packagekit-qt/Makefile.am
@@ -2,6 +2,5 @@ SUBDIRS = modules src test
 
 EXTRA_DIST =						\
 	CMakeLists.txt					\
-	Doxyfile					\
-	README
+	Doxyfile
 
diff --git a/lib/packagekit-qt/src/Makefile.am b/lib/packagekit-qt/src/Makefile.am
index 00a0767..d6c386b 100644
--- a/lib/packagekit-qt/src/Makefile.am
+++ b/lib/packagekit-qt/src/Makefile.am
@@ -29,7 +29,6 @@ $(libpackagekit_qt_la_OBJECTS) :				\
 	daemonproxy.moc						\
 	package.moc						\
 	polkitclient.moc					\
-	polkitthread.moc					\
 	transaction.moc						\
 	transactionprivate.moc					\
 	transactionproxy.moc					\
@@ -54,8 +53,6 @@ libpackagekit_qt_la_SOURCES =					\
 	package.cpp						\
 	polkitclient.h						\
 	polkitclient.cpp					\
-	polkitthread.h						\
-	polkitthread.cpp					\
 	util.h							\
 	util.cpp						\
 	$(NULL)
commit 29d0f483cfb0fae21b4f02a85f98f3453502a793
Merge: 369edea... fbf993a...
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 14:22:11 2008 +0000

    Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit

commit 369edea505e3f5a9ff4dab933ad8651b75440637
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 14:21:26 2008 +0000

    trivial: rename all shadowed variables to fix compile using funky compilers when using -WError

diff --git a/client/pk-console.c b/client/pk-console.c
index b226c2d..3a0cfe2 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -467,7 +467,7 @@ pk_console_progress_changed_cb (PkClient *client, guint percentage, guint subper
  * pk_console_signature_finished_cb:
  **/
 static void
-pk_console_signature_finished_cb (PkClient *client_signature, PkExitEnum exit, guint runtime, gpointer data)
+pk_console_signature_finished_cb (PkClient *client, PkExitEnum exit_enum, guint runtime, gpointer data)
 {
 	gboolean ret;
 	GError *error = NULL;
@@ -485,7 +485,7 @@ pk_console_signature_finished_cb (PkClient *client_signature, PkExitEnum exit, g
  * pk_console_install_files_finished_cb:
  **/
 static void
-pk_console_install_files_finished_cb (PkClient *client_signature, PkExitEnum exit, guint runtime, gpointer data)
+pk_console_install_files_finished_cb (PkClient *client, PkExitEnum exit_enum, guint runtime, gpointer data)
 {
 	g_main_loop_quit (loop);
 }
@@ -494,11 +494,11 @@ pk_console_install_files_finished_cb (PkClient *client_signature, PkExitEnum exi
  * pk_console_finished_cb:
  **/
 static void
-pk_console_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, gpointer data)
+pk_console_finished_cb (PkClient *client, PkExitEnum exit_enum, guint runtime, gpointer data)
 {
 	PkRoleEnum role;
 	const gchar *role_text;
-	gfloat time;
+	gfloat time_s;
 	PkRestartEnum restart;
 
 	pk_client_get_role (client, &role, NULL, NULL);
@@ -512,12 +512,12 @@ pk_console_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, gpoint
 		g_source_remove (timer_id);
 
 	role_text = pk_role_enum_to_text (role);
-	time = (gfloat) runtime / 1000.0;
+	time_s = (gfloat) runtime / 1000.0;
 
 	/* do we need to new line? */
 	if (awaiting_space)
 		g_print ("\n");
-	egg_debug ("%s runtime was %.1f seconds", role_text, time);
+	egg_debug ("%s runtime was %.1f seconds", role_text, time_s);
 
 	/* is there any restart to notify the user? */
 	restart = pk_client_get_require_restart (client);
@@ -529,19 +529,19 @@ pk_console_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, gpoint
 		g_print ("%s\n", _("Please restart the application as it is being used."));
 
 	if (role == PK_ROLE_ENUM_INSTALL_FILES &&
-	    exit == PK_EXIT_ENUM_FAILED && need_requeue) {
+	    exit_enum == PK_EXIT_ENUM_FAILED && need_requeue) {
 		egg_warning ("waiting for second install file to finish");
 		return;
 	}
 
 	/* have we failed to install, and the gpg key is now installed */
-	if (exit == PK_EXIT_ENUM_KEY_REQUIRED && need_requeue) {
+	if (exit_enum == PK_EXIT_ENUM_KEY_REQUIRED && need_requeue) {
 		egg_debug ("key now installed");
 		return;
 	}
 
 	/* have we failed to install, and the eula key is now installed */
-	if (exit == PK_EXIT_ENUM_EULA_REQUIRED && need_requeue) {
+	if (exit_enum == PK_EXIT_ENUM_EULA_REQUIRED && need_requeue) {
 		egg_debug ("eula now agreed");
 		return;
 	}
@@ -748,7 +748,7 @@ pk_console_remove_packages (PkClient *client, gchar **packages, GError **error)
 	const PkPackageObj *obj;
 	guint i;
 	guint length;
-	gboolean remove;
+	gboolean remove_deps;
 	GPtrArray *array;
 	gchar **package_ids = NULL;
 	PkPackageList *list;
@@ -842,10 +842,10 @@ pk_console_remove_packages (PkClient *client, gchar **packages, GError **error)
 	}
 
 	/* TRANSLATORS: We are checking if it's okay to remove a list of packages */
-	remove = pk_console_get_prompt (_("Proceed removing additional packages?"), FALSE);
+	remove_deps = pk_console_get_prompt (_("Proceed removing additional packages?"), FALSE);
 
 	/* we chickened out */
-	if (!remove) {
+	if (!remove_deps) {
 		/* TRANSLATORS: We did not remove any packages */
 		g_print ("%s\n", _("The package removal was canceled!"));
 		ret = FALSE;
@@ -1603,7 +1603,7 @@ pk_console_sigint_handler (int sig)
  * pk_console_get_summary:
  **/
 static gchar *
-pk_console_get_summary (PkBitfield roles)
+pk_console_get_summary (void)
 {
 	GString *string;
 	string = g_string_new ("");
@@ -1739,7 +1739,7 @@ main (int argc, char *argv[])
 	/* we need the roles early, as we only show the user only what they can do */
 	control = pk_control_new ();
 	roles = pk_control_get_actions (control, NULL);
-	summary = pk_console_get_summary (roles);
+	summary = pk_console_get_summary ();
 
 	context = g_option_context_new ("PackageKit Console Program");
 	g_option_context_set_summary (context, summary) ;
@@ -1951,8 +1951,7 @@ main (int argc, char *argv[])
 
 	} else if (strcmp (mode, "get-time") == 0) {
 		PkRoleEnum role;
-		guint time;
-		gboolean ret;
+		guint time_ms;
 		if (value == NULL) {
 			error = g_error_new (1, 0, "%s", _("You need to specify an action, e.g. 'update-system'"));
 			goto out;
@@ -1962,12 +1961,12 @@ main (int argc, char *argv[])
 			error = g_error_new (1, 0, "%s", _("You need to specify a correct role"));
 			goto out;
 		}
-		ret = pk_control_get_time_since_action (control, role, &time, &error);
+		ret = pk_control_get_time_since_action (control, role, &time_ms, &error);
 		if (!ret) {
 			error = g_error_new (1, 0, "%s", _("Failed to get last time"));
 			goto out;
 		}
-		g_print ("time since %s is %is\n", value, time);
+		g_print ("time since %s is %is\n", value, time_ms);
 		maybe_sync = FALSE;
 
 	} else if (strcmp (mode, "get-depends") == 0) {
diff --git a/client/pk-generate-pack.c b/client/pk-generate-pack.c
index 55dbc5b..df040ee 100644
--- a/client/pk-generate-pack.c
+++ b/client/pk-generate-pack.c
@@ -93,7 +93,7 @@ out:
  * pk_generate_pack_package_cb:
  **/
 static void
-pk_generate_pack_package_cb (PkServicePack *pack, const PkPackageObj *obj, gpointer data)
+pk_generate_pack_package_cb (PkServicePack *pack_, const PkPackageObj *obj, gpointer data)
 {
 	g_return_if_fail (obj != NULL);
 	/* TRANSLATORS: This is the state of the transaction */
@@ -104,7 +104,7 @@ pk_generate_pack_package_cb (PkServicePack *pack, const PkPackageObj *obj, gpoin
  * pk_generate_pack_percentage_cb:
  **/
 static void
-pk_generate_pack_percentage_cb (PkServicePack *pack, guint percentage, gpointer data)
+pk_generate_pack_percentage_cb (PkServicePack *pack_, guint percentage, gpointer data)
 {
 	last_percentage = percentage;
 }
@@ -113,7 +113,7 @@ pk_generate_pack_percentage_cb (PkServicePack *pack, guint percentage, gpointer
  * pk_generate_pack_status_cb:
  **/
 static void
-pk_generate_pack_status_cb (PkServicePack *pack, PkServicePackStatus status, gpointer data)
+pk_generate_pack_status_cb (PkServicePack *pack_, PkServicePackStatus status, gpointer data)
 {
 	if (status == PK_SERVICE_PACK_STATUS_DOWNLOAD_PACKAGES) {
 		/* TRANSLATORS: This is when the main packages are being downloaded */
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index 4b7b755..89b5e25 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -509,7 +509,7 @@ pk_client_destroy_cb (DBusGProxy *proxy, PkClient *client)
 static void
 pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime, PkClient *client)
 {
-	PkExitEnum exit;
+	PkExitEnum exit_enum;
 
 	g_return_if_fail (PK_IS_CLIENT (client));
 
@@ -523,7 +523,7 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
 		client->priv->timeout_id = 0;
 	}
 
-	exit = pk_exit_enum_from_text (exit_text);
+	exit_enum = pk_exit_enum_from_text (exit_text);
 	egg_debug ("emit finished %s, %i", exit_text, runtime);
 
 	/* only this instance is finished, and do it before the signal so we can reset */
@@ -533,7 +533,7 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
 	 * in the ::Finished() handler */
 	client->priv->is_finishing = TRUE;
 
-	g_signal_emit (client, signals [PK_CLIENT_FINISHED], 0, exit, runtime);
+	g_signal_emit (client, signals [PK_CLIENT_FINISHED], 0, exit_enum, runtime);
 
 	/* done callback */
 	client->priv->is_finishing = FALSE;
diff --git a/lib/packagekit-glib/pk-common.c b/lib/packagekit-glib/pk-common.c
index eec603e..7af42d6 100644
--- a/lib/packagekit-glib/pk-common.c
+++ b/lib/packagekit-glib/pk-common.c
@@ -195,7 +195,7 @@ pk_iso8601_difference (const gchar *isodate)
 	GTimeVal timeval_then;
 	GTimeVal timeval_now;
 	gboolean ret;
-	guint time;
+	guint time_s;
 
 	g_return_val_if_fail (isodate != NULL, 0);
 
@@ -208,9 +208,9 @@ pk_iso8601_difference (const gchar *isodate)
 	g_get_current_time (&timeval_now);
 
 	/* work out difference */
-	time = timeval_now.tv_sec - timeval_then.tv_sec;
+	time_s = timeval_now.tv_sec - timeval_then.tv_sec;
 
-	return time;
+	return time_s;
 }
 
 /**
@@ -245,17 +245,17 @@ pk_iso8601_to_date (const gchar *iso_date)
 	gboolean ret;
 	guint retval;
 	guint d, m, y;
-	GTimeVal time;
+	GTimeVal time_val;
 	GDate *date = NULL;
 
 	if (egg_strzero (iso_date))
 		goto out;
 
 	/* try to parse complete ISO8601 date */
-	ret = g_time_val_from_iso8601 (iso_date, &time);
+	ret = g_time_val_from_iso8601 (iso_date, &time_val);
 	if (ret) {
 		date = g_date_new ();
-		g_date_set_time_val (date, &time);
+		g_date_set_time_val (date, &time_val);
 		goto out;
 	}
 
diff --git a/lib/packagekit-glib/pk-enum.c b/lib/packagekit-glib/pk-enum.c
index 92343e2..31b8763 100644
--- a/lib/packagekit-glib/pk-enum.c
+++ b/lib/packagekit-glib/pk-enum.c
@@ -636,9 +636,9 @@ pk_info_enum_to_text (PkInfoEnum info)
  * Return value: the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG
  */
 PkExitEnum
-pk_exit_enum_from_text (const gchar *exit)
+pk_exit_enum_from_text (const gchar *exit_text)
 {
-	return pk_enum_find_value (enum_exit, exit);
+	return pk_enum_find_value (enum_exit, exit_text);
 }
 
 /**
@@ -650,9 +650,9 @@ pk_exit_enum_from_text (const gchar *exit)
  * Return value: the enumerated constant value, e.g. "available"
  **/
 const gchar *
-pk_exit_enum_to_text (PkExitEnum exit)
+pk_exit_enum_to_text (PkExitEnum exit_enum)
 {
-	return pk_enum_find_string (enum_exit, exit);
+	return pk_enum_find_string (enum_exit, exit_enum);
 }
 
 /**
diff --git a/lib/packagekit-glib/pk-obj-list.c b/lib/packagekit-glib/pk-obj-list.c
index 73be2a4..72996b5 100644
--- a/lib/packagekit-glib/pk-obj-list.c
+++ b/lib/packagekit-glib/pk-obj-list.c
@@ -503,14 +503,14 @@ pk_obj_list_remove (PkObjList *list, gconstpointer obj)
 /**
  * pk_obj_list_remove_index:
  * @list: a valid #PkObjList instance
- * @index: the number to remove
+ * @idx: the number to remove
  *
  * Return value: TRUE is we removed something
  *
  * Removes an item from a list
  **/
 gboolean
-pk_obj_list_remove_index (PkObjList *list, guint index)
+pk_obj_list_remove_index (PkObjList *list, guint idx)
 {
 	gpointer obj;
 
@@ -518,7 +518,7 @@ pk_obj_list_remove_index (PkObjList *list, guint index)
 	g_return_val_if_fail (list->priv->func_free != NULL, FALSE);
 
 	/* get the object */
-	obj = g_ptr_array_remove_index (list->priv->array, index);
+	obj = g_ptr_array_remove_index (list->priv->array, idx);
 	if (obj == NULL)
 		return FALSE;
 	list->priv->func_free (obj);
@@ -655,18 +655,18 @@ out:
 /**
  * pk_obj_list_index:
  * @list: a valid #PkObjList instance
- * @index: the element to return
+ * @idx: the element to return
  *
  * Gets an object from the list
  **/
 gconstpointer
-pk_obj_list_index (const PkObjList *list, guint index)
+pk_obj_list_index (const PkObjList *list, guint idx)
 {
 	gconstpointer obj;
 
 	g_return_val_if_fail (PK_IS_OBJ_LIST (list), NULL);
 
-	obj = g_ptr_array_index (list->priv->array, index);
+	obj = g_ptr_array_index (list->priv->array, idx);
 	return obj;
 }
 
diff --git a/lib/packagekit-glib/pk-task-list.c b/lib/packagekit-glib/pk-task-list.c
index f2fcb1a..a98411c 100644
--- a/lib/packagekit-glib/pk-task-list.c
+++ b/lib/packagekit-glib/pk-task-list.c
@@ -173,11 +173,11 @@ pk_task_list_status_changed_cb (PkClient *client, PkStatusEnum status, PkTaskLis
  * gpk_task_list_finished_cb:
  **/
 static void
-gpk_task_list_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, PkTaskList *tlist)
+gpk_task_list_finished_cb (PkClient *client, PkExitEnum exit_enum, guint runtime, PkTaskList *tlist)
 {
 	g_return_if_fail (PK_IS_TASK_LIST (tlist));
 	egg_debug ("emit finished");
-	g_signal_emit (tlist, signals [PK_TASK_LIST_FINISHED], 0, client, exit, runtime);
+	g_signal_emit (tlist, signals [PK_TASK_LIST_FINISHED], 0, client, exit_enum, runtime);
 }
 
 /**
diff --git a/src/pk-backend-dbus.c b/src/pk-backend-dbus.c
index d3c557a..4caf33d 100644
--- a/src/pk-backend-dbus.c
+++ b/src/pk-backend-dbus.c
@@ -302,14 +302,14 @@ static gboolean
 pk_backend_dbus_time_check (PkBackendDbus *backend_dbus)
 {
 	gdouble seconds;
-	guint time;
+	guint time_ms;
 
 	g_return_val_if_fail (PK_IS_BACKEND_DBUS (backend_dbus), FALSE);
 
 	seconds = g_timer_elapsed (backend_dbus->priv->timer, NULL);
-	time = (guint) seconds * 1000;
-	if (time > PK_BACKEND_DBUS_MAX_SYNC_RUNTIME) {
-		egg_warning ("too much time for sync method: %ims", time);
+	time_ms = (guint) seconds * 1000;
+	if (time_ms > PK_BACKEND_DBUS_MAX_SYNC_RUNTIME) {
+		egg_warning ("too much time for sync method: %ims", time_ms);
 		pk_backend_error_code (backend_dbus->priv->backend,
 				       PK_ERROR_ENUM_INTERNAL_ERROR,
 				       "The backend took too much time to process the synchronous request - you need to fork!");
diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c
index 86b4fc2..bcd125f 100644
--- a/src/pk-backend-spawn.c
+++ b/src/pk-backend-spawn.c
@@ -449,12 +449,12 @@ out:
  * pk_backend_spawn_exit_cb:
  **/
 static void
-pk_backend_spawn_exit_cb (PkSpawn *spawn, PkSpawnExitType exit, PkBackendSpawn *backend_spawn)
+pk_backend_spawn_exit_cb (PkSpawn *spawn, PkSpawnExitType exit_enum, PkBackendSpawn *backend_spawn)
 {
 	g_return_if_fail (PK_IS_BACKEND_SPAWN (backend_spawn));
 
 	/* if we force killed the process, set an error */
-	if (exit == PK_SPAWN_EXIT_TYPE_SIGKILL) {
+	if (exit_enum == PK_SPAWN_EXIT_TYPE_SIGKILL) {
 		/* we just call this failed, and set an error */
 		pk_backend_error_code (backend_spawn->priv->backend, PK_ERROR_ENUM_PROCESS_KILL,
 				       "Process had to be killed to be cancelled");
@@ -463,8 +463,8 @@ pk_backend_spawn_exit_cb (PkSpawn *spawn, PkSpawnExitType exit, PkBackendSpawn *
 	/* only emit if not finished */
 	if (!backend_spawn->priv->finished) {
 		/* ignore when we exit from a dispatcher */
-		if (exit != PK_SPAWN_EXIT_TYPE_DISPATCHER_EXIT &&
-		    exit != PK_SPAWN_EXIT_TYPE_DISPATCHER_CHANGED) {
+		if (exit_enum != PK_SPAWN_EXIT_TYPE_DISPATCHER_EXIT &&
+		    exit_enum != PK_SPAWN_EXIT_TYPE_DISPATCHER_CHANGED) {
 			egg_warning ("script exited without doing finished");
 			pk_backend_finished (backend_spawn->priv->backend);
 		}
@@ -682,7 +682,7 @@ pk_backend_spawn_exit_timeout_cb (PkBackendSpawn *backend_spawn)
  * pk_backend_spawn_finished_cb:
  **/
 static void
-pk_backend_spawn_finished_cb (PkBackend *backend, PkExitEnum exit, PkBackendSpawn *backend_spawn)
+pk_backend_spawn_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkBackendSpawn *backend_spawn)
 {
 	gint timeout;
 
diff --git a/src/pk-backend.c b/src/pk-backend.c
index cf296f4..97f49b1 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -1400,7 +1400,7 @@ pk_backend_get_role (PkBackend *backend)
  * Should only be used internally, or from PkRunner when setting CANCELLED.
  **/
 gboolean
-pk_backend_set_exit_code (PkBackend *backend, PkExitEnum exit)
+pk_backend_set_exit_code (PkBackend *backend, PkExitEnum exit_enum)
 {
 	g_return_val_if_fail (PK_IS_BACKEND (backend), PK_ROLE_ENUM_UNKNOWN);
 	g_return_val_if_fail (backend->priv->locked != FALSE, FALSE);
@@ -1408,13 +1408,13 @@ pk_backend_set_exit_code (PkBackend *backend, PkExitEnum exit)
 	if (backend->priv->exit != PK_EXIT_ENUM_UNKNOWN) {
 		egg_warning ("already set exit status: old=%s, new=%s",
 			    pk_exit_enum_to_text (backend->priv->exit),
-			    pk_exit_enum_to_text (exit));
+			    pk_exit_enum_to_text (exit_enum));
 		egg_debug_backtrace ();
 		return FALSE;
 	}
 
 	/* new value */
-	backend->priv->exit = exit;
+	backend->priv->exit = exit_enum;
 	return TRUE;
 }
 
diff --git a/src/pk-engine.c b/src/pk-engine.c
index ee89c8f..e3b5631 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -239,7 +239,7 @@ pk_engine_notify_updates_changed_cb (PkNotify *notify, PkEngine *engine)
  * pk_engine_finished_cb:
  **/
 static void
-pk_engine_finished_cb (PkBackend *backend, PkExitEnum exit, PkEngine *engine)
+pk_engine_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkEngine *engine)
 {
 	g_return_if_fail (PK_IS_ENGINE (engine));
 
diff --git a/src/pk-main.c b/src/pk-main.c
index 40184b0..68a1e3d 100644
--- a/src/pk-main.c
+++ b/src/pk-main.c
@@ -118,9 +118,9 @@ pk_object_register (DBusGConnection *connection, GObject *object, GError **error
  * Return value: FALSE, as we don't want to repeat this action.
  **/
 static gboolean
-timed_exit_cb (GMainLoop *loop)
+timed_exit_cb (GMainLoop *mainloop)
 {
-	g_main_loop_quit (loop);
+	g_main_loop_quit (mainloop);
 	return FALSE;
 }
 
diff --git a/src/pk-post-trans.c b/src/pk-post-trans.c
index 68d2752..49778cb 100644
--- a/src/pk-post-trans.c
+++ b/src/pk-post-trans.c
@@ -74,7 +74,7 @@ G_DEFINE_TYPE (PkPostTrans, pk_post_trans, G_TYPE_OBJECT)
  * pk_post_trans_finished_cb:
  **/
 static void
-pk_post_trans_finished_cb (PkBackend *backend, PkExitEnum exit, PkPostTrans *post)
+pk_post_trans_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkPostTrans *post)
 {
 	if (g_main_loop_is_running (post->priv->loop))
 		g_main_loop_quit (post->priv->loop);
diff --git a/src/pk-spawn.c b/src/pk-spawn.c
index 933ae14..34b87b3 100644
--- a/src/pk-spawn.c
+++ b/src/pk-spawn.c
@@ -393,7 +393,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp)
 	gboolean idleio;
 	guint i;
 	guint len;
-	gint nice;
+	gint nice_value;
 	gchar *command;
 
 	g_return_val_if_fail (PK_IS_SPAWN (spawn), FALSE);
@@ -457,13 +457,13 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp)
 				 NULL);
 
 	/* get the nice value and ensure we are in the valid range */
-	nice = pk_conf_get_int (spawn->priv->conf, "BackendSpawnNiceValue");
-	nice = CLAMP(nice, -20, 19);
+	nice_value = pk_conf_get_int (spawn->priv->conf, "BackendSpawnNiceValue");
+	nice_value = CLAMP(nice_value, -20, 19);
 
 	/* don't completely bog the system down */
-	if (nice != 0) {
-		egg_debug ("renice to %i", nice);
-		setpriority (PRIO_PROCESS, spawn->priv->child_pid, nice);
+	if (nice_value != 0) {
+		egg_debug ("renice to %i", nice_value);
+		setpriority (PRIO_PROCESS, spawn->priv->child_pid, nice_value);
 	}
 
 	/* perhaps set idle IO priority */
diff --git a/src/pk-time.c b/src/pk-time.c
index 49527d6..4a1412f 100644
--- a/src/pk-time.c
+++ b/src/pk-time.c
@@ -79,28 +79,28 @@ G_DEFINE_TYPE (PkTime, pk_time, G_TYPE_OBJECT)
  * Return value: if we set the average limits correctly
  **/
 gboolean
-pk_time_set_average_limits (PkTime *time, guint average_min, guint average_max)
+pk_time_set_average_limits (PkTime *self, guint average_min, guint average_max)
 {
-	g_return_val_if_fail (PK_IS_TIME (time), FALSE);
-	time->priv->average_min = average_min;
-	time->priv->average_max = average_max;
+	g_return_val_if_fail (PK_IS_TIME (self), FALSE);
+	self->priv->average_min = average_min;
+	self->priv->average_max = average_max;
 	return TRUE;
 }
 
 /**
  * pk_time_set_value_limits:
- * @time: This class instance
+ * @self: This class instance
  * @average_min: the smallest value that is acceptable for time (in seconds)
  * @average_max: the largest value that is acceptable for time (in seconds)
  *
  * Return value: if we set the value limits correctly
  **/
 gboolean
-pk_time_set_value_limits (PkTime *time, guint value_min, guint value_max)
+pk_time_set_value_limits (PkTime *self, guint value_min, guint value_max)
 {
-	g_return_val_if_fail (PK_IS_TIME (time), FALSE);
-	time->priv->value_min = value_min;
-	time->priv->value_max = value_max;
+	g_return_val_if_fail (PK_IS_TIME (self), FALSE);
+	self->priv->value_min = value_min;
+	self->priv->value_max = value_max;
 	return TRUE;
 }
 
@@ -110,15 +110,15 @@ pk_time_set_value_limits (PkTime *time, guint value_min, guint value_max)
  * Returns time running in ms
  **/
 guint
-pk_time_get_elapsed (PkTime *time)
+pk_time_get_elapsed (PkTime *self)
 {
 	gdouble elapsed;
 
-	g_return_val_if_fail (PK_IS_TIME (time), 0);
+	g_return_val_if_fail (PK_IS_TIME (self), 0);
 
-	elapsed = g_timer_elapsed (time->priv->timer, NULL);
+	elapsed = g_timer_elapsed (self->priv->timer, NULL);
 	elapsed *= 1000;
-	elapsed += time->priv->time_offset;
+	elapsed += self->priv->time_offset;
 
 	return (guint) elapsed;
 }
@@ -142,7 +142,7 @@ pk_time_get_gradient (PkTimeItem *item1, PkTimeItem *item2)
  * Returns time in seconds
  **/
 guint
-pk_time_get_remaining (PkTime *time)
+pk_time_get_remaining (PkTime *self)
 {
 	guint i;
 	guint averaged = 0;
@@ -155,9 +155,9 @@ pk_time_get_remaining (PkTime *time)
 	PkTimeItem *item;
 	PkTimeItem *item_prev;
 
-	g_return_val_if_fail (PK_IS_TIME (time), 0);
+	g_return_val_if_fail (PK_IS_TIME (self), 0);
 
-	length = time->priv->array->len;
+	length = self->priv->array->len;
 	if (length < 2) {
 		egg_debug ("array too small");
 		return 0;
@@ -165,8 +165,8 @@ pk_time_get_remaining (PkTime *time)
 
 	/* get as many as we can */
 	for (i=length-1; i>0; i--) {
-		item_prev = g_ptr_array_index (time->priv->array, i-1);
-		item = g_ptr_array_index (time->priv->array, i);
+		item_prev = g_ptr_array_index (self->priv->array, i-1);
+		item = g_ptr_array_index (self->priv->array, i);
 		grad = pk_time_get_gradient (item, item_prev);
 		egg_debug ("gradient between %i/%i=%f", i-1, i, grad);
 		if (grad < 0.00001 || grad > 100) {
@@ -174,14 +174,14 @@ pk_time_get_remaining (PkTime *time)
 		} else {
 			grad_ave += grad;
 			averaged++;
-			if (averaged > time->priv->average_max) {
+			if (averaged > self->priv->average_max) {
 				break;
 			}
 		}
 	}
 
 	egg_debug ("averaged %i points", averaged);
-	if (averaged < time->priv->average_min) {
+	if (averaged < self->priv->average_min) {
 		egg_debug ("not enough samples for accurate time: %i", averaged);
 		return 0;
 	}
@@ -191,11 +191,11 @@ pk_time_get_remaining (PkTime *time)
 	egg_debug ("grad_ave=%f", grad_ave);
 
 	/* just for debugging */
-	elapsed = pk_time_get_elapsed (time);
+	elapsed = pk_time_get_elapsed (self);
 	egg_debug ("elapsed=%i", elapsed);
 
 	/* 100 percent to be complete */
-	item = g_ptr_array_index (time->priv->array, length - 1);
+	item = g_ptr_array_index (self->priv->array, length - 1);
 	percentage_left = 100 - item->percentage;
 	egg_debug ("percentage_left=%i", percentage_left);
 	estimated = (gfloat) percentage_left / grad_ave;
@@ -204,9 +204,9 @@ pk_time_get_remaining (PkTime *time)
 	estimated /= 1000;
 	egg_debug ("estimated=%f seconds", estimated);
 
-	if (estimated < time->priv->value_min) {
+	if (estimated < self->priv->value_min) {
 		estimated = 0;
-	} else if (estimated > time->priv->value_max) {
+	} else if (estimated > self->priv->value_max) {
 		estimated = 0;
 	}
 	return (guint) estimated;
@@ -216,22 +216,22 @@ pk_time_get_remaining (PkTime *time)
  * pk_time_add_data:
  **/
 gboolean
-pk_time_add_data (PkTime *time, guint percentage)
+pk_time_add_data (PkTime *self, guint percentage)
 {
 	PkTimeItem *item;
 	guint elapsed;
 
-	g_return_val_if_fail (PK_IS_TIME (time), FALSE);
+	g_return_val_if_fail (PK_IS_TIME (self), FALSE);
 
 	/* check we are going up */
-	if (percentage < time->priv->last_percentage) {
+	if (percentage < self->priv->last_percentage) {
 		egg_warning ("percentage cannot go down!");
 		return FALSE;
 	}
-	time->priv->last_percentage = percentage;
+	self->priv->last_percentage = percentage;
 
 	/* get runtime in ms */
-	elapsed = pk_time_get_elapsed (time);
+	elapsed = pk_time_get_elapsed (self);
 
 	egg_debug ("adding %i at %i (ms)", percentage, elapsed);
 
@@ -239,7 +239,7 @@ pk_time_add_data (PkTime *time, guint percentage)
 	item = g_new0 (PkTimeItem, 1);
 	item->time = elapsed;
 	item->percentage = percentage;
-	g_ptr_array_add (time->priv->array, item);
+	g_ptr_array_add (self->priv->array, item);
 
 	return TRUE;
 }
@@ -248,18 +248,18 @@ pk_time_add_data (PkTime *time, guint percentage)
  * pk_time_free_data:
  **/
 static gboolean
-pk_time_free_data (PkTime *time)
+pk_time_free_data (PkTime *self)
 {
 	guint i;
 	guint length;
 	gpointer mem;
 
-	g_return_val_if_fail (PK_IS_TIME (time), FALSE);
+	g_return_val_if_fail (PK_IS_TIME (self), FALSE);
 
-	length = time->priv->array->len;
+	length = self->priv->array->len;
 	for (i=0; i<length; i++) {
-		mem = g_ptr_array_index (time->priv->array, 0);
-		g_ptr_array_remove_index (time->priv->array, 0);
+		mem = g_ptr_array_index (self->priv->array, 0);
+		g_ptr_array_remove_index (self->priv->array, 0);
 		g_free (mem);
 	}
 	return TRUE;
@@ -269,18 +269,18 @@ pk_time_free_data (PkTime *time)
  * pk_time_reset:
  **/
 gboolean
-pk_time_reset (PkTime *time)
+pk_time_reset (PkTime *self)
 {
-	g_return_val_if_fail (PK_IS_TIME (time), FALSE);
+	g_return_val_if_fail (PK_IS_TIME (self), FALSE);
 
-	time->priv->time_offset = 0;
-	time->priv->last_percentage = 0;
-	time->priv->average_min = PK_TIME_AVERAGE_DEFAULT_MIN;
-	time->priv->average_max = PK_TIME_AVERAGE_DEFAULT_MAX;
-	time->priv->value_min = PK_TIME_VALUE_DEFAULT_MIN;
-	time->priv->value_max = PK_TIME_VALUE_DEFAULT_MAX;
-	g_timer_reset (time->priv->timer);
-	pk_time_free_data (time);
+	self->priv->time_offset = 0;
+	self->priv->last_percentage = 0;
+	self->priv->average_min = PK_TIME_AVERAGE_DEFAULT_MIN;
+	self->priv->average_max = PK_TIME_AVERAGE_DEFAULT_MAX;
+	self->priv->value_min = PK_TIME_VALUE_DEFAULT_MIN;
+	self->priv->value_max = PK_TIME_VALUE_DEFAULT_MAX;
+	g_timer_reset (self->priv->timer);
+	pk_time_free_data (self);
 
 	return TRUE;
 }
@@ -302,12 +302,12 @@ pk_time_class_init (PkTimeClass *klass)
  * @time: This class instance
  **/
 static void
-pk_time_init (PkTime *time)
+pk_time_init (PkTime *self)
 {
-	time->priv = PK_TIME_GET_PRIVATE (time);
-	time->priv->array = g_ptr_array_new ();
-	time->priv->timer = g_timer_new ();
-	pk_time_reset (time);
+	self->priv = PK_TIME_GET_PRIVATE (self);
+	self->priv->array = g_ptr_array_new ();
+	self->priv->timer = g_timer_new ();
+	pk_time_reset (self);
 }
 
 /**
@@ -317,15 +317,15 @@ pk_time_init (PkTime *time)
 static void
 pk_time_finalize (GObject *object)
 {
-	PkTime *time;
+	PkTime *self;
 
 	g_return_if_fail (PK_IS_TIME (object));
 
-	time = PK_TIME (object);
-	g_return_if_fail (time->priv != NULL);
-	g_ptr_array_foreach (time->priv->array, (GFunc) g_free, NULL);
-	g_ptr_array_free (time->priv->array, TRUE);
-	g_timer_destroy (time->priv->timer);
+	self = PK_TIME (object);
+	g_return_if_fail (self->priv != NULL);
+	g_ptr_array_foreach (self->priv->array, (GFunc) g_free, NULL);
+	g_ptr_array_free (self->priv->array, TRUE);
+	g_timer_destroy (self->priv->timer);
 
 	G_OBJECT_CLASS (pk_time_parent_class)->finalize (object);
 }
@@ -338,9 +338,9 @@ pk_time_finalize (GObject *object)
 PkTime *
 pk_time_new (void)
 {
-	PkTime *time;
-	time = g_object_new (PK_TYPE_TIME, NULL);
-	return PK_TIME (time);
+	PkTime *self;
+	self = g_object_new (PK_TYPE_TIME, NULL);
+	return PK_TIME (self);
 }
 
 /***************************************************************************
@@ -352,7 +352,7 @@ pk_time_new (void)
 void
 pk_time_test (EggTest *test)
 {
-	PkTime *time = NULL;
+	PkTime *self = NULL;
 	gboolean ret;
 	guint value;
 
@@ -361,12 +361,12 @@ pk_time_test (EggTest *test)
 
 	/************************************************************/
 	egg_test_title (test, "get PkTime object");
-	time = pk_time_new ();
-	egg_test_assert (test, time != NULL);
+	self = pk_time_new ();
+	egg_test_assert (test, self != NULL);
 
 	/************************************************************/
 	egg_test_title (test, "get elapsed correctly at startup");
-	value = pk_time_get_elapsed (time);
+	value = pk_time_get_elapsed (self);
 	if (value < 10)
 		egg_test_success (test, "elapsed at startup %i", value);
 	else
@@ -374,7 +374,7 @@ pk_time_test (EggTest *test)
 
 	/************************************************************/
 	egg_test_title (test, "ignore remaining correctly");
-	value = pk_time_get_remaining (time);
+	value = pk_time_get_remaining (self);
 	if (value == 0)
 		egg_test_success (test, NULL);
 	else
@@ -385,7 +385,7 @@ pk_time_test (EggTest *test)
 
 	/************************************************************/
 	egg_test_title (test, "get elapsed correctly");
-	value = pk_time_get_elapsed (time);
+	value = pk_time_get_elapsed (self);
 	if (value > 900 && value < 1100)
 		egg_test_success (test, "elapsed ~1000ms: %i", value);
 	else
@@ -393,7 +393,7 @@ pk_time_test (EggTest *test)
 
 	/************************************************************/
 	egg_test_title (test, "ignore remaining correctly when not enough entries");
-	value = pk_time_get_remaining (time);
+	value = pk_time_get_remaining (self);
 	if (value == 0)
 		egg_test_success (test, NULL);
 	else
@@ -401,43 +401,43 @@ pk_time_test (EggTest *test)
 
 	/************************************************************/
 	egg_test_title (test, "make sure we can add data");
-	ret = pk_time_add_data (time, 10);
+	ret = pk_time_add_data (self, 10);
 	egg_test_assert (test, ret);
 
 	/************************************************************/
 	egg_test_title (test, "make sure we can get remaining correctly");
 	value = 20;
 	while (value < 60) {
-		time->priv->time_offset += 2000;
-		pk_time_add_data (time, value);
+		self->priv->time_offset += 2000;
+		pk_time_add_data (self, value);
 		value += 10;
 	}
-	value = pk_time_get_remaining (time);
+	value = pk_time_get_remaining (self);
 	if (value > 9 && value < 11)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got %i", value);
 
 	/* reset */
-	g_object_unref (time);
-	time = pk_time_new ();
+	g_object_unref (self);
+	self = pk_time_new ();
 
 	/************************************************************/
 	egg_test_title (test, "make sure we can do long times");
 	value = 10;
-	pk_time_add_data (time, 0);
+	pk_time_add_data (self, 0);
 	while (value < 60) {
-		time->priv->time_offset += 4*60*1000;
-		pk_time_add_data (time, value);
+		self->priv->time_offset += 4*60*1000;
+		pk_time_add_data (self, value);
 		value += 10;
 	}
-	value = pk_time_get_remaining (time);
+	value = pk_time_get_remaining (self);
 	if (value > 1199 && value < 1201)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got %i", value);
 
-	g_object_unref (time);
+	g_object_unref (self);
 
 	egg_test_end (test);
 }
diff --git a/src/pk-transaction-db.c b/src/pk-transaction-db.c
index ac9a11c..217c178 100644
--- a/src/pk-transaction-db.c
+++ b/src/pk-transaction-db.c
@@ -270,7 +270,7 @@ pk_transaction_db_action_time_since (PkTransactionDb *tdb, PkRoleEnum role)
 	const gchar *role_text;
 	gchar *statement;
 	gchar *timespec = NULL;
-	guint time;
+	guint time_ms;
 
 	g_return_val_if_fail (PK_IS_TRANSACTION_DB (tdb), 0);
 	g_return_val_if_fail (tdb->priv->db != NULL, 0);
@@ -292,11 +292,11 @@ pk_transaction_db_action_time_since (PkTransactionDb *tdb, PkRoleEnum role)
 	}
 
 	/* work out the difference */
-	time = pk_iso8601_difference (timespec);
-	egg_debug ("timespec=%s, difference=%i", timespec, time);
+	time_ms = pk_iso8601_difference (timespec);
+	egg_debug ("timespec=%s, difference=%i", timespec, time_ms);
 	g_free (timespec);
 
-	return time;
+	return time_ms;
 }
 
 /**
@@ -522,7 +522,8 @@ static gboolean
 pk_transaction_db_create_table_last_action (PkTransactionDb *tdb)
 {
 	const gchar *role_text;
-	gchar *statement;
+	const gchar *statement;
+	gchar *statement2;
 	gchar *timespec;
 	guint i;
 
@@ -535,9 +536,9 @@ pk_transaction_db_create_table_last_action (PkTransactionDb *tdb)
 	for (i=0; i<PK_ROLE_ENUM_UNKNOWN; i++) {
 		role_text = pk_role_enum_to_text (i);
 		/* reset to now if the role does not exist */
-		statement = g_strdup_printf ("INSERT INTO last_action (role, timespec) VALUES ('%s', '%s')", role_text, timespec);
-		sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
-		g_free (statement);
+		statement2 = g_strdup_printf ("INSERT INTO last_action (role, timespec) VALUES ('%s', '%s')", role_text, timespec);
+		sqlite3_exec (tdb->priv->db, statement2, NULL, NULL, NULL);
+		g_free (statement2);
 	}
 	g_free (timespec);
 	return TRUE;
diff --git a/src/pk-transaction-id.c b/src/pk-transaction-id.c
index ec8bdec..ca28e89 100644
--- a/src/pk-transaction-id.c
+++ b/src/pk-transaction-id.c
@@ -39,21 +39,21 @@
 static gchar *
 pk_transaction_id_get_random_hex_string (guint length)
 {
-	GRand *rand;
+	GRand *gen;
 	gint32 num;
 	gchar *string;
 	guint i;
 
-	rand = g_rand_new ();
+	gen = g_rand_new ();
 
 	/* allocate a string with the correct size */
 	string = g_strnfill (length, 'x');
 	for (i=0; i<length; i++) {
-		num = g_rand_int_range (rand, (gint32) 'a', (gint32) 'f');
+		num = g_rand_int_range (gen, (gint32) 'a', (gint32) 'f');
 		/* assign a random number as a char */
 		string[i] = (gchar) num;
 	}
-	g_rand_free (rand);
+	g_rand_free (gen);
 	return string;
 }
 
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index 995e49c..ed43baf 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -278,7 +278,7 @@ pk_transaction_list_run_item (PkTransactionList *tlist, PkTransactionItem *item)
  * pk_transaction_list_transaction_finished_cb:
  **/
 static void
-pk_transaction_list_transaction_finished_cb (PkTransaction *transaction, const gchar *exit_text, guint time, PkTransactionList *tlist)
+pk_transaction_list_transaction_finished_cb (PkTransaction *transaction, const gchar *exit_text, guint time_ms, PkTransactionList *tlist)
 {
 	guint i;
 	guint length;
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 3de4f0d..1cad502 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -397,12 +397,12 @@ pk_transaction_status_changed_emit (PkTransaction *transaction, PkStatusEnum sta
  * pk_transaction_finished_emit:
  **/
 static void
-pk_transaction_finished_emit (PkTransaction *transaction, PkExitEnum exit, guint time)
+pk_transaction_finished_emit (PkTransaction *transaction, PkExitEnum exit_enum, guint time_ms)
 {
 	const gchar *exit_text;
-	exit_text = pk_exit_enum_to_text (exit);
-	egg_debug ("emitting finished '%s', %i", exit_text, time);
-	g_signal_emit (transaction, signals [PK_TRANSACTION_FINISHED], 0, exit_text, time);
+	exit_text = pk_exit_enum_to_text (exit_enum);
+	egg_debug ("emitting finished '%s', %i", exit_text, time_ms);
+	g_signal_emit (transaction, signals [PK_TRANSACTION_FINISHED], 0, exit_text, time_ms);
 }
 
 /**
@@ -524,10 +524,10 @@ pk_transaction_distro_upgrade_cb (PkBackend *backend, PkDistroUpgradeEnum type,
  * pk_transaction_finished_cb:
  **/
 static void
-pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit, PkTransaction *transaction)
+pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransaction *transaction)
 {
 	gboolean ret;
-	guint time;
+	guint time_ms;
 	gchar *packages;
 	gchar **package_ids;
 	guint i, length;
@@ -557,7 +557,7 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit, PkTransaction *
 	g_signal_handler_disconnect (transaction->priv->backend, transaction->priv->signal_category);
 
 	/* check for session restarts */
-	if (exit == PK_EXIT_ENUM_SUCCESS &&
+	if (exit_enum == PK_EXIT_ENUM_SUCCESS &&
 	    (transaction->priv->role == PK_ROLE_ENUM_UPDATE_SYSTEM ||
 	     transaction->priv->role == PK_ROLE_ENUM_UPDATE_PACKAGES)) {
 
@@ -585,7 +585,7 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit, PkTransaction *
 	}
 
 	/* rescan desktop files after install */
-	if (exit == PK_EXIT_ENUM_SUCCESS &&
+	if (exit_enum == PK_EXIT_ENUM_SUCCESS &&
 	    transaction->priv->role == PK_ROLE_ENUM_INSTALL_PACKAGES) {
 
 		/* refresh the desktop icon cache */
@@ -620,7 +620,7 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit, PkTransaction *
 	g_signal_handler_disconnect (transaction->priv->backend, transaction->priv->signal_require_restart);
 
 	/* do some optional extra actions when we've finished refreshing the cache */
-	if (exit == PK_EXIT_ENUM_SUCCESS &&
+	if (exit_enum == PK_EXIT_ENUM_SUCCESS &&
 	    transaction->priv->role == PK_ROLE_ENUM_REFRESH_CACHE) {
 
 		/* generate the package list */
@@ -649,17 +649,17 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit, PkTransaction *
 
 	/* if we did ::repo-signature-required or ::eula-required, change the error code */
 	if (transaction->priv->emit_signature_required)
-		exit = PK_EXIT_ENUM_KEY_REQUIRED;
+		exit_enum = PK_EXIT_ENUM_KEY_REQUIRED;
 	else if (transaction->priv->emit_eula_required)
-		exit = PK_EXIT_ENUM_EULA_REQUIRED;
+		exit_enum = PK_EXIT_ENUM_EULA_REQUIRED;
 
 	/* invalidate some caches if we succeeded*/
-	if (exit == PK_EXIT_ENUM_SUCCESS)
+	if (exit_enum == PK_EXIT_ENUM_SUCCESS)
 		pk_transaction_finish_invalidate_caches (transaction);
 
 	/* find the length of time we have been running */
-	time = pk_transaction_get_runtime (transaction);
-	egg_debug ("backend was running for %i ms", time);
+	time_ms = pk_transaction_get_runtime (transaction);
+	egg_debug ("backend was running for %i ms", time_ms);
 
 	/* add to the database if we are going to log it */
 	if (transaction->priv->role == PK_ROLE_ENUM_UPDATE_SYSTEM ||
@@ -696,14 +696,14 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit, PkTransaction *
 	}
 
 	/* only reset the time if we succeeded */
-	if (exit == PK_EXIT_ENUM_SUCCESS)
+	if (exit_enum == PK_EXIT_ENUM_SUCCESS)
 		pk_transaction_db_action_time_reset (transaction->priv->transaction_db, transaction->priv->role);
 
 	/* did we finish okay? */
-	if (exit == PK_EXIT_ENUM_SUCCESS)
-		pk_transaction_db_set_finished (transaction->priv->transaction_db, transaction->priv->tid, TRUE, time);
+	if (exit_enum == PK_EXIT_ENUM_SUCCESS)
+		pk_transaction_db_set_finished (transaction->priv->transaction_db, transaction->priv->tid, TRUE, time_ms);
 	else
-		pk_transaction_db_set_finished (transaction->priv->transaction_db, transaction->priv->tid, FALSE, time);
+		pk_transaction_db_set_finished (transaction->priv->transaction_db, transaction->priv->tid, FALSE, time_ms);
 
 	/* remove any inhibit */
 	pk_inhibit_remove (transaction->priv->inhibit, transaction);
@@ -712,13 +712,13 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit, PkTransaction *
 	if (transaction->priv->uid != PK_SECURITY_UID_INVALID)
 		pk_syslog_add (transaction->priv->syslog, PK_SYSLOG_TYPE_INFO, "%s transaction %s from uid %i finished with %s after %ims",
 			       pk_role_enum_to_text (transaction->priv->role), transaction->priv->tid,
-			       transaction->priv->uid, pk_exit_enum_to_text (exit), time);
+			       transaction->priv->uid, pk_exit_enum_to_text (exit_enum), time_ms);
 	else
 		pk_syslog_add (transaction->priv->syslog, PK_SYSLOG_TYPE_INFO, "%s transaction %s finished with %s after %ims",
-			       pk_role_enum_to_text (transaction->priv->role), transaction->priv->tid, pk_exit_enum_to_text (exit), time);
+			       pk_role_enum_to_text (transaction->priv->role), transaction->priv->tid, pk_exit_enum_to_text (exit_enum), time_ms);
 
 	/* we emit last, as other backends will be running very soon after us, and we don't want to be notified */
-	pk_transaction_finished_emit (transaction, exit, time);
+	pk_transaction_finished_emit (transaction, exit_enum, time_ms);
 }
 
 /**
commit 45a385d4784cc993e0bb0a2e8b6f9a6aa8a65871
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 14:15:42 2008 +0000

    trivial: update a screenshot

diff --git a/docs/html/img/gpk-client-mime-type.png b/docs/html/img/gpk-client-mime-type.png
index d91cbd4..bfc6731 100644
Binary files a/docs/html/img/gpk-client-mime-type.png and b/docs/html/img/gpk-client-mime-type.png differ
commit 75a9142abda96458345309c14fe66c8cb504a11a
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 14:14:59 2008 +0000

    trivial: remove all the duplicate init forward-definitions

diff --git a/lib/packagekit-glib/pk-catalog.c b/lib/packagekit-glib/pk-catalog.c
index ac754fd..9319b97 100644
--- a/lib/packagekit-glib/pk-catalog.c
+++ b/lib/packagekit-glib/pk-catalog.c
@@ -35,8 +35,6 @@
 #include "egg-debug.h"
 #include "egg-string.h"
 
-static void     pk_catalog_class_init	(PkCatalogClass	*klass);
-static void     pk_catalog_init		(PkCatalog	*catalog);
 static void     pk_catalog_finalize	(GObject	*object);
 
 #define PK_CATALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CATALOG, PkCatalogPrivate))
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index c03aac8..4b7b755 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -66,8 +66,6 @@
 #include "egg-debug.h"
 #include "egg-string.h"
 
-static void     pk_client_class_init	(PkClientClass *klass);
-static void     pk_client_init		(PkClient      *client);
 static void     pk_client_finalize	(GObject       *object);
 
 #define PK_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CLIENT, PkClientPrivate))
diff --git a/lib/packagekit-glib/pk-control.c b/lib/packagekit-glib/pk-control.c
index d0bbd47..e75dd67 100644
--- a/lib/packagekit-glib/pk-control.c
+++ b/lib/packagekit-glib/pk-control.c
@@ -50,8 +50,6 @@
 
 #include "egg-debug.h"
 
-static void     pk_control_class_init	(PkControlClass *klass);
-static void     pk_control_init		(PkControl      *control);
 static void     pk_control_finalize	(GObject     *object);
 
 #define PK_CONTROL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CONTROL, PkControlPrivate))
diff --git a/lib/packagekit-glib/pk-desktop.c b/lib/packagekit-glib/pk-desktop.c
index b57ff6c..b8108ed 100644
--- a/lib/packagekit-glib/pk-desktop.c
+++ b/lib/packagekit-glib/pk-desktop.c
@@ -35,8 +35,6 @@
 #include "egg-debug.h"
 #include "egg-string.h"
 
-static void     pk_desktop_class_init	(PkDesktopClass *klass);
-static void     pk_desktop_init		(PkDesktop      *desktop);
 static void     pk_desktop_finalize	(GObject        *object);
 
 #define PK_DESKTOP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_DESKTOP, PkDesktopPrivate))
diff --git a/lib/packagekit-glib/pk-package-list.c b/lib/packagekit-glib/pk-package-list.c
index 810259d..449ac31 100644
--- a/lib/packagekit-glib/pk-package-list.c
+++ b/lib/packagekit-glib/pk-package-list.c
@@ -51,8 +51,6 @@
 #include <packagekit-glib/pk-package-obj.h>
 #include <packagekit-glib/pk-package-list.h>
 
-static void     pk_package_list_class_init	(PkPackageListClass *klass);
-static void     pk_package_list_init		(PkPackageList      *plist);
 static void     pk_package_list_finalize	(GObject            *object);
 
 #define PK_PACKAGE_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_PACKAGE_LIST, PkPackageListPrivate))
diff --git a/lib/packagekit-glib/pk-task-list.c b/lib/packagekit-glib/pk-task-list.c
index c354234..f2fcb1a 100644
--- a/lib/packagekit-glib/pk-task-list.c
+++ b/lib/packagekit-glib/pk-task-list.c
@@ -49,8 +49,6 @@
 #include <packagekit-glib/pk-connection.h>
 #include <packagekit-glib/pk-marshal.h>
 
-static void     pk_task_list_class_init		(PkTaskListClass *klass);
-static void     pk_task_list_init		(PkTaskList      *task_list);
 static void     pk_task_list_finalize		(GObject         *object);
 
 #define PK_TASK_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TASK_LIST, PkTaskListPrivate))
diff --git a/src/egg-dbus-monitor.c b/src/egg-dbus-monitor.c
index 90c2193..cc9d5e8 100644
--- a/src/egg-dbus-monitor.c
+++ b/src/egg-dbus-monitor.c
@@ -32,8 +32,6 @@
 #include "egg-debug.h"
 #include "egg-dbus-monitor.h"
 
-static void     egg_dbus_monitor_class_init	(EggDbusMonitorClass	*klass);
-static void     egg_dbus_monitor_init		(EggDbusMonitor		*dbus_monitor);
 static void     egg_dbus_monitor_finalize	(GObject		*object);
 
 #define EGG_DBUS_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_DBUS_MONITOR, EggDbusMonitorPrivate))
diff --git a/src/pk-engine.c b/src/pk-engine.c
index ac05a99..ee89c8f 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -60,8 +60,6 @@
 #include "pk-security.h"
 #include "pk-conf.h"
 
-static void     pk_engine_class_init	(PkEngineClass *klass);
-static void     pk_engine_init		(PkEngine      *engine);
 static void     pk_engine_finalize	(GObject       *object);
 
 #define PK_ENGINE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_ENGINE, PkEnginePrivate))
diff --git a/src/pk-file-monitor-gio.c b/src/pk-file-monitor-gio.c
index 3ac3d0c..748f5be 100644
--- a/src/pk-file-monitor-gio.c
+++ b/src/pk-file-monitor-gio.c
@@ -42,8 +42,6 @@
 #include "pk-conf.h"
 #include "pk-file-monitor.h"
 
-static void     pk_file_monitor_class_init	(PkFileMonitorClass	*klass);
-static void     pk_file_monitor_init		(PkFileMonitor		*file_monitor);
 static void     pk_file_monitor_finalize	(GObject		*object);
 
 #define PK_FILE_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_FILE_MONITOR, PkFileMonitorPrivate))
diff --git a/src/pk-network-nm.c b/src/pk-network-nm.c
index 22a158d..fdb57c7 100644
--- a/src/pk-network-nm.c
+++ b/src/pk-network-nm.c
@@ -45,8 +45,6 @@
 #include "pk-network-nm.h"
 #include "pk-marshal.h"
 
-static void     pk_network_nm_class_init	(PkNetworkNmClass *klass);
-static void     pk_network_nm_init		(PkNetworkNm      *network_nm);
 static void     pk_network_nm_finalize		(GObject          *object);
 
 #define PK_NETWORK_NM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_NETWORK_NM, PkNetworkNmPrivate))
diff --git a/src/pk-network-unix.c b/src/pk-network-unix.c
index c122534..f51208c 100644
--- a/src/pk-network-unix.c
+++ b/src/pk-network-unix.c
@@ -50,8 +50,6 @@
 #include "pk-network-unix.h"
 #include "pk-marshal.h"
 
-static void     pk_network_unix_class_init	(PkNetworkUnixClass *klass);
-static void     pk_network_unix_init		(PkNetworkUnix      *network_unix);
 static void     pk_network_unix_finalize	(GObject        *object);
 
 #define PK_NETWORK_UNIX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_NETWORK_UNIX, PkNetworkUnixPrivate))
diff --git a/src/pk-network.c b/src/pk-network.c
index 67be125..7a1caf5 100644
--- a/src/pk-network.c
+++ b/src/pk-network.c
@@ -50,8 +50,6 @@
 #include "pk-marshal.h"
 #include "pk-conf.h"
 
-static void     pk_network_class_init	(PkNetworkClass *klass);
-static void     pk_network_init		(PkNetwork      *network);
 static void     pk_network_finalize	(GObject        *object);
 
 #define PK_NETWORK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_NETWORK, PkNetworkPrivate))
diff --git a/src/pk-spawn.c b/src/pk-spawn.c
index 263995b..933ae14 100644
--- a/src/pk-spawn.c
+++ b/src/pk-spawn.c
@@ -52,8 +52,6 @@
 
 #include "pk-sysdep.h"
 
-static void     pk_spawn_class_init	(PkSpawnClass *klass);
-static void     pk_spawn_init		(PkSpawn      *spawn);
 static void     pk_spawn_finalize	(GObject       *object);
 
 #define PK_SPAWN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_SPAWN, PkSpawnPrivate))
diff --git a/src/pk-time.c b/src/pk-time.c
index 481db96..49527d6 100644
--- a/src/pk-time.c
+++ b/src/pk-time.c
@@ -43,8 +43,6 @@
 #include "pk-time.h"
 #include "pk-marshal.h"
 
-static void     pk_time_class_init	(PkTimeClass *klass);
-static void     pk_time_init		(PkTime      *time);
 static void     pk_time_finalize	(GObject     *object);
 
 #define PK_TIME_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TIME, PkTimePrivate))
diff --git a/src/pk-transaction-db.c b/src/pk-transaction-db.c
index cad4743..ac9a11c 100644
--- a/src/pk-transaction-db.c
+++ b/src/pk-transaction-db.c
@@ -43,8 +43,6 @@
 #include "pk-transaction-db.h"
 #include "pk-marshal.h"
 
-static void     pk_transaction_db_class_init	(PkTransactionDbClass *klass);
-static void     pk_transaction_db_init		(PkTransactionDb      *tdb);
 static void     pk_transaction_db_finalize	(GObject        *object);
 
 #define PK_TRANSACTION_DB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TRANSACTION_DB, PkTransactionDbPrivate))
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index a41b775..995e49c 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -46,8 +46,6 @@
 #include "pk-transaction-list.h"
 #include "org.freedesktop.PackageKit.Transaction.h"
 
-static void     pk_transaction_list_class_init	(PkTransactionListClass *klass);
-static void     pk_transaction_list_init	(PkTransactionList      *tlist);
 static void     pk_transaction_list_finalize	(GObject        *object);
 
 #define PK_TRANSACTION_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TRANSACTION_LIST, PkTransactionListPrivate))
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index ec2895b..3de4f0d 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -62,8 +62,6 @@
 #include "pk-post-trans.h"
 #include "pk-syslog.h"
 
-static void     pk_transaction_class_init	(PkTransactionClass *klass);
-static void     pk_transaction_init		(PkTransaction      *transaction);
 static void     pk_transaction_finalize		(GObject	    *object);
 
 #define PK_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TRANSACTION, PkTransactionPrivate))
commit 29981569bce995a03cc45d9322c05479c5516bb2
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 14:00:27 2008 +0000

    trivial: mark some local functions as static

diff --git a/backends/test/pk-backend-test-succeed.c b/backends/test/pk-backend-test-succeed.c
index 8eb6fed..220f02a 100644
--- a/backends/test/pk-backend-test-succeed.c
+++ b/backends/test/pk-backend-test-succeed.c
@@ -224,7 +224,7 @@ backend_search_group (PkBackend *backend, PkBitfield filters, const gchar *searc
 /**
  * backend_search_name_timeout:
  **/
-gboolean
+static gboolean
 backend_search_name_timeout (gpointer data)
 {
 	PkBackend *backend = (PkBackend *) data;
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index c544c31..c03aac8 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -243,7 +243,7 @@ pk_client_error_fixup (GError **error)
  *
  * Return value: %TRUE if the error is the PolicyKit "RefusedByPolicy"
  **/
-gboolean
+static gboolean
 pk_client_error_refused_by_policy (GError *error)
 {
 	const gchar *error_name;
@@ -277,7 +277,7 @@ pk_client_error_refused_by_policy (GError *error)
  *
  * Return value: if we gained the privilege we asked for
  **/
-gboolean
+static gboolean
 pk_client_error_auth_obtain (GError *error)
 {
 	gboolean ret = FALSE;
diff --git a/src/pk-backend-dbus.c b/src/pk-backend-dbus.c
index f002f0a..d3c557a 100644
--- a/src/pk-backend-dbus.c
+++ b/src/pk-backend-dbus.c
@@ -424,7 +424,7 @@ pk_backend_dbus_set_locale (PkBackendDbus *backend_dbus, const gchar *locale)
 /**
  * pk_backend_dbus_startup:
  **/
-gboolean
+static gboolean
 pk_backend_dbus_startup (PkBackendDbus *backend_dbus)
 {
 	gboolean ret;
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index 64d5ca1..a41b775 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -151,7 +151,7 @@ pk_transaction_list_role_present (PkTransactionList *tlist, PkRoleEnum role)
 /**
  * pk_transaction_list_item_free:
  **/
-void
+static void
 pk_transaction_list_item_free (PkTransactionItem *item)
 {
 	g_return_if_fail (item != NULL);
@@ -170,7 +170,7 @@ pk_transaction_list_item_free (PkTransactionItem *item)
 /**
  * pk_transaction_list_remove_internal:
  **/
-gboolean
+static gboolean
 pk_transaction_list_remove_internal (PkTransactionList *tlist, PkTransactionItem *item)
 {
 	gboolean ret;
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index d6bff31..ec2895b 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -230,7 +230,7 @@ pk_transaction_error_get_type (void)
  *
  * Returns time running in ms
  */
-guint
+static guint
 pk_transaction_get_runtime (PkTransaction *transaction)
 {
 	g_return_val_if_fail (PK_IS_TRANSACTION (transaction), 0);
@@ -256,7 +256,7 @@ pk_transaction_set_role (PkTransaction *transaction, PkRoleEnum role)
 /**
  * pk_transaction_get_text:
  **/
-gchar *
+static gchar *
 pk_transaction_get_text (PkTransaction *transaction)
 {
 	PkPackageId *id;
@@ -1332,7 +1332,7 @@ pk_transaction_search_check (const gchar *search, GError **error)
 /**
  * pk_transaction_filter_check:
  **/
-gboolean
+static gboolean
 pk_transaction_filter_check (const gchar *filter, GError **error)
 {
 	gchar **sections;
@@ -1452,7 +1452,7 @@ out:
 /**
  * pk_transaction_dbus_return_error:
  **/
-void
+static void
 pk_transaction_dbus_return_error (DBusGMethodInvocation *context, GError *error)
 {
 	/* not set inside the test suite */
@@ -1467,7 +1467,7 @@ pk_transaction_dbus_return_error (DBusGMethodInvocation *context, GError *error)
 /**
  * pk_transaction_dbus_return:
  **/
-void
+static void
 pk_transaction_dbus_return (DBusGMethodInvocation *context)
 {
 	/* not set inside the test suite */
commit 13168c11bae350b5a4d8fcf2a03e54999c8f9a47
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 13:31:02 2008 +0000

    trivial: don't do pointer arithmatic on pointers to fix compile on ARM

diff --git a/src/pk-store.c b/src/pk-store.c
index 62b3be8..07f03d6 100644
--- a/src/pk-store.c
+++ b/src/pk-store.c
@@ -177,7 +177,7 @@ pk_store_set_pointer (PkStore *store, const gchar *key, gpointer data)
 		return FALSE;
 	}
 	egg_debug ("saving %p for %s", data, key);
-	g_hash_table_insert (store->priv->hash_pointer, g_strdup (key), data+1);
+	g_hash_table_insert (store->priv->hash_pointer, g_strdup (key), GINT_TO_POINTER(GPOINTER_TO_INT(data)+1));
 	return TRUE;
 }
 
@@ -293,7 +293,7 @@ pk_store_get_pointer (const PkStore *store, const gchar *key)
 		egg_warning ("not set data for %s", key);
 		return NULL;
 	}
-	return value-1;
+	return GINT_TO_POINTER(GPOINTER_TO_INT(value)-1);
 }
 
 /**
commit 78f136141f4244ec323083411eca1392dda84361
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 13:29:47 2008 +0000

    trivial: include our own header

diff --git a/src/pk-shared.c b/src/pk-shared.c
index 65fa781..dd404ac 100644
--- a/src/pk-shared.c
+++ b/src/pk-shared.c
@@ -32,6 +32,7 @@
 #include <glib/gstdio.h>
 
 #include "egg-debug.h"
+#include "pk-shared.h"
 
 /**
  * pk_directory_remove_contents:
commit 015db51b2a0cf0ccd4497e3179ff951c67b4fb22
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 13:28:49 2008 +0000

    trivial: remove duplicate definition

diff --git a/lib/packagekit-glib/pk-client.h b/lib/packagekit-glib/pk-client.h
index ac1dc86..8af8870 100644
--- a/lib/packagekit-glib/pk-client.h
+++ b/lib/packagekit-glib/pk-client.h
@@ -316,9 +316,6 @@ gboolean	 pk_client_rollback			(PkClient	*client,
 							 const gchar	*transaction_id,
 							 GError		**error)
 							 G_GNUC_WARN_UNUSED_RESULT;
-gboolean	 pk_client_cancel			(PkClient	*client,
-							 GError		**error)
-							 G_GNUC_WARN_UNUSED_RESULT;
 gboolean	 pk_client_requeue			(PkClient	*client,
 							 GError		**error)
 							 G_GNUC_WARN_UNUSED_RESULT;
commit bd178cc5a8231cb3b5ddd65a1ef7992286650447
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 13:27:37 2008 +0000

    feature: Resolve() is now case sensitive

diff --git a/src/org.freedesktop.PackageKit.Transaction.xml b/src/org.freedesktop.PackageKit.Transaction.xml
index 3dec4c0..1ba3348 100644
--- a/src/org.freedesktop.PackageKit.Transaction.xml
+++ b/src/org.freedesktop.PackageKit.Transaction.xml
@@ -943,6 +943,10 @@
             <doc:para>
               An array of package names, e.g. <doc:tt>scribus-clipart</doc:tt>.
             </doc:para>
+            <doc:para>
+              The package names are case sensitive, so for instance:
+              <doc:tt>Resolve('Packagekit')</doc:tt> would not match <doc:tt>PackageKit</doc:tt>.
+            </doc:para>
           </doc:summary>
         </doc:doc>
       </arg>
commit 87c4f9d7ef1a612e9f90719ac38deca81f988d39
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 13:17:19 2008 +0000

    trivial: update screenshot

diff --git a/docs/html/img/gpk-log.png b/docs/html/img/gpk-log.png
index d1cad09..871ba39 100644
Binary files a/docs/html/img/gpk-log.png and b/docs/html/img/gpk-log.png differ
commit bdb98c10a010e75ef4f840eae441dcfcb51dbd2a
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 13:16:07 2008 +0000

    trivial: compile time optimisation

diff --git a/lib/packagekit-glib/egg-debug.h b/lib/packagekit-glib/egg-debug.h
index e3df542..c935dcb 100644
--- a/lib/packagekit-glib/egg-debug.h
+++ b/lib/packagekit-glib/egg-debug.h
@@ -76,7 +76,7 @@ void		egg_warning_real		(const gchar	*func,
 void		egg_error_real			(const gchar	*func,
 						 const gchar	*file,
 						 int		 line,
-						 const gchar	*format, ...) __attribute__((format (printf,4,5)));
+						 const gchar	*format, ...) G_GNUC_NORETURN __attribute__((format (printf,4,5)));
 
 G_END_DECLS
 
commit 910769481e364b197ec67b065397990a93008689
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 13:10:22 2008 +0000

    trivial: remove unused include path

diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am
index 8e8b035..b3047d4 100644
--- a/docs/api/Makefile.am
+++ b/docs/api/Makefile.am
@@ -80,7 +80,6 @@ INCLUDES =						\
 	$(GLIB_CFLAGS)					\
 	-I$(top_builddir)/lib/packagekit-glib		\
 	-I$(top_srcdir)/lib/packagekit-glib		\
-	-I$(top_srcdir)/libselftest			\
 	$(NULL)
 
 PK_GLIB_LIBS = $(top_builddir)/lib/packagekit-glib/libpackagekit-glib.la
commit 47baf4ac451b91ce49106f4e10b570d095c9191d
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 23 13:06:43 2008 +0000

    trivial: fix build in ruck client

diff --git a/contrib/ruck/src/Makefile.am b/contrib/ruck/src/Makefile.am
index 6b84957..670e969 100644
--- a/contrib/ruck/src/Makefile.am
+++ b/contrib/ruck/src/Makefile.am
@@ -7,7 +7,6 @@ rucksupport_DATA = 			\
 	ruckcommand.py			\
 	ruckmain.py			\
 	ruckformat.py			\
-	rucklocks.py 			\
 	ruckyum.py    			\
 	rucktalk.py
 
commit fbf993a078240e35bdeac846048a524c269fa9c8
Author: Adrien BUSTANY <madcat at mymadcat.com>
Date:   Sun Dec 21 22:29:39 2008 +0100

    QPackageKit : Revert the threaded polkit as it breaks everything

diff --git a/lib/packagekit-qt/src/CMakeLists.txt b/lib/packagekit-qt/src/CMakeLists.txt
index c834e67..dea923c 100644
--- a/lib/packagekit-qt/src/CMakeLists.txt
+++ b/lib/packagekit-qt/src/CMakeLists.txt
@@ -27,7 +27,6 @@ set( lib_SRCS
 	transactionproxy.cpp
 	package.cpp
 	polkitclient.cpp
-	polkitthread.cpp
 	util.cpp
 )
 
diff --git a/lib/packagekit-qt/src/polkitclient.cpp b/lib/packagekit-qt/src/polkitclient.cpp
index 6858393..7998752 100644
--- a/lib/packagekit-qt/src/polkitclient.cpp
+++ b/lib/packagekit-qt/src/polkitclient.cpp
@@ -24,7 +24,6 @@
 #endif
 
 #include "polkitclient.h"
-#include "polkitthread.h"
 
 using namespace PackageKit;
 
@@ -41,14 +40,18 @@ PolkitClient::PolkitClient(QObject *parent) : QObject(parent) {
 
 #ifdef USE_SECURITY_POLKIT
 bool PolkitClient::getAuth(const QString &action) {
-    PolkitThread polThread(action);
-    polThread.start();
-    while (!polThread.finished())
-    {
-        polThread.wait(POLICYTHREADINTERVAL);
-        qApp->processEvents();
-    }
-    return polThread.allowed();
+	DBusError e;
+	dbus_error_init(&e);
+
+	if(polkit_check_auth(QCoreApplication::applicationPid(), action.toAscii().data(), NULL))
+		return true;
+
+	bool auth = polkit_auth_obtain(action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
+	if(!auth) {
+		qDebug() << "Authentification error :" << e.name << ":" << e.message;
+	}
+
+	return auth;
 }
 #else
 bool PolkitClient::getAuth(const QString &action) {
diff --git a/lib/packagekit-qt/src/polkitclient.h b/lib/packagekit-qt/src/polkitclient.h
index 940a0d1..2b8bd91 100644
--- a/lib/packagekit-qt/src/polkitclient.h
+++ b/lib/packagekit-qt/src/polkitclient.h
@@ -23,10 +23,6 @@
 
 #include <QtCore>
 
-// interval for processing events to prevent
-// freezed ui while waiting for blocking polkit_auth_obtain()
-#define POLICYTHREADINTERVAL 500 // in ms
-
 namespace PackageKit {
 
 class PolkitClient : QObject{
diff --git a/lib/packagekit-qt/src/polkitthread.cpp b/lib/packagekit-qt/src/polkitthread.cpp
deleted file mode 100644
index 5d1052c..0000000
--- a/lib/packagekit-qt/src/polkitthread.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifdef USE_SECURITY_POLKIT
-#include <polkit-dbus/polkit-dbus.h>
-#endif
-
-#include "polkitthread.h"
-
-using namespace PackageKit;
-
-PolkitThread::PolkitThread(const QString &action)
-: _allowed( false )
-, _finished( false )
-{
-	_action = action;
-}
-
-
-bool PolkitThread::allowed()
-{
-	return _allowed;
-}
-
-bool PolkitThread::finished()
-{
-	return _finished;
-}
-
-
-#ifdef USE_SECURITY_POLKIT
-void PolkitThread::run()
-{
-	DBusError e;
-	dbus_error_init(&e);
-
-	if(polkit_check_auth(QCoreApplication::applicationPid(), _action.toAscii().data(), NULL))
-	{
-		_allowed = true;
-		_finished = true;
-		exit();
-		return;
-	}
-
-	_allowed = polkit_auth_obtain(_action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
-	if(!_allowed) {
-		qDebug() << "Authentification error :" << e.name << ":" << e.message;
-	}
-	_finished = true;
-	exit();
-}
-#else
-void PolkitThread::run()
-{
-	_allowed = true;
-	_finished = true;
-	exit();
-}
-#endif
-
-#include "polkitthread.moc"
diff --git a/lib/packagekit-qt/src/polkitthread.h b/lib/packagekit-qt/src/polkitthread.h
deleted file mode 100644
index ffcc746..0000000
--- a/lib/packagekit-qt/src/polkitthread.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef POLKITHREAD_H
-#define POLKITHREAD_H
-
-#include <QtCore>
-
-namespace PackageKit {
-
-class PolkitThread : public QThread
-{
-	Q_OBJECT
-public:
-	void run();
-	bool allowed();	
-	bool finished();
-	PolkitThread(const QString &action );
-private:
-	bool _allowed;
-	bool _finished;
-	QString _action;
-};
-
-} // End namespace PackageKit
-
-#endif
commit 59153b060d6ba395e58eed4db0ba1cf60956f533
Author: Adrien BUSTANY <madcat at mymadcat.com>
Date:   Sun Dec 21 21:52:31 2008 +0100

    Remove old README

diff --git a/lib/packagekit-qt/README b/lib/packagekit-qt/README
deleted file mode 100644
index 6a1f6c5..0000000
--- a/lib/packagekit-qt/README
+++ /dev/null
@@ -1,23 +0,0 @@
-QPackageKit is a library to control the PackageKit [1] daemon. It's written in
-pure C++/Qt, and abstracts the DBus interface so that it's easy to interact
-with the daemon.
-This lib needs PK > 0.3.5
-
-The code can be checked out at this address :
-git://maison.mymadcat.com/QPackageKit2
-
-There's also a gitweb here :
-http://maison.mymadcat.com/git/?p=QPackageKit2.git/.git;a=summary
-
-Requirements :
-All you need to build the lib is cmake, and Qt4. You will need CppUnnit if you
-want to build the unit tests, which you most likely don't.
-
-Build and install:
-It's always better to build in a separate folder. In the root folder, do :
-mkdir build && cd build && cmake ..
-then you can run the standard make / make install procedure
-If you want to build the unit tests, run cmake -DBUILD_TESTS=1 ..
-
-Bugs:
-All bugs/suggestions should be reported to madcat AT mymadcat DOT com
commit 48c4f3eed7191229ed33c6454b1a9e20d3901e1a
Merge: ad9198c... a061665...
Author: Aidan Skinner <aidan at skinner.me.uk>
Date:   Sat Dec 20 22:35:22 2008 +0000

    Merge branch 'master' of git+ssh://aidan@git.packagekit.org/srv/git/PackageKit

commit ad9198c67d33507eec9a7143f1269d3da146fd2b
Author: Aidan Skinner <aidan at skinner.me.uk>
Date:   Sat Dec 20 22:34:47 2008 +0000

    ruck: remove locks, since they're out of scope for PackageKit. Fix search.

diff --git a/contrib/ruck/src/rucklocks.py b/contrib/ruck/src/rucklocks.py
deleted file mode 100644
index 4f76aca..0000000
--- a/contrib/ruck/src/rucklocks.py
+++ /dev/null
@@ -1,67 +0,0 @@
-import os.path
-import ruckyum
-
-def add_excludes():
-    yum = ruckyum.get_yum ()
-
-    for (repostr, lock) in get_locks():
-        if repostr == None:
-            repostr = '*'
-
-        for repo in yum.repos.findRepos(repostr):
-            excludes = repo.getAttribute('exclude')
-            if excludes is None:
-                excludes = []
-
-            excludes.append(lock)
-            repo.setAttribute('exclude', excludes)
-
-    for repo in yum.repos.listEnabled():
-        try:
-            yum.excludePackages(repo)
-        except:
-            #sometimes it bitches about pkgSack not existing, wtf?
-            pass
-
-def get_locks():
-    locks = []
-
-    try:
-        f = file(os.path.join(ruckyum.get_yum().conf.cachedir, 'locks'))
-        lines = f.readlines()
-        for line in lines:
-            split_line = line.strip().split(';')
-            repo = split_line[0]
-            if repo == '':
-                repo = None
-
-            locks.append((repo, split_line[1]))
-
-        f.close()
-    except IOError:
-        locks = []
-
-    return locks
-
-def add_lock(lock, repo=None):
-    locks = get_locks()
-    locks.append((repo, lock))
-    save_locks(locks)
-
-def remove_lock(index):
-    locks = get_locks()
-    locks.remove(locks[index])
-    save_locks(locks)
-
-def save_locks(locks):
-    f = file(os.path.join(ruckyum.get_yum().conf.cachedir, 'locks'), 'w+')
-    for (repo, lock) in locks:
-        if repo is None:
-            repo = ''
-
-        f.write("%s;%s\n" % (repo, lock))
-
-    f.close()
-
-def init():
-    ruckyum.init_funcs.append(add_excludes)
diff --git a/contrib/ruck/src/ruckpackagecmds.py b/contrib/ruck/src/ruckpackagecmds.py
index c88e723..5edfde4 100644
--- a/contrib/ruck/src/ruckpackagecmds.py
+++ b/contrib/ruck/src/ruckpackagecmds.py
@@ -597,14 +597,14 @@ class PackageSearchCmd(PackageCmd):
         else:
             method = pkcon.search_name
 
-        filter = "none"
+        filter = pkenums.FILTER_NONE
         if options_dict.has_key('installed-only'):
-            filter = "installed"
+            filter = pkenums.FILTER_INSTALLED
         elif options_dict.has_key('uninstalled-only'):
-            filter = '~installed'
+            filter = pkenums.FILTER_NOT_INSTALLED
 
         result = {}
-        matches = method(filter, non_option_args[0])
+        matches = method(non_option_args[0], filter)
         if len(matches) > 0:
             table_keys = ["installed", "repo", "name", "version"]
             table_rows = []
commit a06166522b7380481bbfd0e18db796d29e21f9b4
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Dec 19 16:08:42 2008 +0000

    trivial: remove pk_strv_to_text, it's nothing we can't do without g_strjoinv

diff --git a/backends/pisi/pk-backend-pisi.c b/backends/pisi/pk-backend-pisi.c
index 8489fe2..232d086 100644
--- a/backends/pisi/pk-backend-pisi.c
+++ b/backends/pisi/pk-backend-pisi.c
@@ -209,7 +209,7 @@ backend_install_files (PkBackend *backend, gboolean trusted, gchar **full_paths)
 	gchar *package_ids_temp;
 
 	/* send the complete list as stdin */
-	package_ids_temp = pk_strv_to_text (full_paths, PK_BACKEND_SPAWN_FILENAME_DELIM);
+	package_ids_temp = g_strjoinv (PK_BACKEND_SPAWN_FILENAME_DELIM, full_paths);
 	pk_backend_spawn_helper (spawn, "pisiBackend.py", "install-files", pk_backend_bool_to_text (trusted), package_ids_temp, NULL);
 	g_free (package_ids_temp);
 }
diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index b8abc59..613ff79 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -279,7 +279,7 @@ backend_install_files (PkBackend *backend, gboolean trusted, gchar **full_paths)
 	gchar *full_paths_temp;
 
 	/* send the complete list as stdin */
-	full_paths_temp = pk_strv_to_text (full_paths, PK_BACKEND_SPAWN_FILENAME_DELIM);
+	full_paths_temp = g_strjoinv (PK_BACKEND_SPAWN_FILENAME_DELIM, full_paths);
 	pk_backend_spawn_helper (spawn, BACKEND("install-files"), pk_backend_bool_to_text (trusted), full_paths_temp, NULL);
 	g_free (full_paths_temp);
 }
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index 7631ab8..d5fa7c8 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -48,7 +48,7 @@ backend_stderr_cb (PkBackend *backend, const gchar *output)
 static gboolean
 backend_stdout_cb (PkBackend *backend, const gchar *output)
 {
-	/* unsigned rpm, this will be picked up by yum and and exception will be thrown */
+	/* presto is much too verbose... */
 	if (strstr (output, "Presto") != NULL)
 		return FALSE;
 	return TRUE;
@@ -142,9 +142,8 @@ backend_get_mime_types (PkBackend *backend)
 static const gchar *
 pk_backend_bool_to_text (gboolean value)
 {
-	if (value == TRUE) {
+	if (value == TRUE)
 		return "yes";
-	}
 	return "no";
 }
 
@@ -301,7 +300,7 @@ backend_install_files (PkBackend *backend, gboolean trusted, gchar **full_paths)
 	gchar *package_ids_temp;
 
 	/* send the complete list as stdin */
-	package_ids_temp = pk_strv_to_text (full_paths, PK_BACKEND_SPAWN_FILENAME_DELIM);
+	package_ids_temp = g_strjoinv (PK_BACKEND_SPAWN_FILENAME_DELIM, full_paths);
 	pk_backend_spawn_helper (spawn, "yumBackend.py", "install-files", pk_backend_bool_to_text (trusted), package_ids_temp, NULL);
 	g_free (package_ids_temp);
 }
diff --git a/lib/packagekit-glib/pk-common.c b/lib/packagekit-glib/pk-common.c
index 1111872..eec603e 100644
--- a/lib/packagekit-glib/pk-common.c
+++ b/lib/packagekit-glib/pk-common.c
@@ -306,7 +306,7 @@ pk_strvalidate_char (gchar item)
  * @text: The input text to make safe
  *
  * Replaces chars in the text that may be dangerous, or that may print
- * incorrectly. These chars include new lines, tabs and quotes, and are
+ * incorrectly. These chars include new lines, tabs and line feed, and are
  * replaced by spaces.
  *
  * Return value: the new string with no insane chars
@@ -461,52 +461,6 @@ pk_va_list_to_argv (const gchar *string_first, va_list *args)
 	return array;
 }
 
-/**
- * pk_strv_to_text:
- * @array: a string array of package_id's
- *
- * Cats the string array of package_id's into one tab delimited string
- *
- * Return value: a string representation of all the package_id's.
- **/
-gchar *
-pk_strv_to_text (gchar **array, const gchar *delimiter)
-{
-	guint i;
-	guint size;
-	GString *string;
-	gchar *string_ret;
-
-	g_return_val_if_fail (array != NULL, NULL);
-	g_return_val_if_fail (delimiter != NULL, NULL);
-
-	string = g_string_new ("");
-
-	/* print all */
-	size = g_strv_length (array);
-
-	/* shortcut */
-	if (size == 1)
-		return g_strdup (array[0]);
-
-	/* append with delimiter */
-	for (i=0; i<size; i++) {
-		g_string_append (string, array[i]);
-		g_string_append (string, delimiter);
-	}
-
-	/* ITS4: ignore, we check this for validity */
-	size = strlen (delimiter);
-
-	/* remove trailing delimiter */
-	if (string->len > size)
-		g_string_set_size (string, string->len-size);
-
-	string_ret = g_string_free (string, FALSE);
-
-	return string_ret;
-}
-
 /***************************************************************************
  ***                          MAKE CHECK TESTS                           ***
  ***************************************************************************/
@@ -532,7 +486,6 @@ pk_common_test (EggTest *test)
 {
 	gboolean ret;
 	gchar **array;
-	gchar *text;
 	gchar *text_safe;
 	gchar *present;
 	guint seconds;
@@ -575,17 +528,6 @@ pk_common_test (EggTest *test)
 		egg_test_failed (test, "incorrect array '%s','%s','%s'", array[0], array[1], array[2]);
 	g_strfreev (array);
 
-	/************************************************************/
-	egg_test_title (test, "to text");
-	array = pk_va_list_to_argv_test ("richard", "phillip", "hughes", NULL);
-	text = pk_strv_to_text (array, "\t");
-	if (egg_strequal (text, "richard\tphillip\thughes"))
-		egg_test_success (test, NULL);
-	else
-		egg_test_failed (test, NULL);
-	g_free (text);
-	g_strfreev (array);
-
 	/************************************************************
 	 ****************        validate text         **************
 	 ************************************************************/
diff --git a/lib/packagekit-glib/pk-common.h b/lib/packagekit-glib/pk-common.h
index 5d3391b..ee67ca3 100644
--- a/lib/packagekit-glib/pk-common.h
+++ b/lib/packagekit-glib/pk-common.h
@@ -90,9 +90,6 @@ gchar		*pk_iso8601_from_date			(const GDate	*date);
 GDate		*pk_iso8601_to_date			(const gchar	*iso_date);
 gchar		*pk_get_distro_id			(void)
 							 G_GNUC_WARN_UNUSED_RESULT;
-gchar		*pk_strv_to_text			(gchar		**package_ids,
-							 const gchar	*delimiter)
-							 G_GNUC_WARN_UNUSED_RESULT;
 
 G_END_DECLS
 
diff --git a/lib/packagekit-glib/pk-package-ids.c b/lib/packagekit-glib/pk-package-ids.c
index 7f184e5..e4a39be 100644
--- a/lib/packagekit-glib/pk-package-ids.c
+++ b/lib/packagekit-glib/pk-package-ids.c
@@ -173,7 +173,7 @@ pk_package_ids_size (gchar **package_ids)
  * pk_package_ids_to_text:
  * @package_ids: a string array of package_id's
  *
- * Cats the string array of package_id's into one tab delimited string
+ * Cats the string array of package_id's into one delimited string
  *
  * Return value: a string representation of all the package_id's.
  **/
@@ -183,7 +183,7 @@ pk_package_ids_to_text (gchar **package_ids)
 	/* special case as this is allowed */
 	if (package_ids == NULL)
 		return g_strdup ("(null)");
-	return pk_strv_to_text (package_ids, PK_PACKAGE_IDS_DELIM);
+	return g_strjoinv (PK_PACKAGE_IDS_DELIM, package_ids);
 }
 
 /***************************************************************************
commit 828d3abd6f68a75c5d7ca3ef767ea36727305840
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Dec 19 16:08:19 2008 +0000

    trivial: remove the test-db in the test suite

diff --git a/src/pk-transaction-db.c b/src/pk-transaction-db.c
index 95bfec7..cad4743 100644
--- a/src/pk-transaction-db.c
+++ b/src/pk-transaction-db.c
@@ -624,6 +624,7 @@ pk_transaction_db_new (void)
  ***                          MAKE CHECK TESTS                           ***
  ***************************************************************************/
 #ifdef EGG_TEST
+#include <glib/gstdio.h>
 #include "egg-test.h"
 
 void
@@ -642,6 +643,11 @@ pk_transaction_db_test (EggTest *test)
 	return;
 #endif
 
+	/* remove the self check file */
+#if PK_BUILD_LOCAL
+	g_unlink (PK_TRANSACTION_DB_FILE);
+#endif
+
 	db = pk_transaction_db_new ();
 
 	/************************************************************/
commit 439459bb1434a8a9aa810e16a943b3ebbbd7f20e
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Dec 19 15:52:03 2008 +0000

    trivial: fix make check now we've replaced double quotes

diff --git a/lib/packagekit-glib/pk-common.c b/lib/packagekit-glib/pk-common.c
index f04ef5b..1111872 100644
--- a/lib/packagekit-glib/pk-common.c
+++ b/lib/packagekit-glib/pk-common.c
@@ -635,7 +635,7 @@ pk_common_test (EggTest *test)
 
 	/************************************************************/
 	egg_test_title (test, "test replace unsafe (one invalid)");
-	text_safe = pk_strsafe ("Richard\tHughes");
+	text_safe = pk_strsafe ("Richard\rHughes");
 	if (egg_strequal (text_safe, "Richard Hughes"))
 		egg_test_success (test, NULL);
 	else
@@ -643,17 +643,8 @@ pk_common_test (EggTest *test)
 	g_free (text_safe);
 
 	/************************************************************/
-	egg_test_title (test, "test replace unsafe (one invalid 2)");
-	text_safe = pk_strsafe ("Richard\"Hughes\"");
-	if (egg_strequal (text_safe, "Richard Hughes "))
-		egg_test_success (test, NULL);
-	else
-		egg_test_failed (test, "failed the replace unsafe '%s'", text_safe);
-	g_free (text_safe);
-
-	/************************************************************/
 	egg_test_title (test, "test replace unsafe (multiple invalid)");
-	text_safe = pk_strsafe (" Richard\"Hughes\"");
+	text_safe = pk_strsafe (" Richard\rHughes\f");
 	if (egg_strequal (text_safe, " Richard Hughes "))
 		egg_test_success (test, NULL);
 	else


More information about the PackageKit-commit mailing list