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

Richard Hughes hughsient at kemper.freedesktop.org
Sun Mar 16 16:20:44 PDT 2008


 TODO                                    |    8 
 backends/dummy/pk-backend-dummy.c       |    7 
 backends/poldek/pk-backend-poldek.c     |   93 +------
 backends/yum/helpers/yumBackend.py      |   35 --
 backends/yum2/helpers/yumDBUSBackend.py |   62 +++-
 backends/zypp/pk-backend-zypp.cpp       |  416 ++++++++++++++++++++++----------
 backends/zypp/zypp-utils.cpp            |   31 ++
 backends/zypp/zypp-utils.h              |    7 
 client/pk-console.c                     |   16 -
 data/packagekit-background              |    5 
 data/packagekit-background.cron         |    5 
 docs/html/pk-faq.html                   |   24 -
 docs/html/pk-using.html                 |    2 
 libpackagekit/pk-client.c               |    7 
 libpackagekit/pk-client.h               |   21 +
 libpackagekit/pk-common.c               |    5 
 libpackagekit/pk-connection.c           |    2 
 libpackagekit/pk-connection.h           |   12 
 libpackagekit/pk-debug.c                |    2 
 libpackagekit/pk-enum-list.c            |   10 
 libpackagekit/pk-enum-list.h            |   12 
 libpackagekit/pk-extra.c                |   13 -
 libpackagekit/pk-extra.h                |   13 -
 libpackagekit/pk-filter.c               |    2 
 libpackagekit/pk-job-list.c             |    2 
 libpackagekit/pk-job-list.h             |   12 
 libpackagekit/pk-network-dummy.c        |    4 
 libpackagekit/pk-network-nm.c           |    2 
 libpackagekit/pk-network.h              |   12 
 libpackagekit/pk-package-ids.c          |   10 
 libpackagekit/pk-package-list.c         |    2 
 libpackagekit/pk-package-list.h         |   12 
 libpackagekit/pk-polkit-client.c        |    2 
 libpackagekit/pk-polkit-client.h        |   12 
 libpackagekit/pk-task-list.c            |    2 
 libpackagekit/pk-task-list.h            |   12 
 python/packagekit/backend.py            |    6 
 python/packagekit/daemonBackend.py      |   17 +
 src/pk-backend.c                        |    2 
 src/pk-backend.h                        |    2 
 src/pk-engine.c                         |    6 
 src/pk-runner.c                         |   14 -
 src/pk-thread-list.c                    |    4 
 src/pk-transaction-db.c                 |    8 
 44 files changed, 592 insertions(+), 361 deletions(-)

New commits:
commit 54e86b263e87687fa395d4a6e6bdddba4780364c
Merge: ab51cbe... f5abbf3...
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Mar 16 23:01:49 2008 +0000

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

commit f5abbf3ae305483722d35f4286a595c6596c8304
Merge: 3a46336... 4169b76...
Author: Luke Macken <lmacken at redhat.com>
Date:   Sun Mar 16 18:54:57 2008 -0400

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

commit ab51cbe53fe5369630547a7ca32f11bdb33be941
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Mar 16 22:28:02 2008 +0000

    fix another sparse warning

diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index ca4ea38..13b2bd9 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -405,7 +405,7 @@ backend_search_group (PkBackend *backend, const gchar *filter, const gchar *sear
 /**
  * backend_search_name_timeout:
  **/
-gboolean
+static gboolean
 backend_search_name_timeout (gpointer data)
 {
 	PkBackend *backend = (PkBackend *) data;
commit 4169b7628d982498f3b3a78b8dccebc11be8cd7c
Merge: 34c5a92... 60cbfbd...
Author: Marcin Banasiak <megabajt at pld-linux.org>
Date:   Sun Mar 16 21:59:18 2008 +0100

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

commit 3a46336800350f2143e7ef0ba55a54898014a43c
Author: Luke Macken <lmacken at redhat.com>
Date:   Sun Mar 16 16:31:06 2008 -0400

    Backend unicode handling improvements
    
    - Set sys.stdout to the utf-8 codec writer in the backend.py instead of yumBackend.py
    - Rename _toUTF to _to_unicode, to remove ambiguity
    - Make _to_unicode do the Right Thing
    - Don't try to catch UnicodeDecodeErrors.  These should never happen.

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 3c3df77..cba7c5a 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -220,8 +220,6 @@ class PackageKitYumBackend(PackageKitBaseBackend):
               "glibc", "hal", "dbus", "xen")
 
     def __init__(self,args,lock=True):
-        import codecs
-        sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
         signal.signal(signal.SIGQUIT, sigquit)
         PackageKitBaseBackend.__init__(self,args)
         self.yumbase = PackageKitYumBase()
@@ -241,12 +239,8 @@ class PackageKitYumBackend(PackageKitBaseBackend):
         @param bytes: The size of the package, in bytes
         convert the description to UTF before sending
         '''
-        desc = self._toUTF(desc)
-        try:
-            PackageKitBaseBackend.description(self,id,license,group,desc,url,bytes)            
-        except UnicodeDecodeError,e:
-            desc = repr(desc)[1:-1]
-            PackageKitBaseBackend.description(self,id,license,group,desc,url,bytes)
+        desc = self._to_unicode(desc)
+        PackageKitBaseBackend.description(self,id,license,group,desc,url,bytes)
 
     def package(self,id,status,summary):
         '''
@@ -256,23 +250,14 @@ class PackageKitYumBackend(PackageKitBaseBackend):
         @param summary: The package Summary
         convert the summary to UTF before sending
         '''
-        summary = self._toUTF(summary)
-        try:
-            PackageKitBaseBackend.package(self,id,status,summary)
-        except UnicodeDecodeError,e:
-            summary = repr(summary)[1:-1]
-            PackageKitBaseBackend.package(self,id,status,summary)
-
-    def _toUTF( self, txt ):
-        rc=""
-        if isinstance(txt,types.UnicodeType):
-            return txt
-        else:
-            try:
-                rc = unicode( txt, 'utf-8' )
-            except UnicodeDecodeError, e:
-                rc = unicode( txt, 'iso-8859-1' )
-            return rc.encode('utf-8')
+        summary = self._to_unicode(summary)
+        PackageKitBaseBackend.package(self,id,status,summary)
+
+    def _to_unicode(self, txt, encoding='utf-8'):
+        if isinstance(txt, basestring):
+            if not isinstance(txt, unicode):
+                txt = unicode(txt, encoding)
+        return txt
 
     def doLock(self):
         ''' Lock Yum'''
diff --git a/backends/yum2/helpers/yumDBUSBackend.py b/backends/yum2/helpers/yumDBUSBackend.py
index c9642ec..a6aff58 100755
--- a/backends/yum2/helpers/yumDBUSBackend.py
+++ b/backends/yum2/helpers/yumDBUSBackend.py
@@ -264,7 +264,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
         convert the summary to UTF before sending
         '''
         id = self._pkg_to_id(pkg)
-        summary = self._toUTF(pkg.summary)
+        summary = self._to_unicode(pkg.summary)
         self.Package(status,id,summary)
 
     def _show_description(self,id,license,group,desc,url,bytes):
@@ -278,23 +278,18 @@ class PackageKitYumBackend(PackageKitBaseBackend):
         @param bytes: The size of the package, in bytes
         convert the description to UTF before sending
         '''
-        desc = self._toUTF(desc)
+        desc = self._to_unicode(desc)
         self.Description(id,license,group,desc,url,bytes)
 
 #
 # Utility methods for Signals
 #
 
-    def _toUTF( self, txt ):
-        rc=""
-        if isinstance(txt,types.UnicodeType):
-            return txt
-        else:
-            try:
-                rc = unicode( txt, 'utf-8' )
-            except UnicodeDecodeError, e:
-                rc = unicode( txt, 'iso-8859-1' )
-            return rc.encode('utf-8')
+    def _to_unicode(self, txt, encoding='utf-8'):
+        if isinstance(txt, basestring):
+            if not isinstance(txt, unicode):
+                txt = unicode(txt, encoding):
+        return txt
 
     def _pkg_to_id(self,pkg):
         pkgver = self._get_package_ver(pkg)
diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index b27890e..dc0f835 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
@@ -22,8 +22,12 @@
 
 # imports
 import sys
+import codecs
 import traceback
-import types
+import locale
+
+sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
+
 from enums import *
 
 # Classes
commit 60cbfbdf7722ff6253684b0abc69eea2823ad3a3
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Mar 16 20:19:00 2008 +0000

    add a BLOCKED pacakge to the dummy backend for testing

diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index fcaf8d4..ca4ea38 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -467,6 +467,11 @@ backend_update_system_timeout (gpointer data)
 				    "update2;2.19.1-4.fc8;i386;fedora",
 				    "The second update");
 	}
+	if (progress_percentage == 30) {
+		pk_backend_package (backend, PK_INFO_ENUM_BLOCKED,
+				    "update3;2.19.1-4.fc8;i386;fedora",
+				    "The third update");
+	}
 	if (progress_percentage == 40) {
 		pk_backend_set_status (backend, PK_STATUS_ENUM_UPDATE);
 		pk_backend_set_allow_cancel (backend, FALSE);
commit b1934cd671ab7d40a51c99eafa001d23803e212f
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Mar 16 20:18:45 2008 +0000

    clear the package list in case we are promiscuous and watching the update list

diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index d5c1fc1..d0a7d24 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -1359,6 +1359,9 @@ pk_client_update_system (PkClient *client, GError **error)
 	/* save this so we can re-issue it */
 	client->priv->role = PK_ROLE_ENUM_UPDATE_SYSTEM;
 
+	/* clear the package list in case we are promiscuous and watching the update list */
+	pk_package_list_clear (client->priv->package_list);
+
 	/* hopefully do the operation first time */
 	ret = pk_client_update_system_action (client, &error_pk);
 
commit 34c5a9285ae7f2f5ec2a51a1534f5779d8eb0c50
Author: Marcin Banasiak <megabajt at pld-linux.org>
Date:   Sun Mar 16 21:17:03 2008 +0100

    poldek: Force unique package names

diff --git a/backends/poldek/pk-backend-poldek.c b/backends/poldek/pk-backend-poldek.c
index 9dda4a9..36b9642 100644
--- a/backends/poldek/pk-backend-poldek.c
+++ b/backends/poldek/pk-backend-poldek.c
@@ -930,6 +930,9 @@ backend_initalize (PkBackend *backend)
 	
 	poldek_log_set_appender ("PackageKit", NULL, NULL, 0, (poldek_vlog_fn)poldek_backend_log);
 	
+	/* unique package names */
+	poldek_configure (ctx, POLDEK_CONF_OPT, POLDEK_OP_UNIQN, 1);
+	
 	/* poldek has to ask. Otherwise callbacks won't be used */
 	poldek_configure (ctx, POLDEK_CONF_OPT, POLDEK_OP_CONFIRM_INST, 1);
 	poldek_configure (ctx, POLDEK_CONF_OPT, POLDEK_OP_CONFIRM_UNINST, 1);
commit f15824fcb6a59e34f624f767d6ad220dbe53a1b8
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Mar 16 18:46:03 2008 +0000

    disable the cron script by default

diff --git a/data/packagekit-background b/data/packagekit-background
index 45f1901..0a9b845 100644
--- a/data/packagekit-background
+++ b/data/packagekit-background
@@ -1,4 +1,7 @@
-# Don't install, just check (valid: yes|no)
+# should we attempt to do this? (valid: yes|no)
+ENABLED=no
+
+# don't install, just check (valid: yes|no)
 CHECK_ONLY=no
 
 # if MAILTO is set, the mail command is used to deliver PackageKit output
diff --git a/data/packagekit-background.cron b/data/packagekit-background.cron
index ebdde96..0bce800 100644
--- a/data/packagekit-background.cron
+++ b/data/packagekit-background.cron
@@ -11,6 +11,11 @@
 
 [ -f /etc/sysconfig/packagekit-background ] && . /etc/sysconfig/packagekit-background
 
+# are we disabled?
+if [ "$ENABLED" == "no" ]; then
+	exit 1
+fi
+
 # set default for SYSTEMNAME
 [ -z "$SYSTEMNAME" ]  && SYSTEMNAME=$(hostname)
 
commit d5510800d2f0173bbf74c63249968fb71482b477
Author: Richard Hughes <richard at hughsie.com>
Date:   Sun Mar 16 18:40:20 2008 +0000

    update TODO

diff --git a/TODO b/TODO
index d7ece24..46bb125 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,13 @@
 Order of no particular importance:
 
+* Make installing firmware with udev possible:
+  http://lists.freedesktop.org/archives/packagekit/2008-March/002430.html
+
+* Make the Update call into Updates. Big change.
+
+* Fix ServicePack to work correctly:
+  http://lists.freedesktop.org/archives/packagekit/2008-March/002434.html
+
 * Find out why yum doesn't output some package status calls.
 
 * Lots of the functions are not well commented with gtk-doc. Most
commit f270d181215ca5f0d730b473bbeedaf2d871968c
Author: Marcin Banasiak <megabajt at pld-linux.org>
Date:   Sat Mar 15 22:52:57 2008 +0100

    poldek: Use the new PkFilter code

diff --git a/backends/poldek/pk-backend-poldek.c b/backends/poldek/pk-backend-poldek.c
index a30aaf7..9dda4a9 100644
--- a/backends/poldek/pk-backend-poldek.c
+++ b/backends/poldek/pk-backend-poldek.c
@@ -21,6 +21,7 @@
 
 #include <pk-backend.h>
 #include <pk-backend-thread.h>
+#include <pk-filter.h>
 #include <pk-network.h>
 
 #include <log.h>
@@ -52,17 +53,8 @@ enum {
 };
 
 typedef struct {
-	gboolean installed;
-	gboolean notinstalled;
-	gboolean devel;
-	gboolean notdevel;
-	gboolean gui;
-	gboolean notgui;
-} FilterData;
-
-typedef struct {
 	gint		mode;
-	FilterData	*fd;
+	PkFilter	*filter;
 	gchar		*search;
 } SearchData;
 
@@ -766,46 +758,6 @@ poldek_pkg_is_gui (struct pkg *pkg)
 }
 
 /**
- * process_filter:
- */
-static FilterData*
-process_filter (const gchar* filter)
-{
-	FilterData	*fd = g_new0 (FilterData, 1);
-	gchar**		sections = NULL;
-	gint		i = 0;
-	
-	/* by default query all packages */
-	fd->installed = TRUE;
-	fd->notinstalled = TRUE;
-	fd->devel = TRUE;
-	fd->notdevel = TRUE;
-	fd->gui = TRUE;
-	fd->notgui = TRUE;
-	
-	sections = g_strsplit (filter, ";", 0);
-	while (sections[i])
-	{
-		if (strcmp (sections[i], "installed") == 0)
-			fd->notinstalled = FALSE;
-		else if (strcmp (sections[i], "~installed") == 0)
-			fd->installed = FALSE;
-		else if (strcmp (sections[i], "devel") == 0)
-			fd->notdevel = FALSE;
-		else if (strcmp (sections[i], "~devel") == 0)
-			fd->devel = FALSE;
-		else if (strcmp (sections[i], "gui") == 0)
-			fd->notgui = FALSE;
-		else if (strcmp (sections[i], "~gui") == 0)
-			fd->gui = FALSE;
-		i++;
-	}
-	g_strfreev (sections);
-	
-	return fd;
-}
-
-/**
  * search_package:
  */
 static gboolean
@@ -846,7 +798,7 @@ search_package (PkBackendThread *thread, gpointer data)
 		gchar		*command = NULL;
 		tn_array	*pkgs = NULL, *installed = NULL, *available = NULL;
 		
-		if (d->fd->installed)
+		if (d->filter->installed)
 		{
 			command = g_strdup_printf ("cd /installed; %s *%s*", search_inst, d->search);
 			if (poclidek_rcmd_execline (cmd, command))
@@ -854,7 +806,7 @@ search_package (PkBackendThread *thread, gpointer data)
 			
 			g_free (command);
 		}
-		if (d->fd->notinstalled)
+		if (d->filter->not_installed)
 		{
 			command = g_strdup_printf ("cd /all-avail; %s *%s*", search_inst, d->search);
 			if (poclidek_rcmd_execline (cmd, command))
@@ -863,7 +815,7 @@ search_package (PkBackendThread *thread, gpointer data)
 			g_free (command);
 		}
 		
-		if (d->fd->installed && d->fd->notinstalled && installed && available)
+		if (d->filter->installed && d->filter->not_installed && installed && available)
 		{
 			pkgs = n_array_concat_ex (installed, available, (tn_fn_dup)pkg_link);
 			
@@ -872,9 +824,9 @@ search_package (PkBackendThread *thread, gpointer data)
 			n_array_free (installed);
 			n_array_free (available);
 		}
-		else if (!d->fd->installed || available)
+		else if (!d->filter->installed || available)
 			pkgs = available;
-		else if (!d->fd->notinstalled || installed)
+		else if (!d->filter->not_installed || installed)
 			pkgs = installed;
 		
 		if (pkgs)
@@ -886,26 +838,26 @@ search_package (PkBackendThread *thread, gpointer data)
 				struct pkg	*pkg = n_array_nth (pkgs, i);
 				
 				/* development filter */
-				if (!d->fd->devel || !d->fd->notdevel)
+				if (!d->filter->devel || !d->filter->not_devel)
 				{
 					/* devel in filter */
-					if (d->fd->devel && !poldek_pkg_is_devel (pkg))
+					if (d->filter->devel && !poldek_pkg_is_devel (pkg))
 						continue;
 					
 					/* ~devel in filter */
-					if (d->fd->notdevel && poldek_pkg_is_devel (pkg))
+					if (d->filter->not_devel && poldek_pkg_is_devel (pkg))
 						continue;
 				}
 				
 				/* gui filter */
-				if (!d->fd->gui || !d->fd->notgui)
+				if (!d->filter->gui || !d->filter->not_gui)
 				{
 					/* gui in filter */
-					if (d->fd->gui && !poldek_pkg_is_gui (pkg))
+					if (d->filter->gui && !poldek_pkg_is_gui (pkg))
 						continue;
 					
 					/* ~gui in filter */
-					if (d->fd->notgui && poldek_pkg_is_gui (pkg))
+					if (d->filter->not_gui && poldek_pkg_is_gui (pkg))
 						continue;
 				}
 				
@@ -921,7 +873,7 @@ search_package (PkBackendThread *thread, gpointer data)
 		poclidek_rcmd_free (cmd);
 	}
 	
-	g_free (d->fd);
+	pk_filter_free (d->filter);
 	g_free (d->search);
 	g_free (d);
 	
@@ -1595,7 +1547,7 @@ backend_resolve (PkBackend *backend, const gchar *filter, const gchar *package)
 		pk_backend_finished (backend);
 	} else {
 		data->mode = SEARCH_ENUM_NAME;
-		data->fd = process_filter (filter);
+		data->filter = pk_filter_new_from_string (filter);
 		data->search = g_strdup (package);
 		pk_backend_thread_create (thread, search_package, data);
 	}
@@ -1619,7 +1571,7 @@ backend_search_details (PkBackend *backend, const gchar *filter, const gchar *se
 		pk_backend_finished (backend);
 	} else {
 		data->mode = SEARCH_ENUM_DETAILS;
-		data->fd = process_filter (filter);
+		data->filter = pk_filter_new_from_string (filter);
 		data->search = g_strdup (search);
 		pk_backend_thread_create (thread, search_package, data);
 	}
@@ -1643,7 +1595,7 @@ backend_search_file (PkBackend *backend, const gchar *filter, const gchar *searc
 		pk_backend_finished (backend);
 	} else {
 		data->mode = SEARCH_ENUM_FILE;
-		data->fd = process_filter (filter);
+		data->filter = pk_filter_new_from_string (filter);
 		data->search = g_strdup (search);
 		pk_backend_thread_create (thread, search_package, data);
 	}
@@ -1667,7 +1619,7 @@ backend_search_group (PkBackend *backend, const gchar *filter, const gchar *sear
 		pk_backend_finished (backend);
 	} else {
 		data->mode = SEARCH_ENUM_GROUP;
-		data->fd = process_filter (filter);
+		data->filter = pk_filter_new_from_string (filter);
 		data->search = g_strdup (search);
 		pk_backend_thread_create (thread, search_package, data);
 	}
@@ -1691,7 +1643,7 @@ backend_search_name (PkBackend *backend, const gchar *filter, const gchar *searc
 		pk_backend_finished (backend);
 	} else {
 		data->mode = SEARCH_ENUM_NAME;
-		data->fd = process_filter (filter);
+		data->filter = pk_filter_new_from_string (filter);
 		data->search = g_strdup (search);
 		pk_backend_thread_create (thread, search_package, data);
 	}
commit 51b65e95510779847abd9689309e436c222cc72e
Author: Marcin Banasiak <megabajt at pld-linux.org>
Date:   Sat Mar 15 22:23:42 2008 +0100

    poldek: Add missing parameters to RemovePackage and GetUpdates

diff --git a/backends/poldek/pk-backend-poldek.c b/backends/poldek/pk-backend-poldek.c
index 41dcc61..a30aaf7 100644
--- a/backends/poldek/pk-backend-poldek.c
+++ b/backends/poldek/pk-backend-poldek.c
@@ -1336,7 +1336,7 @@ backend_get_updates_thread (PkBackendThread *thread, gpointer data)
 }
 
 static void
-backend_get_updates (PkBackend *backend)
+backend_get_updates (PkBackend *backend, const gchar *filter)
 {
 	g_return_if_fail (backend != NULL);	
 	
@@ -1558,7 +1558,7 @@ backend_remove_package_thread (PkBackendThread *thread, gpointer data)
 }
 
 static void
-backend_remove_package (PkBackend *backend, const gchar *package_id, gboolean allow_deps)
+backend_remove_package (PkBackend *backend, const gchar *package_id, gboolean allow_deps, gboolean autoremove)
 {
 	RemoveData	*data = g_new0 (RemoveData, 1);
 	
commit 4592016c72d0f582a148f6de4c3583bc9efe9eba
Author: Scott Reeves <sreeves at novell.com>
Date:   Thu Mar 13 17:15:13 2008 -0600

    Update zypp status and fix crash

diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index 10eb19e..5ac5c2e 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -727,7 +727,7 @@ backend_get_updates (PkBackend *backend, const gchar *filter)
 static gboolean
 backend_get_update_detail_thread (PkBackendThread *thread, gpointer data)
 {
-        PkBackend *backend;
+	PkBackend *backend;
 	PkPackageId *pi;
 	ThreadData *d = (ThreadData*) data;
 
@@ -743,48 +743,48 @@ backend_get_update_detail_thread (PkBackendThread *thread, gpointer data)
 	}
 	pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
 
-        zypp::sat::Solvable solvable = zypp_get_package_by_id (d->package_id);
+	zypp::sat::Solvable solvable = zypp_get_package_by_id (d->package_id);
 
-        zypp::Capabilities obs = solvable.obsoletes ();
+	zypp::Capabilities obs = solvable.obsoletes ();
 
-        gchar *obsoletes = new gchar (); 
+	gchar *obsoletes = new gchar (); 
 
-        for (zypp::Capabilities::const_iterator it = obs.begin (); it != obs.end (); it++) {
-                g_strlcat(obsoletes, it->c_str (), (strlen (obsoletes) + strlen (it->c_str ()) + 1));
-                g_strlcat(obsoletes, ";", (strlen (obsoletes) + 2));
-        }
+	for (zypp::Capabilities::const_iterator it = obs.begin (); it != obs.end (); it++) {
+		g_strlcat(obsoletes, it->c_str (), (strlen (obsoletes) + strlen (it->c_str ()) + 1));
+		g_strlcat(obsoletes, ";", (strlen (obsoletes) + 2));
+	}
 
-        PkRestartEnum restart = PK_RESTART_ENUM_NONE;
-        
-        zypp::ZYpp::Ptr zypp = get_zypp ();
-        zypp::ResObject::constPtr item = zypp->pool ().find (solvable).resolvable ();
-
-        if (zypp::isKind<zypp::Patch>(solvable)) {
-                zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(item);
-                if (patch->reboot_needed ()) {
-                        restart = PK_RESTART_ENUM_SYSTEM;
-                }else if (patch->affects_pkg_manager ()) {
-                        restart = PK_RESTART_ENUM_SESSION;
-                }
-        }
+	PkRestartEnum restart = PK_RESTART_ENUM_NONE;
+	
+	zypp::ZYpp::Ptr zypp = get_zypp ();
+	zypp::ResObject::constPtr item = zypp->pool ().find (solvable).resolvable ();
+
+	if (zypp::isKind<zypp::Patch>(solvable)) {
+		zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(item);
+		if (patch->reboot_needed ()) {
+			restart = PK_RESTART_ENUM_SYSTEM;
+		}else if (patch->affects_pkg_manager ()) {
+			restart = PK_RESTART_ENUM_SESSION;
+		}
+	}
 
-        pk_backend_update_detail (backend,
-                                  d->package_id,
-                                  "",
-                                  obsoletes,
-                                  solvable.vendor ().c_str (),
-                                  "",
-                                  "",
-                                  restart,
-                                  item->description ().c_str ());
-
-        g_free (obsoletes);
-        pk_package_id_free (pi);
+	pk_backend_update_detail (backend,
+				  d->package_id,
+				  "",
+				  "", // CURRENTLY CAUSES SEGFAULT obsoletes,
+				  "", // CURRENTLY CAUSES SEGFAULT solvable.vendor ().c_str (),
+				  "",
+				  "",
+				  restart,
+				  item->description ().c_str ());
+
+	g_free (obsoletes);
+	pk_package_id_free (pi);
 	g_free (d->package_id);
 	g_free (d);
 	pk_backend_finished (backend);
 
-        return TRUE;
+	return TRUE;
 }
 
 /**
diff --git a/docs/html/pk-faq.html b/docs/html/pk-faq.html
index 992663d..7689772 100644
--- a/docs/html/pk-faq.html
+++ b/docs/html/pk-faq.html
@@ -65,7 +65,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>GetUpdates</b></td>
@@ -80,7 +80,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>UpdateSystem</b></td>
@@ -95,7 +95,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>SearchName</b></td>
@@ -125,7 +125,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>SearchFile</b></td>
@@ -140,7 +140,7 @@
 <td><img src="img/status-bad.png" alt="[no]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>SearchGroup</b></td>
@@ -155,7 +155,7 @@
 <td><img src="img/status-bad.png" alt="[no]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>InstallPackage</b></td>
@@ -200,7 +200,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>UpdatePackage</b></td>
@@ -230,7 +230,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>GetRequires</b></td>
@@ -245,7 +245,7 @@
 <td><img src="img/status-bad.png" alt="[no]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>GetDescription</b></td>
@@ -260,7 +260,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>GetFiles</b></td>
@@ -275,7 +275,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>GetUpdateDetail</b></td>
@@ -399,7 +399,7 @@
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- smart -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum -->
 <td><img src="img/status-good.png" alt="[yes]"/></td><!-- yum2 -->
-<td><img src="img/status-bad.png" alt="[no]"/></td><!-- zypp -->
+<td><img src="img/status-good.png" alt="[yes]"/></td><!-- zypp -->
 </tr>
 <tr>
 <td><b>Development</b></td>
commit f3ad33c051ae0ae1eae4ed6527222cc1f424f2a8
Author: Stefan Haas <shaas at suse.de>
Date:   Thu Mar 13 17:15:57 2008 +0100

    GetRequires is now also usable for uninstalled packages

diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index f5312d1..10eb19e 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -98,6 +98,12 @@ typedef struct {
 } ThreadData;
 
 typedef struct {
+        gchar *package_id;
+        gchar *filter;
+        gint type;
+} FilterData;
+
+typedef struct {
 	gboolean force;
 } RefreshData;
 
@@ -149,6 +155,172 @@ backend_destroy (PkBackend *backend)
 }
 
 /**
+  * backend_get_requires_thread:
+  */
+static gboolean
+backend_get_requires_thread (PkBackendThread *thread, gpointer data) {
+        
+        PkPackageId *pi;
+        PkBackend *backend;
+        
+        /* get current backend */
+        backend = pk_backend_thread_get_backend (thread);
+	FilterData *d = (FilterData*) data;
+
+	pi = pk_package_id_new_from_string (d->package_id);
+	if (pi == NULL) {
+		pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "invalid package id");
+		pk_package_id_free (pi);
+		g_free (d->package_id);
+                g_free (d->filter);
+		g_free (d);
+		pk_backend_finished (backend);
+		return FALSE;
+	}
+	pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
+	pk_backend_set_percentage (backend, 0);
+        
+        zypp::sat::Solvable solvable = zypp_get_package_by_id (d->package_id);
+        zypp::PoolItem package;
+
+        if (solvable.isSystem ()) {
+                zypp::ResPool pool = zypp_build_local_pool ();
+
+                gboolean found = FALSE;
+
+                for (zypp::ResPool::byIdent_iterator it = pool.byIdentBegin (zypp::ResKind::package, pi->name);
+                                it != pool.byIdentEnd (zypp::ResKind::package, pi->name); it++) {
+                        if (it->status ().isInstalled ()) {
+                                package = (*it);
+                                found = TRUE;
+                        }
+                }
+
+                if (found == FALSE) {
+                        pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, "Package is not installed");
+                        pk_package_id_free (pi);
+                        g_free (d->package_id);
+                        g_free (d->filter);
+                        g_free (d);
+                        pk_backend_finished (backend);
+                        return FALSE;
+                }
+
+                // set Package as to be uninstalled
+                package.status ().setToBeUninstalled (zypp::ResStatus::USER);
+
+        }else{
+
+                if (solvable == zypp::sat::Solvable::nosolvable) {
+                        pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, "Package couldn't be found");
+                        pk_package_id_free (pi);
+                        g_free (d->package_id);
+                        g_free (d->filter);
+                        g_free (d);
+                        pk_backend_finished (backend);
+                        return FALSE;
+                }
+
+                zypp::ResPool pool = zypp::ResPool::instance ();
+                package = pool.find (solvable);
+                //set Package as to be installed
+                package.status ().setToBeInstalled (zypp::ResStatus::USER);
+        }
+
+	pk_backend_set_percentage (backend, 40);
+
+        // solver run
+        zypp::ResPool pool = zypp::ResPool::instance ();
+        zypp::Resolver solver(pool);
+        
+        solver.setForceResolve (true);
+
+        if (solver.resolvePool () == FALSE) {
+                std::list<zypp::ResolverProblem_Ptr> problems = solver.problems ();
+                for(std::list<zypp::ResolverProblem_Ptr>::iterator it = problems.begin (); it != problems.end (); it++){
+                   pk_warning("Solver problem (This should never happen): '%s'", (*it)->description ().c_str ());
+                }
+		pk_backend_error_code (backend, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "Resolution failed");
+		pk_package_id_free (pi);
+		g_free (d->package_id);
+		g_free (d);
+		pk_backend_finished (backend);
+		return FALSE;
+	}
+
+	pk_backend_set_percentage (backend, 60);
+
+        // look for packages which would be uninstalled
+        for (zypp::ResPool::byKind_iterator it = pool.byKindBegin (zypp::ResKind::package);
+                        it != pool.byKindEnd (zypp::ResKind::package); it++) {
+                PkInfoEnum status = PK_INFO_ENUM_UNKNOWN;
+
+                gboolean hit = FALSE;
+
+                if (it->status ().isToBeUninstalled ()) {
+                        status = PK_INFO_ENUM_REMOVING;
+                        hit = TRUE;
+                }else if (it->status ().isToBeInstalled ()) {
+                        status = PK_INFO_ENUM_INSTALLING;
+                        hit = TRUE;
+                }else if (it->status ().isToBeUninstalledDueToUpgrade ()) {
+                        status = PK_INFO_ENUM_UPDATING;
+                        hit = TRUE;
+                }else if (it->status ().isToBeUninstalledDueToObsolete ()) {
+                        status = PK_INFO_ENUM_OBSOLETING;
+                        hit = TRUE;
+                }
+
+                if (hit) {
+                        gchar *package_id;
+        
+                        package_id = pk_package_id_build ( it->resolvable ()->name ().c_str(),
+                                        it->resolvable ()->edition ().asString ().c_str(),
+                                        it->resolvable ()->arch ().c_str(),
+                                        it->resolvable ()->vendor ().c_str ());
+        
+                        pk_backend_package (backend,
+                                        status,
+                                        package_id,
+                                        it->resolvable ()->description ().c_str ());          
+                
+                        g_free (package_id);
+                }
+                it->statusReset ();
+        }
+        
+        // undo the status-change of the package and disable forceResolve
+        package.statusReset ();
+        solver.setForceResolve (false);
+
+        pk_package_id_free (pi);
+	g_free (d->package_id);
+	g_free (d);
+	pk_backend_finished (backend);
+
+        return TRUE;
+}
+
+/**
+  * backend_get_requires:
+  */
+static void
+backend_get_requires(PkBackend *backend, const gchar *filter, const gchar *package_id, gboolean recursive) {
+        g_return_if_fail (backend != NULL);
+
+        FilterData *data = g_new0(FilterData, 1);
+        if (data == NULL) {
+                pk_backend_error_code(backend, PK_ERROR_ENUM_OOM, "Failed to allocate memory in backend_get_requires");
+                pk_backend_finished (backend);
+        } else {
+                data->package_id = g_strdup(package_id);
+                data->type = recursive;
+                data->filter = g_strdup(filter);
+                pk_backend_thread_create (thread, backend_get_requires_thread, data);
+        }
+}
+
+/**
  * backend_get_groups:
  */
 static void
@@ -656,7 +828,7 @@ backend_update_system_thread (PkBackendThread *thread, gpointer data)
                 status.setToBeInstalled (zypp::ResStatus::USER);
 	}
         
-        if (!zypp_perform_execution (backend, UPDATE)) {
+        if (!zypp_perform_execution (backend, UPDATE, FALSE)) {
                 pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, "Couldn't perform the installation.");
                 pk_backend_finished (backend);
                 return FALSE;
@@ -741,7 +913,8 @@ backend_install_package_thread (PkBackendThread *thread, gpointer data)
 
 		pk_backend_set_percentage (backend, 40);
 
-		if (!zypp_perform_execution (backend, INSTALL)) {
+		if (!zypp_perform_execution (backend, INSTALL, FALSE)) {
+                        
                         pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, "Couldn't perform the installation.");
                         g_free (package_id);
                         pk_backend_finished (backend);
@@ -910,7 +1083,7 @@ backend_remove_package_thread (PkBackendThread *thread, gpointer data)
 
 		pk_backend_set_percentage (backend, 40);
 
-                if (!zypp_perform_execution (backend, REMOVE)){
+                if (!zypp_perform_execution (backend, REMOVE, FALSE)){
                         pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, "Couldn't remove the package");
                         g_free (d->package_id);
                         g_free (d);
@@ -1425,123 +1598,6 @@ backend_get_files(PkBackend *backend, const gchar *package_id)
         }
 }
 
-/**
-  * backend_get_requires_thread:
-  */
-static gboolean
-backend_get_requires_thread (PkBackendThread *thread, gpointer data) {
-        
-        PkPackageId *pi;
-        PkBackend *backend;
-        
-        /* get current backend */
-        backend = pk_backend_thread_get_backend (thread);
-	ThreadData *d = (ThreadData*) data;
-
-	pi = pk_package_id_new_from_string (d->package_id);
-	if (pi == NULL) {
-		pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "invalid package id");
-		pk_package_id_free (pi);
-		g_free (d->package_id);
-		g_free (d);
-		pk_backend_finished (backend);
-		return FALSE;
-	}
-	pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
-	pk_backend_set_percentage (backend, 0);
-        
-        zypp::ResPool pool = zypp_build_local_pool();        
-
-        zypp::PoolItem package;
-        gboolean found = FALSE;
-        for (zypp::ResPool::byIdent_iterator it = pool.byIdentBegin (zypp::ResKind::package, pi->name);
-                        it != pool.byIdentEnd (zypp::ResKind::package, pi->name); it++) {
-                if (it ->status ().isInstalled ()){
-                        package = (*it);
-                        found = TRUE;
-                }
-        }
-
-	if (found == FALSE) {
-		pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, "Package is not installed");
-		pk_package_id_free (pi);
-		g_free (d->package_id);
-		g_free (d);
-		pk_backend_finished (backend);
-		return FALSE;
-	}
-
-        // set Package as to be uninstalled
-        package.status ().setToBeUninstalled (zypp::ResStatus::USER);
-
-	pk_backend_set_percentage (backend, 40);
-
-        // solver run
-        zypp::Resolver solver(pool);
-        
-        solver.setForceResolve (true);
-
-        if (solver.resolvePool () == FALSE) {
-                std::list<zypp::ResolverProblem_Ptr> problems = solver.problems ();
-                for(std::list<zypp::ResolverProblem_Ptr>::iterator it = problems.begin (); it != problems.end (); it++){
-                   pk_warning("Solver problem (This should never happen): '%s'", (*it)->description ().c_str ());
-                }
-		pk_backend_error_code (backend, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, "Resolution failed");
-		pk_package_id_free (pi);
-		g_free (d->package_id);
-		g_free (d);
-		pk_backend_finished (backend);
-		return FALSE;
-	}
-
-	pk_backend_set_percentage (backend, 60);
-
-        // look for packages which would be uninstalled
-        for (zypp::ResPool::byKind_iterator it = pool.byKindBegin (zypp::ResKind::package);
-                        it != pool.byKindEnd (zypp::ResKind::package); it++) {
-                if (it->status ().isToBeUninstalled ()) {
-                        gchar *package_id;
-                        package_id = pk_package_id_build ( it->resolvable ()->name ().c_str(),
-                                                           it->resolvable ()->edition ().asString ().c_str(),
-                                                           it->resolvable ()->arch ().c_str(),
-                                                           it->resolvable ()->vendor ().c_str ());
-                        pk_backend_package (backend,
-			                    PK_INFO_ENUM_INSTALLED,
-			                    package_id,
-			                    it->resolvable ()->description ().c_str ());
-                        g_free (package_id);
-                }
-        }
-        
-        // undo the status-change of the package and disable forceResolve
-        package.statusReset ();
-        solver.setForceResolve (false);
-
-        pk_package_id_free (pi);
-	g_free (d->package_id);
-	g_free (d);
-	pk_backend_finished (backend);
-
-        return TRUE;
-}
-
-/**
-  * backend_get_requires:
-  */
-static void
-backend_get_requires(PkBackend *backend, const gchar *filter, const gchar *package_id, gboolean recursive) {
-        g_return_if_fail (backend != NULL);
-
-        ThreadData *data = g_new0(ThreadData, 1);
-        if (data == NULL) {
-                pk_backend_error_code(backend, PK_ERROR_ENUM_OOM, "Failed to allocate memory in backend_get_requires");
-                pk_backend_finished (backend);
-        } else {
-                data->package_id = g_strdup(package_id);
-                pk_backend_thread_create (thread, backend_get_requires_thread, data);
-        }
-}
-
 extern "C" PK_BACKEND_OPTIONS (
 	"Zypp",					/* description */
 	"Boyd Timothy <btimothy at gmail.com>, Scott Reeves <sreeves at novell.com>, Stefan Haas <shaas at suse.de>",	/* author */
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index 391f880..2649b88 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -1,3 +1,4 @@
+#include <sstream>
 #include <stdlib.h>
 #include <glib.h>
 #include <zypp/ZYpp.h>
@@ -469,7 +470,6 @@ zypp_get_patches ()
         zypp::ZYpp::Ptr zypp;
         zypp = get_zypp ();
 
-
         for (zypp::ResPoolProxy::const_iterator it = zypp->poolProxy ().byKindBegin<zypp::Patch>();
                         it != zypp->poolProxy ().byKindEnd<zypp::Patch>(); it ++) {
                 // check if patch is needed 
@@ -483,11 +483,14 @@ zypp_get_patches ()
 }
 
 gboolean
-zypp_perform_execution (PkBackend *backend, PerformType type)
+zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force)
 {
         try {
                 zypp::ZYpp::Ptr zypp = get_zypp ();
 
+                if (force)
+                        zypp->resolver ()->setForceResolve (force);
+
                 // Gather up any dependencies
                 pk_backend_set_status (backend, PK_STATUS_ENUM_DEP_RESOLVE);
                 if (zypp->resolver ()->resolvePool () == FALSE) {
@@ -523,6 +526,8 @@ zypp_perform_execution (PkBackend *backend, PerformType type)
                         return FALSE;
                 }
 
+                zypp->resolver ()->setForceResolve (FALSE);
+
         } catch (const zypp::repo::RepoNotFoundException &ex) {
                 // TODO: make sure this dumps out the right sring.
 		pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_FOUND, ex.asUserString().c_str() );
diff --git a/backends/zypp/zypp-utils.h b/backends/zypp/zypp-utils.h
index 14aac10..2d4bf53 100644
--- a/backends/zypp/zypp-utils.h
+++ b/backends/zypp/zypp-utils.h
@@ -119,7 +119,7 @@ std::set<zypp::ui::Selectable::Ptr> * zypp_get_patches ();
 /**
   * perform changes in pool to the system
   */
-gboolean zypp_perform_execution (PkBackend *backend, PerformType type);
+gboolean zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force);
 
 void zypp_emit_packages_in_list (PkBackend *backend, std::vector<zypp::sat::Solvable> *v);
 #endif // _ZYPP_UTILS_H_
commit 8535aaac0b39cfd3352aba09274754c1bc777d8d
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Mar 12 21:44:55 2008 +0000

    Fix a couple of places where the signature doesn't match the method arguments (really! :-)

diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
index e3bbec2..6bcddd3 100644
--- a/python/packagekit/daemonBackend.py
+++ b/python/packagekit/daemonBackend.py
@@ -384,7 +384,7 @@ class PackageKitBaseBackend(dbus.service.Object):
         self.loop.quit()
 
     @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
-                         in_signature='sb', out_signature='')
+                         in_signature='ssb', out_signature='')
     def GetRequires(self,filters,package,recursive):
         '''
         Print a list of requires for a given package
@@ -397,7 +397,7 @@ class PackageKitBaseBackend(dbus.service.Object):
         self.loop.quit()
 
     @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
-                         in_signature='sb', out_signature='')
+                         in_signature='ssb', out_signature='')
     def GetDepends(self,filters,package,recursive):
         '''
         Print a list of depends for a given package
commit 5166dbd30080ab1b5a1895435c46e266ae3ee1cb
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Mar 12 21:43:53 2008 +0000

    Revert "Fix a couple of places where the signature doesn't match the method arguments."
    
    This reverts commit c48ef7ded0fe14554a026b4d1c89d54d11ad9e20.

diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
index aa1af46..e3bbec2 100644
--- a/python/packagekit/daemonBackend.py
+++ b/python/packagekit/daemonBackend.py
@@ -384,7 +384,7 @@ class PackageKitBaseBackend(dbus.service.Object):
         self.loop.quit()
 
     @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
-                         in_signature='sbb', out_signature='')
+                         in_signature='sb', out_signature='')
     def GetRequires(self,filters,package,recursive):
         '''
         Print a list of requires for a given package
@@ -397,7 +397,7 @@ class PackageKitBaseBackend(dbus.service.Object):
         self.loop.quit()
 
     @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
-                         in_signature='sbb', out_signature='')
+                         in_signature='sb', out_signature='')
     def GetDepends(self,filters,package,recursive):
         '''
         Print a list of depends for a given package
commit c48ef7ded0fe14554a026b4d1c89d54d11ad9e20
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Wed Mar 12 17:31:22 2008 -0400

    Fix a couple of places where the signature doesn't match the method arguments.

diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
index e3bbec2..aa1af46 100644
--- a/python/packagekit/daemonBackend.py
+++ b/python/packagekit/daemonBackend.py
@@ -384,7 +384,7 @@ class PackageKitBaseBackend(dbus.service.Object):
         self.loop.quit()
 
     @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
-                         in_signature='sb', out_signature='')
+                         in_signature='sbb', out_signature='')
     def GetRequires(self,filters,package,recursive):
         '''
         Print a list of requires for a given package
@@ -397,7 +397,7 @@ class PackageKitBaseBackend(dbus.service.Object):
         self.loop.quit()
 
     @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
-                         in_signature='sb', out_signature='')
+                         in_signature='sbb', out_signature='')
     def GetDepends(self,filters,package,recursive):
         '''
         Print a list of depends for a given package
commit cf44bbaad8a6203ca8136dc9ac327988b5504812
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Wed Mar 12 17:28:52 2008 -0400

    Add UpdatePackages method.

diff --git a/backends/yum2/helpers/yumDBUSBackend.py b/backends/yum2/helpers/yumDBUSBackend.py
index 839b687..c9642ec 100755
--- a/backends/yum2/helpers/yumDBUSBackend.py
+++ b/backends/yum2/helpers/yumDBUSBackend.py
@@ -767,6 +767,49 @@ class PackageKitYumBackend(PackageKitBaseBackend):
         self._unlock_yum()
         self.Finished(EXIT_SUCCESS)
 
+    def doUpdatePackages(self, packages):
+        '''
+        Implement the {backend}-update functionality
+        This will only work with yum 3.2.4 or higher
+        '''
+        self._check_init()
+        self._lock_yum()
+        self.AllowCancel(False)
+        self.PercentageChanged(0)
+
+        for package_id in packages:
+            package, installed = self._findPackage(package_id)
+
+            if not package:
+                self._unlock_yum()
+                self.ErrorCode(ERROR_PACKAGE_NOT_FOUND, "%s could not be found." % package_id)
+                self.Finished(EXIT_FAILED)
+                return
+
+            if installed:
+                self._unlock_yum()
+                self.ErrorCode(ERROR_PACKAGE_ALREADY_INSTALLED, "%s is already installed." % package_id)
+                self.Finished(EXIT_FAILED)
+                return
+
+            txmbr = self.yumbase.update(po=package)
+
+            if not txmbr:
+                self._unlock_yum()
+                self.ErrorCode(ERROR_TRANSACTION_ERROR,
+                               "Package %s could not be added to the transaction." % package_id)
+                self.Finished(EXIT_FAILED)
+                return
+                
+        successful = self._runYumTransaction()
+
+        if not successful:
+            # _runYumTransaction() sets the error code and calls Finished()
+            return
+            
+        self._unlock_yum()
+        self.Finished(EXIT_SUCCESS)
+
     def doRemovePackage(self, package, allowdep, autoremove):
         '''
         Implement the {backend}-remove functionality
diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
index b84293d..e3bbec2 100644
--- a/python/packagekit/daemonBackend.py
+++ b/python/packagekit/daemonBackend.py
@@ -506,6 +506,19 @@ class PackageKitBaseBackend(dbus.service.Object):
         self.loop.quit()
 
     @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
+                         in_signature='as', out_signature='')
+    def UpdatePackages(self, packages):
+        '''
+        Implement the {backend}-update-packages functionality
+        '''
+        pklog.info("UpdatePackages()")
+        self.forkme()
+        if self._child_pid:
+            return
+        self.doUpdatePackages(packages)
+        self.loop.quit()
+
+    @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
                          in_signature='sbb', out_signature='')
     def RemovePackage(self, package, allowdep, autoremove):
         '''
commit 0618292d418bebdbcc4ba7d8562997bcda3fc669
Merge: 0d113dc... a5a904e...
Author: Stefan Haas <shaas at suse.de>
Date:   Wed Mar 12 15:53:32 2008 +0100

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

commit 0d113dcd84675248330044ffbb082ff05ea7fc6c
Author: Stefan Haas <shaas at suse.de>
Date:   Wed Mar 12 15:53:07 2008 +0100

    added GetUpdateDetail and zypp_get_patches

diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index be218e8..f5312d1 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -344,7 +344,7 @@ backend_get_depends_thread (PkBackendThread *thread, gpointer data)
  * backend_get_depends:
  */
 static void
-backend_get_depends (PkBackend *backend, const gchar *package_id, gboolean recursive)
+backend_get_depends (PkBackend *backend, const gchar *filter, const gchar *package_id, gboolean recursive)
 {
 	g_return_if_fail (backend != NULL);
 	ThreadData *data = g_new0(ThreadData, 1);
@@ -484,6 +484,7 @@ backend_get_updates_thread (PkBackendThread *thread, gpointer data)
 	zypp::ResPool pool = zypp_build_pool (TRUE);
 	pk_backend_set_percentage (backend, 40);
 
+        
         // get all Packages for Update
         std::set<zypp::PoolItem> *candidates =  zypp_get_updates ();
 
@@ -502,6 +503,39 @@ backend_get_updates_thread (PkBackendThread *thread, gpointer data)
 	}
 
 	delete (candidates);
+
+        //get all Patches for Update
+
+        std::set<zypp::ui::Selectable::Ptr> *patches = zypp_get_patches ();
+
+        for (std::set<zypp::ui::Selectable::Ptr>::iterator it = patches->begin (); it != patches->end (); it++) {
+                gchar *package_id;
+
+                zypp::ResObject::constPtr candidate = (*it)->candidateObj ();
+                zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(candidate);
+
+                PkInfoEnum infoEnum = PK_INFO_ENUM_SECURITY;
+
+                /* This is usesless ATM, because category isn't implemented yet
+                if(patch->category () == "security") {
+                        infoEnum = PK_INFO_ENUM_SECURITY;
+                }else if(patch->category () == "recommended") {
+                        infoEnum = PK_INFO_ENUM_IMPORTANT;
+                }*/
+
+                package_id = pk_package_id_build ((*it)->name ().c_str (),
+                                                  candidate->edition ().c_str (),
+                                                  candidate->arch ().c_str (),
+                                                  candidate->vendor ().c_str ());
+
+                pk_backend_package (backend,
+                                    infoEnum,
+                                    package_id,
+                                    candidate->description ().c_str ());
+                g_free (package_id);
+        }
+
+        delete (patches);
         pk_backend_set_percentage (backend, 100);
 	pk_backend_finished (backend);
 	return TRUE;
@@ -519,6 +553,87 @@ backend_get_updates (PkBackend *backend, const gchar *filter)
 }
 
 static gboolean
+backend_get_update_detail_thread (PkBackendThread *thread, gpointer data)
+{
+        PkBackend *backend;
+	PkPackageId *pi;
+	ThreadData *d = (ThreadData*) data;
+
+	backend = pk_backend_thread_get_backend (thread);
+	pi = pk_package_id_new_from_string (d->package_id);
+	if (pi == NULL) {
+		pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "invalid package id");
+		pk_package_id_free (pi);
+		g_free (d->package_id);
+		g_free (d);
+		pk_backend_finished (backend);
+		return FALSE;
+	}
+	pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
+
+        zypp::sat::Solvable solvable = zypp_get_package_by_id (d->package_id);
+
+        zypp::Capabilities obs = solvable.obsoletes ();
+
+        gchar *obsoletes = new gchar (); 
+
+        for (zypp::Capabilities::const_iterator it = obs.begin (); it != obs.end (); it++) {
+                g_strlcat(obsoletes, it->c_str (), (strlen (obsoletes) + strlen (it->c_str ()) + 1));
+                g_strlcat(obsoletes, ";", (strlen (obsoletes) + 2));
+        }
+
+        PkRestartEnum restart = PK_RESTART_ENUM_NONE;
+        
+        zypp::ZYpp::Ptr zypp = get_zypp ();
+        zypp::ResObject::constPtr item = zypp->pool ().find (solvable).resolvable ();
+
+        if (zypp::isKind<zypp::Patch>(solvable)) {
+                zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(item);
+                if (patch->reboot_needed ()) {
+                        restart = PK_RESTART_ENUM_SYSTEM;
+                }else if (patch->affects_pkg_manager ()) {
+                        restart = PK_RESTART_ENUM_SESSION;
+                }
+        }
+
+        pk_backend_update_detail (backend,
+                                  d->package_id,
+                                  "",
+                                  obsoletes,
+                                  solvable.vendor ().c_str (),
+                                  "",
+                                  "",
+                                  restart,
+                                  item->description ().c_str ());
+
+        g_free (obsoletes);
+        pk_package_id_free (pi);
+	g_free (d->package_id);
+	g_free (d);
+	pk_backend_finished (backend);
+
+        return TRUE;
+}
+
+/**
+  * backend_get_update_detail
+  */
+static void
+backend_get_update_detail (PkBackend *backend, const gchar *package_id)
+{
+        g_return_if_fail (backend != NULL);
+        
+        ThreadData *data = g_new0(ThreadData, 1);
+	if (data == NULL) {
+		pk_backend_error_code(backend, PK_ERROR_ENUM_OOM, "Failed to allocate memory in backend_get_description");
+		pk_backend_finished (backend);
+	} else {
+		data->package_id = g_strdup(package_id);
+		pk_backend_thread_create (thread, backend_get_update_detail_thread, data);
+	}
+}
+
+static gboolean
 backend_update_system_thread (PkBackendThread *thread, gpointer data)
 {
 	PkBackend *backend;
@@ -612,6 +727,7 @@ backend_install_package_thread (PkBackendThread *thread, gpointer data)
                                 // set status to ToBeInstalled
                                 it->status ().setToBeInstalled (zypp::ResStatus::USER);
                                 item = *it;
+                                break;
                         }
                 }
 
@@ -1413,7 +1529,7 @@ backend_get_requires_thread (PkBackendThread *thread, gpointer data) {
   * backend_get_requires:
   */
 static void
-backend_get_requires(PkBackend *backend, const gchar *package_id, gboolean recursive) {
+backend_get_requires(PkBackend *backend, const gchar *filter, const gchar *package_id, gboolean recursive) {
         g_return_if_fail (backend != NULL);
 
         ThreadData *data = g_new0(ThreadData, 1);
@@ -1438,7 +1554,7 @@ extern "C" PK_BACKEND_OPTIONS (
 	backend_get_description,		/* get_description */
 	backend_get_files,			/* get_files */
 	backend_get_requires,			/* get_requires */
-	NULL,					/* get_update_detail */
+	backend_get_update_detail,		/* get_update_detail */
 	backend_get_updates,			/* get_updates */
 	backend_install_package,		/* install_package */
 	NULL,					/* install_file */
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index 1e78b4c..391f880 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -322,7 +322,8 @@ zypp_get_package_by_id (const gchar *package_id)
 	for (std::vector<zypp::sat::Solvable>::iterator it = v->begin ();
 			it != v->end (); it++) {
 		const char *version = it->edition ().asString ().c_str ();
-		if (strcmp (pi->version, version) == 0) {
+                const char *arch = it->arch ().c_str ();
+		if (strcmp (pi->version, version) == 0 || strcmp (pi->arch, arch) == 0) {
 			package = *it;
 			break;
 		}
@@ -460,6 +461,27 @@ zypp_get_updates ()
         return pks;
 }
 
+std::set<zypp::ui::Selectable::Ptr> *
+zypp_get_patches ()
+{
+        std::set<zypp::ui::Selectable::Ptr> *patches = new std::set<zypp::ui::Selectable::Ptr> ();
+
+        zypp::ZYpp::Ptr zypp;
+        zypp = get_zypp ();
+
+
+        for (zypp::ResPoolProxy::const_iterator it = zypp->poolProxy ().byKindBegin<zypp::Patch>();
+                        it != zypp->poolProxy ().byKindEnd<zypp::Patch>(); it ++) {
+                // check if patch is needed 
+                if((*it)->candidatePoolItem ().status ().isNeeded())
+                        patches->insert (*it);
+
+        }
+
+        return patches;
+
+}
+
 gboolean
 zypp_perform_execution (PkBackend *backend, PerformType type)
 {
diff --git a/backends/zypp/zypp-utils.h b/backends/zypp/zypp-utils.h
index 79cb1d7..14aac10 100644
--- a/backends/zypp/zypp-utils.h
+++ b/backends/zypp/zypp-utils.h
@@ -112,6 +112,11 @@ zypp::PoolItem zypp_find_arch_update_item (const zypp::ResPool & pool, zypp::Poo
 std::set<zypp::PoolItem> * zypp_get_updates ();
 
 /**
+  * Returns a set of all patches the could be installed
+  */
+std::set<zypp::ui::Selectable::Ptr> * zypp_get_patches ();
+
+/**
   * perform changes in pool to the system
   */
 gboolean zypp_perform_execution (PkBackend *backend, PerformType type);
commit a5a904edc30593c2f766fd5269470ea4dd2d4bad
Author: S.Çağlar Onur <caglar at pardus.org.tr>
Date:   Wed Mar 12 11:14:59 2008 +0200

    Fix compiliation of dummy network backend

diff --git a/libpackagekit/pk-network-dummy.c b/libpackagekit/pk-network-dummy.c
index b15f85d..dfb753d 100644
--- a/libpackagekit/pk-network-dummy.c
+++ b/libpackagekit/pk-network-dummy.c
@@ -58,7 +58,7 @@ static void     pk_network_finalize	(GObject        *object);
  *
  * Private #PkNetwork data
  **/
-struct PkNetworkPrivate
+struct _PkNetworkPrivate
 {
 	gpointer		 data;
 };
commit 16b5ce6e96e6d3070a84d7bf3a87395947239e65
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Mar 11 23:52:01 2008 +0000

    some fixes suggested by sparse

diff --git a/client/pk-console.c b/client/pk-console.c
index dd618d2..6e924b6 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -327,7 +327,7 @@ pk_console_progress_changed_cb (PkClient *client, guint percentage, guint subper
 	}
 }
 
-const gchar *summary =
+static const gchar *summary =
 	"PackageKit Console Interface\n"
 	"\n"
 	"Subcommands:\n"
@@ -481,7 +481,7 @@ pk_console_remove_only (PkClient *client, const gchar *package_id, gboolean forc
 /**
  * pk_console_get_prompt:
  **/
-gboolean
+static gboolean
 pk_console_get_prompt (const gchar *question, gboolean defaultyes)
 {
 	gchar answer = '\0';
@@ -529,6 +529,12 @@ pk_console_remove_package (PkClient *client, const gchar *package, GError **erro
 {
 	gchar *package_id;
 	gboolean ret;
+	guint length;
+	PkPackageItem *item;
+	PkPackageId *ident;
+	guint i;
+	gboolean remove;
+
 	package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_INSTALLED, package, error);
 	if (package_id == NULL) {
 		g_print (_("Could not find a package with that name to remove\n"));
@@ -554,12 +560,6 @@ pk_console_remove_package (PkClient *client, const gchar *package, GError **erro
 		return FALSE;
 	}
 
-	guint length;
-	PkPackageItem *item;
-	PkPackageId *ident;
-	guint i;
-	gboolean remove;
-
 	/* see how many packages there are */
 	length = pk_client_package_buffer_get_size (client_task);
 
diff --git a/libpackagekit/pk-common.c b/libpackagekit/pk-common.c
index 8a5e4b8..ecdb196 100644
--- a/libpackagekit/pk-common.c
+++ b/libpackagekit/pk-common.c
@@ -620,6 +620,8 @@ libst_common (LibSelfTest *test)
 	guint length;
 	gint value;
 	guint uvalue;
+	gchar *present;
+	guint seconds;
 
 	if (libst_start (test, "PkCommon", CLASS_AUTO) == FALSE) {
 		return;
@@ -1225,9 +1227,6 @@ libst_common (LibSelfTest *test)
 		libst_failed (test, "value is %i", uvalue);
 	}
 
-	gchar *present;
-	guint seconds;
-
 	/************************************************************
 	 **************            iso8601           ****************
 	 ************************************************************/
diff --git a/libpackagekit/pk-debug.c b/libpackagekit/pk-debug.c
index 40d2963..1c2b9c9 100644
--- a/libpackagekit/pk-debug.c
+++ b/libpackagekit/pk-debug.c
@@ -55,7 +55,7 @@ static gboolean is_console = FALSE;
 /**
  * pk_set_console_mode:
  **/
-void
+static void
 pk_set_console_mode (guint console_code)
 {
 	gchar command[13];
diff --git a/libpackagekit/pk-enum-list.c b/libpackagekit/pk-enum-list.c
index 890a21d..1d20ea5 100644
--- a/libpackagekit/pk-enum-list.c
+++ b/libpackagekit/pk-enum-list.c
@@ -487,15 +487,15 @@ pk_enum_list_new (void)
 void
 libst_enum_list (LibSelfTest *test)
 {
-	if (libst_start (test, "PkEnumList", CLASS_AUTO) == FALSE) {
-		return;
-	}
-
 	PkEnumList *elist;
 	gboolean ret;
 	gchar *text;
 	guint value;
 
+	if (libst_start (test, "PkEnumList", CLASS_AUTO) == FALSE) {
+		return;
+	}
+
 	/************************************************************
 	 ****************          ENUM         ******************
 	 ************************************************************/
diff --git a/libpackagekit/pk-extra.c b/libpackagekit/pk-extra.c
index 088827a..fcdd15d 100644
--- a/libpackagekit/pk-extra.c
+++ b/libpackagekit/pk-extra.c
@@ -445,7 +445,7 @@ pk_extra_set_database (PkExtra *extra, const gchar *filename)
 				    "package TEXT,"
 				    "locale TEXT,"
 				    "summary TEXT);";
-			rc = sqlite3_exec (extra->priv->db, statement, NULL, 0, &error_msg);
+			rc = sqlite3_exec (extra->priv->db, statement, NULL, NULL, &error_msg);
 			if (rc != SQLITE_OK) {
 				pk_warning ("SQL error: %s\n", error_msg);
 				sqlite3_free (error_msg);
@@ -455,7 +455,7 @@ pk_extra_set_database (PkExtra *extra, const gchar *filename)
 				    "package TEXT,"
 				    "icon TEXT,"
 				    "exec TEXT);";
-			rc = sqlite3_exec (extra->priv->db, statement, NULL, 0, &error_msg);
+			rc = sqlite3_exec (extra->priv->db, statement, NULL, NULL, &error_msg);
 			if (rc != SQLITE_OK) {
 				pk_warning ("SQL error: %s\n", error_msg);
 				sqlite3_free (error_msg);
@@ -541,6 +541,9 @@ libst_extra (LibSelfTest *test)
 	PkExtra *extra;
 	const gchar *text;
 	gboolean ret;
+	gchar *icon;
+	gchar *exec;
+	gchar *summary;
 
 	if (libst_start (test, "PkExtra", CLASS_AUTO) == FALSE) {
 		return;
@@ -593,10 +596,6 @@ libst_extra (LibSelfTest *test)
 		libst_failed (test, "locale was %s", text);
 	}
 
-	gchar *icon;
-	gchar *exec;
-	gchar *summary;
-
 	/************************************************************/
 	libst_title (test, "insert localised data");
 	ret = pk_extra_set_localised_detail (extra, "gnome-power-manager",
diff --git a/libpackagekit/pk-extra.h b/libpackagekit/pk-extra.h
index b5220d5..7f24f30 100644
--- a/libpackagekit/pk-extra.h
+++ b/libpackagekit/pk-extra.h
@@ -63,6 +63,7 @@ PkExtra		*pk_extra_new				(void);
 
 gboolean	 pk_extra_set_locale			(PkExtra	*extra,
 							 const gchar	*locale);
+const gchar	*pk_extra_get_locale			(PkExtra	*extra);
 gboolean	 pk_extra_set_database			(PkExtra	*extra,
 							 const gchar	*filename)
 							 G_GNUC_WARN_UNUSED_RESULT;
diff --git a/libpackagekit/pk-filter.c b/libpackagekit/pk-filter.c
index e8be1f3..3d01283 100644
--- a/libpackagekit/pk-filter.c
+++ b/libpackagekit/pk-filter.c
@@ -236,7 +236,7 @@ pk_filter_to_string (PkFilter *filter)
 
 	if (filter == NULL) {
 		pk_warning ("no filter");
-		return FALSE;
+		return NULL;
 	}
 
 	string = g_string_new ("");
diff --git a/libpackagekit/pk-package-ids.c b/libpackagekit/pk-package-ids.c
index cf6be99..54da3f1 100644
--- a/libpackagekit/pk-package-ids.c
+++ b/libpackagekit/pk-package-ids.c
@@ -56,8 +56,8 @@ pk_package_ids_from_va_list (const gchar *package_id_first, va_list *args)
 	guint i;
 	gchar *value_temp;
 
-	g_return_val_if_fail (args != NULL, FALSE);
-	g_return_val_if_fail (package_id_first != NULL, FALSE);
+	g_return_val_if_fail (args != NULL, NULL);
+	g_return_val_if_fail (package_id_first != NULL, NULL);
 
 	/* find how many elements we have in a temp array */
 	data = g_ptr_array_new ();
@@ -175,8 +175,8 @@ pk_package_ids_to_text (gchar **package_ids, const gchar *delimiter)
 	GString *string;
 	gchar *string_ret;
 
-	g_return_val_if_fail (package_ids != NULL, FALSE);
-	g_return_val_if_fail (delimiter != NULL, FALSE);
+	g_return_val_if_fail (package_ids != NULL, NULL);
+	g_return_val_if_fail (delimiter != NULL, NULL);
 
 	string = g_string_new ("");
 
@@ -210,7 +210,7 @@ pk_package_ids_to_text (gchar **package_ids, const gchar *delimiter)
 /**
  * libst_package_ids_va_list:
  **/
-gchar **
+static gchar **
 libst_package_ids_va_list (const gchar *package_id_first, ...)
 {
 	va_list args;
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 1be44a6..35de52b 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -511,7 +511,7 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package, c
  *
  * Check if we've used wrong chars, or other common mistakes
  **/
-gboolean
+static gboolean
 pk_backend_check_newlines (PkBackend *backend, const gchar *text)
 {
 	/* double space */
diff --git a/src/pk-backend.h b/src/pk-backend.h
index f11b35f..b5112b5 100644
--- a/src/pk-backend.h
+++ b/src/pk-backend.h
@@ -98,7 +98,7 @@ gboolean 	 pk_backend_files 			(PkBackend 	*backend,
 							 const gchar	*package_id,
 							 const gchar 	*filelist);
 gboolean	 pk_backend_error_code			(PkBackend	*backend,
-							 guint		 code,
+							 PkErrorCodeEnum code,
 							 const gchar	*details, ...);
 gboolean	 pk_backend_updates_changed		(PkBackend	*backend);
 gboolean         pk_backend_repo_signature_required     (PkBackend      *backend,
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 29101ce..fe4b146 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -147,7 +147,7 @@ pk_engine_error_get_type (void)
 			ENUM_ENTRY (PK_ENGINE_ERROR_INVALID_STATE, "InvalidState"),
 			ENUM_ENTRY (PK_ENGINE_ERROR_INITIALIZE_FAILED, "InitializeFailed"),
 			ENUM_ENTRY (PK_ENGINE_ERROR_COMMIT_FAILED, "CommitFailed"),
-			{ 0, 0, 0 }
+			{ 0, NULL, NULL }
 		};
 		etype = g_enum_register_static ("PkEngineError", values);
 	}
@@ -750,7 +750,7 @@ pk_engine_item_commit (PkEngine *engine, PkTransactionItem *item)
  * Use this function when a function failed, and we just want to get rid
  * of all references to it.
  **/
-gboolean
+static gboolean
 pk_engine_item_delete (PkEngine *engine, PkTransactionItem *item)
 {
 	g_return_val_if_fail (engine != NULL, FALSE);
@@ -1000,7 +1000,7 @@ pk_engine_get_updates (PkEngine *engine, const gchar *tid, const gchar *filter,
 /**
  * pk_engine_search_check:
  **/
-gboolean
+static gboolean
 pk_engine_search_check (const gchar *search, GError **error)
 {
 	guint size;
diff --git a/src/pk-thread-list.c b/src/pk-thread-list.c
index 18ff361..aa6794a 100644
--- a/src/pk-thread-list.c
+++ b/src/pk-thread-list.c
@@ -254,8 +254,8 @@ pk_thread_list_new (void)
 #ifdef PK_BUILD_TESTS
 #include <libselftest.h>
 
-gboolean done_func1 = FALSE;
-gboolean done_func2 = FALSE;
+static gboolean done_func1 = FALSE;
+static gboolean done_func2 = FALSE;
 
 static gboolean
 test_func1 (PkThreadList *tlist, gpointer data)
diff --git a/src/pk-transaction-db.c b/src/pk-transaction-db.c
index 8c7e5bf..18eb564 100644
--- a/src/pk-transaction-db.c
+++ b/src/pk-transaction-db.c
@@ -450,7 +450,7 @@ pk_transaction_db_empty (PkTransactionDb *tdb)
 	g_return_val_if_fail (PK_IS_TRANSACTION_DB (tdb), FALSE);
 
 	statement = "TRUNCATE TABLE transactions;";
-	sqlite3_exec (tdb->priv->db, statement, NULL, 0, NULL);
+	sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
 	return TRUE;
 }
 
@@ -470,12 +470,12 @@ pk_transaction_db_create_table_last_action (PkTransactionDb *tdb)
 
 	timespec = pk_iso8601_present ();
 	statement = "CREATE TABLE last_action (role TEXT primary key, timespec TEXT);";
-	sqlite3_exec (tdb->priv->db, statement, NULL, 0, NULL);
+	sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
 	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, 0, NULL);
+		sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
 		g_free (statement);
 	}
 	g_free (timespec);
@@ -516,7 +516,7 @@ pk_transaction_db_init (PkTransactionDb *tdb)
 				    "role TEXT,"
 				    "data TEXT,"
 				    "description TEXT);";
-			sqlite3_exec (tdb->priv->db, statement, NULL, 0, NULL);
+			sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
 		}
 	}
 
commit caff013814ee57059535b996bad1714ee9df01ed
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Mar 11 23:35:57 2008 +0000

    remove some dead code

diff --git a/src/pk-runner.c b/src/pk-runner.c
index 02973a8..fd33d9b 100644
--- a/src/pk-runner.c
+++ b/src/pk-runner.c
@@ -43,7 +43,6 @@
 #include <pk-common.h>
 #include <pk-package-id.h>
 #include <pk-enum.h>
-#include <pk-network.h>
 
 #include "pk-debug.h"
 #include "pk-runner.h"
@@ -78,7 +77,6 @@ struct PkRunnerPrivate
 	gchar			*cached_parameter;
 	gchar			*cached_value;
 	LibGBus			*libgbus;
-	PkNetwork		*network;
 	PkBackend		*backend;
 	PkInhibit		*inhibit;
 	gulong			 signal_package;
@@ -854,16 +852,6 @@ pk_runner_get_runtime (PkRunner *runner)
 }
 
 /**
- * pk_runner_network_is_online:
- */
-gboolean
-pk_runner_network_is_online (PkRunner *runner)
-{
-	g_return_val_if_fail (runner != NULL, FALSE);
-	return pk_network_is_online (runner->priv->network);
-}
-
-/**
  * pk_runner_set_dbus_name:
  */
 gboolean
@@ -1098,7 +1086,6 @@ pk_runner_finalize (GObject *object)
 	g_object_unref (runner->priv->backend);
 	g_object_unref (runner->priv->libgbus);
 
-	g_object_unref (runner->priv->network);
 	g_object_unref (runner->priv->thread_list);
 	g_object_unref (runner->priv->package_list);
 
@@ -1161,7 +1148,6 @@ pk_runner_init (PkRunner *runner)
 			  G_CALLBACK (pk_runner_allow_cancel_cb), runner);
 
 	runner->priv->inhibit = pk_inhibit_new ();
-	runner->priv->network = pk_network_new ();
 	runner->priv->thread_list = pk_thread_list_new ();
 	runner->priv->package_list = pk_package_list_new ();
 
commit eb82076405aa036545f50038bf166b9b7398e334
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Mar 11 23:35:10 2008 +0000

    fix a sparse error

diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index 33d061e..d5c1fc1 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -150,7 +150,7 @@ pk_client_error_get_type (void)
 			ENUM_ENTRY (PK_CLIENT_ERROR_ROLE_UNKNOWN, "RoleUnkown"),
 			ENUM_ENTRY (PK_CLIENT_ERROR_PROMISCUOUS, "Promiscuous"),
 			ENUM_ENTRY (PK_CLIENT_ERROR_INVALID_PACKAGEID, "InvalidPackageId"),
-			{ 0, 0, 0 }
+			{ 0, NULL, NULL }
 		};
 		etype = g_enum_register_static ("PkClientError", values);
 	}
commit f7c06a7a9d74bdea5d21244372425a25a24f3625
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Mar 11 22:57:13 2008 +0000

    fix the web link to PkClient tools

diff --git a/docs/html/pk-using.html b/docs/html/pk-using.html
index 19b3884..cc455c7 100644
--- a/docs/html/pk-using.html
+++ b/docs/html/pk-using.html
@@ -56,7 +56,7 @@ See the <a href="pk-screenshots.html">screenshots page</a> for more details.
 
 <h2>Using libpackagekit:</h2>
 <p>
-The <a href="gtk-doc/PackageKit-pk-client.html">libpackagekit gobject library</a>
+The <a href="gtk-doc/PkClient.html">libpackagekit gobject library</a>
 wraps the DBUS interface in a nice glib-style API.
 This makes designing programs that use libpackagekit can concentrate on
 core functionality rather that the DBUS and PackageKit internals.
commit f5716c56ff6594e8e86a513627600a84b373dc25
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Mar 11 22:52:28 2008 +0000

    document PkClientError with gtk-doc

diff --git a/libpackagekit/pk-client.h b/libpackagekit/pk-client.h
index 73ddcfc..47f763d 100644
--- a/libpackagekit/pk-client.h
+++ b/libpackagekit/pk-client.h
@@ -47,6 +47,12 @@ G_BEGIN_DECLS
 
 /**
  * PkClientError:
+ * @PK_CLIENT_ERROR_FAILED: the transaction failed for an unknown reason
+ * @PK_CLIENT_ERROR_NO_TID: the transaction id was not pre-allocated (internal error)
+ * @PK_CLIENT_ERROR_ALREADY_TID: the transaction id has already been used (internal error)
+ * @PK_CLIENT_ERROR_ROLE_UNKNOWN: the role was not set (internal error)
+ * @PK_CLIENT_ERROR_PROMISCUOUS: we are in a promiscuous mode where we have no transaction ID
+ * @PK_CLIENT_ERROR_INVALID_PACKAGEID: the package_id is invalid
  *
  * Errors that can be thrown
  */
@@ -57,8 +63,7 @@ typedef enum
 	PK_CLIENT_ERROR_ALREADY_TID,
 	PK_CLIENT_ERROR_ROLE_UNKNOWN,
 	PK_CLIENT_ERROR_PROMISCUOUS,
-	PK_CLIENT_ERROR_INVALID_PACKAGEID,
-	PK_CLIENT_ERROR_LAST
+	PK_CLIENT_ERROR_INVALID_PACKAGEID
 } PkClientError;
 
 typedef struct _PkClientPrivate		PkClientPrivate;
commit 96f99443db392081232b3f2564f52c5411374ae9
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Mar 11 22:40:34 2008 +0000

    properly define the GObjects so that gtk-doc can recognise the signals

diff --git a/libpackagekit/pk-client.c b/libpackagekit/pk-client.c
index 029bc8d..33d061e 100644
--- a/libpackagekit/pk-client.c
+++ b/libpackagekit/pk-client.c
@@ -62,7 +62,7 @@ static void     pk_client_finalize	(GObject       *object);
  *
  * Private #PkClient data
  **/
-struct PkClientPrivate
+struct _PkClientPrivate
 {
 	DBusGConnection		*connection;
 	DBusGProxy		*proxy;
diff --git a/libpackagekit/pk-client.h b/libpackagekit/pk-client.h
index 04da31d..73ddcfc 100644
--- a/libpackagekit/pk-client.h
+++ b/libpackagekit/pk-client.h
@@ -61,15 +61,17 @@ typedef enum
 	PK_CLIENT_ERROR_LAST
 } PkClientError;
 
-typedef struct PkClientPrivate PkClientPrivate;
+typedef struct _PkClientPrivate		PkClientPrivate;
+typedef struct _PkClient		PkClient;
+typedef struct _PkClientClass		PkClientClass;
 
-typedef struct
+struct _PkClient
 {
 	GObject		 parent;
 	PkClientPrivate	*priv;
-} PkClient;
+};
 
-typedef struct
+struct _PkClientClass
 {
 	GObjectClass	parent_class;
 	/* Signals */
@@ -147,7 +149,7 @@ typedef struct
 	void (*_pk_reserved3) (void);
 	void (*_pk_reserved4) (void);
 	void (*_pk_reserved5) (void);
-} PkClientClass;
+};
 
 GQuark		 pk_client_error_quark			(void);
 GType		 pk_client_error_get_type		(void);
diff --git a/libpackagekit/pk-connection.c b/libpackagekit/pk-connection.c
index 6c4b997..5800656 100644
--- a/libpackagekit/pk-connection.c
+++ b/libpackagekit/pk-connection.c
@@ -54,7 +54,7 @@
  *
  * Private #PkConnection data
  **/
-struct PkConnectionPrivate
+struct _PkConnectionPrivate
 {
 	LibGBus			*libgbus;
 };
diff --git a/libpackagekit/pk-connection.h b/libpackagekit/pk-connection.h
index 3374d07..d26c14d 100644
--- a/libpackagekit/pk-connection.h
+++ b/libpackagekit/pk-connection.h
@@ -33,20 +33,22 @@ G_BEGIN_DECLS
 #define PK_IS_CONNECTION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_CONNECTION))
 #define PK_CONNECTION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_CONNECTION, PkConnectionClass))
 
-typedef struct PkConnectionPrivate PkConnectionPrivate;
+typedef struct _PkConnectionPrivate	PkConnectionPrivate;
+typedef struct _PkConnection		PkConnection;
+typedef struct _PkConnectionClass	PkConnectionClass;
 
-typedef struct
+struct _PkConnection
 {
 	GObject		     parent;
 	PkConnectionPrivate *priv;
-} PkConnection;
+};
 
-typedef struct
+struct _PkConnectionClass
 {
 	GObjectClass	parent_class;
 	void		(* connection_changed)	(PkConnection	*connection,
 						 gboolean	 connected);
-} PkConnectionClass;
+};
 
 GType		 pk_connection_get_type		(void);
 PkConnection	*pk_connection_new		(void);
diff --git a/libpackagekit/pk-enum-list.c b/libpackagekit/pk-enum-list.c
index 9e41714..890a21d 100644
--- a/libpackagekit/pk-enum-list.c
+++ b/libpackagekit/pk-enum-list.c
@@ -57,7 +57,7 @@ static void     pk_enum_list_finalize		(GObject         *object);
  *
  * Private #PkEnumList data
  **/
-struct PkEnumListPrivate
+struct _PkEnumListPrivate
 {
 	PkEnumListType		 type;
 	GPtrArray		*data;
diff --git a/libpackagekit/pk-enum-list.h b/libpackagekit/pk-enum-list.h
index 45c285b..aae83c6 100644
--- a/libpackagekit/pk-enum-list.h
+++ b/libpackagekit/pk-enum-list.h
@@ -33,18 +33,20 @@ G_BEGIN_DECLS
 #define PK_IS_ENUM_LIST_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_ENUM_LIST))
 #define PK_ENUM_LIST_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_ENUM_LIST, PkEnumListClass))
 
-typedef struct PkEnumListPrivate PkEnumListPrivate;
+typedef struct _PkEnumListPrivate	PkEnumListPrivate;
+typedef struct _PkEnumList		PkEnumList;
+typedef struct _PkEnumListClass		PkEnumListClass;
 
-typedef struct
+struct _PkEnumList
 {
 	GObject			 parent;
 	PkEnumListPrivate	*priv;
-} PkEnumList;
+};
 
-typedef struct
+struct _PkEnumListClass
 {
 	GObjectClass	parent_class;
-} PkEnumListClass;
+};
 
 typedef enum {
 	PK_ENUM_LIST_TYPE_ROLE,
diff --git a/libpackagekit/pk-extra.c b/libpackagekit/pk-extra.c
index 6973063..088827a 100644
--- a/libpackagekit/pk-extra.c
+++ b/libpackagekit/pk-extra.c
@@ -56,7 +56,7 @@ static void     pk_extra_finalize	(GObject     *object);
  *
  * Private #PkExtra data
  **/
-struct PkExtraPrivate
+struct _PkExtraPrivate
 {
 	gchar			*database;
 	gchar			*locale;
diff --git a/libpackagekit/pk-extra.h b/libpackagekit/pk-extra.h
index 7fbe941..b5220d5 100644
--- a/libpackagekit/pk-extra.h
+++ b/libpackagekit/pk-extra.h
@@ -43,18 +43,20 @@ G_BEGIN_DECLS
  */
 #define PK_EXTRA_DEFAULT_DATABASE	"/var/lib/PackageKit/extra-data.db"
 
-typedef struct PkExtraPrivate PkExtraPrivate;
+typedef struct _PkExtraPrivate		PkExtraPrivate;
+typedef struct _PkExtra			PkExtra;
+typedef struct _PkExtraClass		PkExtraClass;
 
-typedef struct
+struct _PkExtra
 {
 	GObject		 parent;
 	PkExtraPrivate	*priv;
-} PkExtra;
+};
 
-typedef struct
+struct _PkExtraClass
 {
 	GObjectClass	parent_class;
-} PkExtraClass;
+};
 
 GType		 pk_extra_get_type			(void);
 PkExtra		*pk_extra_new				(void);
diff --git a/libpackagekit/pk-job-list.c b/libpackagekit/pk-job-list.c
index 06b05df..5b4581a 100644
--- a/libpackagekit/pk-job-list.c
+++ b/libpackagekit/pk-job-list.c
@@ -58,7 +58,7 @@ static void     pk_job_list_finalize		(GObject        *object);
  *
  * Private #PkJobList data
  **/
-struct PkJobListPrivate
+struct _PkJobListPrivate
 {
 	DBusGConnection		*connection;
 	DBusGProxy		*proxy;
diff --git a/libpackagekit/pk-job-list.h b/libpackagekit/pk-job-list.h
index f0b0eeb..10feabb 100644
--- a/libpackagekit/pk-job-list.h
+++ b/libpackagekit/pk-job-list.h
@@ -33,18 +33,20 @@ G_BEGIN_DECLS
 #define PK_IS_JOB_LIST_CLASS(k)		(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_JOB_LIST))
 #define PK_JOB_LIST_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_JOB_LIST, PkJobListClass))
 
-typedef struct PkJobListPrivate PkJobListPrivate;
+typedef struct _PkJobListPrivate	PkJobListPrivate;
+typedef struct _PkJobList		PkJobList;
+typedef struct _PkJobListClass		PkJobListClass;
 
-typedef struct
+struct _PkJobList
 {
 	GObject			 parent;
 	PkJobListPrivate	*priv;
-} PkJobList;
+};
 
-typedef struct
+struct _PkJobListClass
 {
 	GObjectClass	parent_class;
-} PkJobListClass;
+};
 
 GType		 pk_job_list_get_type			(void);
 PkJobList	*pk_job_list_new			(void);
diff --git a/libpackagekit/pk-network-dummy.c b/libpackagekit/pk-network-dummy.c
index 94a1dbf..b15f85d 100644
--- a/libpackagekit/pk-network-dummy.c
+++ b/libpackagekit/pk-network-dummy.c
@@ -54,7 +54,7 @@ static void     pk_network_finalize	(GObject        *object);
 #define PK_NETWORK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_NETWORK, PkNetworkPrivate))
 
 /**
- * PkNetworkPrivate:
+ * _PkNetworkPrivate:
  *
  * Private #PkNetwork data
  **/
diff --git a/libpackagekit/pk-network-nm.c b/libpackagekit/pk-network-nm.c
index 4a1a7b4..5b909ca 100644
--- a/libpackagekit/pk-network-nm.c
+++ b/libpackagekit/pk-network-nm.c
@@ -54,7 +54,7 @@ static void     pk_network_finalize	(GObject        *object);
  *
  * Private #PkNetwork data
  **/
-struct PkNetworkPrivate
+struct _PkNetworkPrivate
 {
 	libnm_glib_ctx		*ctx;
 	guint			 callback_id;
diff --git a/libpackagekit/pk-network.h b/libpackagekit/pk-network.h
index 913f01b..41e6030 100644
--- a/libpackagekit/pk-network.h
+++ b/libpackagekit/pk-network.h
@@ -42,18 +42,20 @@ G_BEGIN_DECLS
 #define PK_NETWORK_ERROR	(pk_network_error_quark ())
 #define PK_NETWORK_TYPE_ERROR	(pk_network_error_get_type ()) 
 
-typedef struct PkNetworkPrivate PkNetworkPrivate;
+typedef struct _PkNetworkPrivate	PkNetworkPrivate;
+typedef struct _PkNetwork		PkNetwork;
+typedef struct _PkNetworkClass		PkNetworkClass;
 
-typedef struct
+struct _PkNetwork
 {
 	 GObject		 parent;
 	 PkNetworkPrivate	*priv;
-} PkNetwork;
+};
 
-typedef struct
+struct _PkNetworkClass
 {
 	GObjectClass	parent_class;
-} PkNetworkClass;
+};
 
 GType		 pk_network_get_type		  	(void);
 PkNetwork	*pk_network_new				(void);
diff --git a/libpackagekit/pk-package-list.c b/libpackagekit/pk-package-list.c
index bf8b3bd..7a31d7e 100644
--- a/libpackagekit/pk-package-list.c
+++ b/libpackagekit/pk-package-list.c
@@ -58,7 +58,7 @@ static void     pk_package_list_finalize	(GObject            *object);
  *
  * Private #PkPackageList data
  **/
-struct PkPackageListPrivate
+struct _PkPackageListPrivate
 {
 	GPtrArray	*array;
 };
diff --git a/libpackagekit/pk-package-list.h b/libpackagekit/pk-package-list.h
index 3ce4d98..a4f0026 100644
--- a/libpackagekit/pk-package-list.h
+++ b/libpackagekit/pk-package-list.h
@@ -34,18 +34,20 @@ G_BEGIN_DECLS
 #define PK_IS_PACKAGE_LIST_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_PACKAGE_LIST))
 #define PK_PACKAGE_LIST_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_PACKAGE_LIST, PkPackageListClass))
 
-typedef struct PkPackageListPrivate PkPackageListPrivate;
+typedef struct _PkPackageListPrivate	PkPackageListPrivate;
+typedef struct _PkPackageList		PkPackageList;
+typedef struct _PkPackageListClass	PkPackageListClass;
 
-typedef struct
+struct _PkPackageList
 {
 	 GObject		 parent;
 	 PkPackageListPrivate	*priv;
-} PkPackageList;
+};
 
-typedef struct
+struct _PkPackageListClass
 {
 	GObjectClass	parent_class;
-} PkPackageListClass;
+};
 
 /**
  * PkPackageItem:
diff --git a/libpackagekit/pk-polkit-client.c b/libpackagekit/pk-polkit-client.c
index 1d3b083..39a4914 100644
--- a/libpackagekit/pk-polkit-client.c
+++ b/libpackagekit/pk-polkit-client.c
@@ -59,7 +59,7 @@ static void     pk_polkit_client_finalize		(GObject           *object);
  *
  * Private #PkPolkitClient data
  **/
-struct PkPolkitClientPrivate
+struct _PkPolkitClientPrivate
 {
 	DBusGConnection		*connection;
 	DBusGProxy		*proxy;
diff --git a/libpackagekit/pk-polkit-client.h b/libpackagekit/pk-polkit-client.h
index e95964f..66517e8 100644
--- a/libpackagekit/pk-polkit-client.h
+++ b/libpackagekit/pk-polkit-client.h
@@ -33,18 +33,20 @@ G_BEGIN_DECLS
 #define PK_IS_POLKIT_CLIENT_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_POLKIT_CLIENT))
 #define PK_POLKIT_CLIENT_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_POLKIT_CLIENT, PkPolkitClientClass))
 
-typedef struct PkPolkitClientPrivate PkPolkitClientPrivate;
+typedef struct _PkPolkitClientPrivate	PkPolkitClientPrivate;
+typedef struct _PkPolkitClient		PkPolkitClient;
+typedef struct _PkPolkitClientClass	PkPolkitClientClass;
 
-typedef struct
+struct _PkPolkitClient
 {
 	GObject			 parent;
 	PkPolkitClientPrivate	*priv;
-} PkPolkitClient;
+};
 
-typedef struct
+struct _PkPolkitClientClass
 {
 	GObjectClass	parent_class;
-} PkPolkitClientClass;
+};
 
 GType		 pk_polkit_client_get_type		(void);
 PkPolkitClient	*pk_polkit_client_new			(void);
diff --git a/libpackagekit/pk-task-list.c b/libpackagekit/pk-task-list.c
index db34e08..9d8c963 100644
--- a/libpackagekit/pk-task-list.c
+++ b/libpackagekit/pk-task-list.c
@@ -59,7 +59,7 @@ static void     pk_task_list_finalize		(GObject         *object);
  *
  * Private #PkTaskList data
  **/
-struct PkTaskListPrivate
+struct _PkTaskListPrivate
 {
 	GPtrArray		*task_list;
 	PkJobList		*job_list;
diff --git a/libpackagekit/pk-task-list.h b/libpackagekit/pk-task-list.h
index f5eb779..a3103d5 100644
--- a/libpackagekit/pk-task-list.h
+++ b/libpackagekit/pk-task-list.h
@@ -35,7 +35,9 @@ G_BEGIN_DECLS
 #define PK_IS_TASK_LIST_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_TASK_LIST))
 #define PK_TASK_LIST_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_TASK_LIST, PkTaskListClass))
 
-typedef struct PkTaskListPrivate PkTaskListPrivate;
+typedef struct _PkTaskListPrivate	PkTaskListPrivate;
+typedef struct _PkTaskList		PkTaskList;
+typedef struct _PkTaskListClass		PkTaskListClass;
 
 typedef struct
 {
@@ -47,16 +49,16 @@ typedef struct
 	gboolean		 valid;
 } PkTaskListItem;
 
-typedef struct
+struct _PkTaskList
 {
 	GObject			 parent;
 	PkTaskListPrivate	*priv;
-} PkTaskList;
+};
 
-typedef struct
+struct _PkTaskListClass
 {
 	GObjectClass	parent_class;
-} PkTaskListClass;
+};
 
 GType		 pk_task_list_get_type			(void);
 PkTaskList	*pk_task_list_new			(void);



More information about the PackageKit mailing list