gnome-packagekit r273 - trunk/src



Author: rhughes
Date: Tue Sep  2 16:20:06 2008
New Revision: 273
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=273&view=rev

Log:
from git

Modified:
   trunk/src/Makefile.am
   trunk/src/gpk-animated-icon.c
   trunk/src/gpk-application-main.c
   trunk/src/gpk-application-state.c
   trunk/src/gpk-application.c
   trunk/src/gpk-auto-refresh.c
   trunk/src/gpk-backend-status.c
   trunk/src/gpk-cell-renderer-uri.c
   trunk/src/gpk-check-update.c
   trunk/src/gpk-client-chooser.c
   trunk/src/gpk-client-depends.c
   trunk/src/gpk-client-eula.c
   trunk/src/gpk-client-requires.c
   trunk/src/gpk-client-resolve.c
   trunk/src/gpk-client-run.c
   trunk/src/gpk-client-signature.c
   trunk/src/gpk-client-untrusted.c
   trunk/src/gpk-client.c
   trunk/src/gpk-common.c
   trunk/src/gpk-consolekit.c
   trunk/src/gpk-dbus.c
   trunk/src/gpk-dialog.c
   trunk/src/gpk-error.c
   trunk/src/gpk-firmware.c
   trunk/src/gpk-gnome.c
   trunk/src/gpk-inhibit.c
   trunk/src/gpk-install-catalog.c
   trunk/src/gpk-install-local-file.c
   trunk/src/gpk-install-mime-type.c
   trunk/src/gpk-install-package-name.c
   trunk/src/gpk-install-provide-file.c
   trunk/src/gpk-interface.h
   trunk/src/gpk-log.c
   trunk/src/gpk-prefs.c
   trunk/src/gpk-repo.c
   trunk/src/gpk-self-test.c
   trunk/src/gpk-smart-icon.c
   trunk/src/gpk-update-icon.c
   trunk/src/gpk-update-viewer.c
   trunk/src/gpk-watch.c

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Tue Sep  2 16:20:06 2008
@@ -21,6 +21,7 @@
 	-DLOCALEDIR=\""$(localedir)"\"			\
 	-DVERSION="\"$(VERSION)\"" 			\
 	-DPK_DATA=\"$(pkgdatadir)\"			\
+	-DEGG_LOG_FILE=\"\"				\
 	-I$(top_srcdir)/libunique			\
 	-I$(top_srcdir)/libselftest			\
 	$(NULL)
@@ -49,6 +50,12 @@
 	$(NULL)
 
 shared_SOURCES =					\
+	egg-debug.c					\
+	egg-debug.h					\
+	egg-string.c					\
+	egg-string.h					\
+	egg-dbus-monitor.c				\
+	egg-dbus-monitor.h				\
 	gpk-marshal.c					\
 	gpk-marshal.h					\
 	gpk-animated-icon.c				\
@@ -181,6 +188,8 @@
 	$(NULL)
 
 gpk_prefs_SOURCES =					\
+	egg-debug.c					\
+	egg-debug.h					\
 	gpk-prefs.c					\
 	gpk-gnome.c					\
 	gpk-gnome.h					\
@@ -220,6 +229,8 @@
 	$(NULL)
 
 gpk_backend_status_SOURCES =				\
+	egg-debug.c					\
+	egg-debug.h					\
 	gpk-backend-status.c				\
 	$(NULL)
 

Modified: trunk/src/gpk-animated-icon.c
==============================================================================
--- trunk/src/gpk-animated-icon.c	(original)
+++ trunk/src/gpk-animated-icon.c	Tue Sep  2 16:20:06 2008
@@ -24,9 +24,11 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <pk-debug.h>
 #include <pk-common.h>
 
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include "gpk-animated-icon.h"
 
 G_DEFINE_TYPE (GpkAnimatedIcon, gpk_animated_icon, GTK_TYPE_IMAGE)
@@ -45,7 +47,7 @@
 
 	/* none loaded */
 	if (icon->frames == NULL) {
-		pk_debug ("nothing to free");
+		egg_debug ("nothing to free");
 		return FALSE;
 	}
 
@@ -73,8 +75,8 @@
 	g_return_val_if_fail (name != NULL, FALSE);
 
 	/* have we already set the same icon */
-	if (pk_strequal (icon->filename, name)) {
-		pk_debug ("already set the same icon name %s, ignoring", name);
+	if (egg_strequal (icon->filename, name)) {
+		egg_debug ("already set the same icon name %s, ignoring", name);
 		return FALSE;
 	}
 
@@ -90,13 +92,13 @@
 		gpk_animated_icon_free_pixbufs (icon);
 	}
 
-	pk_debug ("loading from %s", name);
+	egg_debug ("loading from %s", name);
 	gtk_icon_size_lookup (size, &w, &h);
 
 	pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), name, w, 0, NULL);
 	/* can't load from gnome-icon-theme */
 	if (pixbuf == NULL) {
-		pk_warning ("can't load %s", name);
+		egg_warning ("can't load %s", name);
 		return FALSE;
 	}
 
@@ -124,11 +126,11 @@
 gpk_animated_icon_update (GpkAnimatedIcon *icon)
 {
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	/* have we loaded a file */
 	if (icon->frames == NULL) {
-		pk_warning ("no frames to process");
+		egg_warning ("no frames to process");
 		return FALSE;
 	}
 
@@ -149,7 +151,7 @@
 {
 	g_return_val_if_fail (GPK_IS_ANIMATED_ICON (icon), FALSE);
 
-	pk_debug ("frame delay set to %ims", delay_ms);
+	egg_debug ("frame delay set to %ims", delay_ms);
 	icon->frame_delay = delay_ms;
 
 	/* do we have to change a running icon? */
@@ -171,7 +173,7 @@
 
 	if (!enabled) {
 		if (icon->animation_id == 0) {
-			pk_debug ("ignoring stop on stopped icon");
+			egg_debug ("ignoring stop on stopped icon");
 			return FALSE;
 		}
 
@@ -182,7 +184,7 @@
 
 	/* don't double queue */
 	if (icon->animation_id != 0) {
-		pk_debug ("ignoring start on started icon");
+		egg_debug ("ignoring start on started icon");
 		return FALSE;
 	}
 

Modified: trunk/src/gpk-application-main.c
==============================================================================
--- trunk/src/gpk-application-main.c	(original)
+++ trunk/src/gpk-application-main.c	Tue Sep  2 16:20:06 2008
@@ -34,7 +34,7 @@
 /* local .la */
 #include <libunique.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include "gpk-application.h"
 #include "gpk-common.h"
 
@@ -103,7 +103,7 @@
 		return 0;
 	}
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */

Modified: trunk/src/gpk-application-state.c
==============================================================================
--- trunk/src/gpk-application-state.c	(original)
+++ trunk/src/gpk-application-state.c	Tue Sep  2 16:20:06 2008
@@ -28,7 +28,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-enum.h>
 #include <pk-common.h>
 

Modified: trunk/src/gpk-application.c
==============================================================================
--- trunk/src/gpk-application.c	(original)
+++ trunk/src/gpk-application.c	Tue Sep  2 16:20:06 2008
@@ -33,7 +33,9 @@
 #include <locale.h>
 #include <polkit-gnome/polkit-gnome.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include <pk-enum.h>
 #include <pk-client.h>
 #include <pk-control.h>
@@ -215,7 +217,7 @@
 	GtkTextBuffer *buffer;
 	buffer = gtk_text_buffer_new (NULL);
 	/* ITS4: ignore, not used for allocation */
-	if (pk_strzero (text) == FALSE) {
+	if (egg_strzero (text) == FALSE) {
 		gtk_text_buffer_set_text (buffer, text, -1);
 	} else {
 		/* no information */
@@ -268,7 +270,7 @@
 	selection = gtk_tree_view_get_selection (treeview);
 	ret = gtk_tree_selection_get_selected (selection, &model, &iter);
 	if (!ret) {
-		pk_warning ("no selection");
+		egg_warning ("no selection");
 		return;
 	}
 
@@ -370,7 +372,7 @@
 
 	/* shouldn't be possible */
 	if (application->priv->package == NULL) {
-		pk_warning ("no package");
+		egg_warning ("no package");
 		return FALSE;
 	}
 
@@ -378,7 +380,7 @@
 	if (application->priv->action == PK_ACTION_REMOVE) {
 		ret = pk_package_list_remove (application->priv->package_list, application->priv->package);
 		if (ret) {
-			pk_debug ("removed %s from package list", application->priv->package);
+			egg_debug ("removed %s from package list", application->priv->package);
 
 			/* correct buttons */
 			gpk_application_allow_install (application, FALSE);
@@ -387,14 +389,14 @@
 			gpk_application_set_buttons_apply_clear (application);
 			return TRUE;
 		}
-		pk_warning ("wrong mode and not in list");
+		egg_warning ("wrong mode and not in list");
 		return FALSE;
 	}
 
 	/* already added */
 	ret = pk_package_list_contains (application->priv->package_list, application->priv->package);
 	if (ret) {
-		pk_warning ("already added");
+		egg_warning ("already added");
 		return FALSE;
 	}
 
@@ -448,7 +450,7 @@
 
 	files = gpk_client_get_file_list (application->priv->gclient, application->priv->package, &error);
 	if (files == NULL) {
-		pk_warning ("could not get file list: %s", error->message);
+		egg_warning ("could not get file list: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -490,7 +492,7 @@
 
 	/* shouldn't be possible */
 	if (application->priv->package == NULL) {
-		pk_warning ("no package");
+		egg_warning ("no package");
 		return FALSE;
 	}
 
@@ -498,7 +500,7 @@
 	if (application->priv->action == PK_ACTION_INSTALL) {
 		ret = pk_package_list_remove (application->priv->package_list, application->priv->package);
 		if (ret) {
-			pk_debug ("removed %s from package list", application->priv->package);
+			egg_debug ("removed %s from package list", application->priv->package);
 
 			/* correct buttons */
 			gpk_application_allow_install (application, TRUE);
@@ -507,14 +509,14 @@
 			gpk_application_set_buttons_apply_clear (application);
 			return TRUE;
 		}
-		pk_warning ("wrong mode and not in list");
+		egg_warning ("wrong mode and not in list");
 		return FALSE;
 	}
 
 	/* already added */
 	ret = pk_package_list_contains (application->priv->package_list, application->priv->package);
 	if (ret) {
-		pk_warning ("already added");
+		egg_warning ("already added");
 		return FALSE;
 	}
 
@@ -573,7 +575,7 @@
 	selection = gtk_tree_view_get_selection (treeview);
 	ret = gtk_tree_selection_get_selected (selection, &model, &iter);
 	if (!ret) {
-		pk_warning ("no selection");
+		egg_warning ("no selection");
 		return;
 	}
 
@@ -590,7 +592,7 @@
 		if (exec != NULL) {
 			ret = g_spawn_command_line_async (exec, &error);
 			if (!ret) {
-				pk_warning ("failed to run: %s", error->message);
+				egg_warning ("failed to run: %s", error->message);
 				g_error_free (error);
 			}
 		}
@@ -615,7 +617,7 @@
 	/* cancel any previous request */
 	ret = pk_client_reset (application->priv->client_files, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel, and adding to queue: %s", error->message);
+		egg_warning ("failed to cancel, and adding to queue: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -628,7 +630,7 @@
 	pk_client_set_synchronous (application->priv->client_files, FALSE, NULL);
 
 	if (!ret) {
-		pk_warning ("failed to get requires: %s", error->message);
+		egg_warning ("failed to get requires: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -687,7 +689,7 @@
 	/* cancel any previous request */
 	ret = pk_client_reset (application->priv->client_files, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel, and adding to queue: %s", error->message);
+		egg_warning ("failed to cancel, and adding to queue: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -700,7 +702,7 @@
 	pk_client_set_synchronous (application->priv->client_files, FALSE, NULL);
 
 	if (!ret) {
-		pk_warning ("failed to get depends: %s", error->message);
+		egg_warning ("failed to get depends: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -753,15 +755,15 @@
 	const gchar *repo_name;
 
 	/* if no data, we can't look up in the hash table */
-	if (pk_strzero (data)) {
-		pk_warning ("no ident data");
+	if (egg_strzero (data)) {
+		egg_warning ("no ident data");
 		return _("Invalid");
 	}
 
 	/* try to find in cached repo list */
 	repo_name = (const gchar *) g_hash_table_lookup (application->priv->repos, data);
 	if (repo_name == NULL) {
-		pk_warning ("no repo name, falling back to %s", data);
+		egg_warning ("no repo name, falling back to %s", data);
 		return data;
 	}
 	return repo_name;
@@ -781,7 +783,7 @@
 	/* format */
 	markup = g_strdup_printf ("<b>%s:</b>", title);
 
-	pk_debug ("%s %s %s", markup, text, uri);
+	egg_debug ("%s %s %s", markup, text, uri);
 	gtk_list_store_append (application->priv->details_store, &iter);
 	gtk_list_store_set (application->priv->details_store, &iter,
 			    DETAIL_COLUMN_TITLE, markup,
@@ -849,7 +851,7 @@
 
 	g_return_if_fail (PK_IS_APPLICATION (application));
 
-	installed = pk_strequal (details->id->data, "installed");
+	installed = egg_strequal (details->id->data, "installed");
 
 	/* get the icon */
 	icon = pk_extra_get_icon_name (application->priv->extra, details->id->name);
@@ -874,7 +876,7 @@
 
 	/* homepage */
 	widget = glade_xml_get_widget (application->priv->glade_xml, "menuitem_homepage");
-	if (pk_strzero (details->url) == FALSE) {
+	if (egg_strzero (details->url) == FALSE) {
 		gtk_widget_set_sensitive (widget, TRUE);
 
 		/* set the tooltip to where we are going */
@@ -899,7 +901,7 @@
 	}
 
 	/* group */
-	if (!pk_strzero (details->license)) {
+	if (!egg_strzero (details->license)) {
 		/* This should be a licence enum value - bad API, bad.
 		 * license = pk_license_enum_to_text (license_enum); */
 		gpk_application_add_detail_item (application, _("License"), details->license, NULL);
@@ -951,7 +953,7 @@
 
 	g_return_if_fail (PK_IS_APPLICATION (application));
 
-	pk_debug ("package = %s:%s:%s", pk_info_enum_to_text (obj->info), obj->id->name, obj->summary);
+	egg_debug ("package = %s:%s:%s", pk_info_enum_to_text (obj->info), obj->id->name, obj->summary);
 
 	/* ignore progress */
 	if (obj->info != PK_INFO_ENUM_INSTALLED && obj->info != PK_INFO_ENUM_AVAILABLE) {
@@ -1044,7 +1046,7 @@
 	/* get role -- do we actually need to do anything */
 	pk_client_get_role (application->priv->client_search, &role, NULL, NULL);
 	if (role == PK_ROLE_ENUM_UNKNOWN) {
-		pk_debug ("no defined role, no not requeuing");
+		egg_debug ("no defined role, no not requeuing");
 		return FALSE;
 	}
 
@@ -1054,7 +1056,7 @@
 
 	ret = pk_client_requeue (application->priv->client_search, &error);
 	if (!ret) {
-		pk_warning ("failed to requeue the search: %s", error->message);
+		egg_warning ("failed to requeue the search: %s", error->message);
 		g_error_free (error);
 		return FALSE;
 	}
@@ -1151,7 +1153,7 @@
 	g_return_if_fail (PK_IS_APPLICATION (application));
 
 	ret = pk_client_cancel (application->priv->client_search, NULL);
-	pk_debug ("canceled? %i", ret);
+	egg_debug ("canceled? %i", ret);
 
 	/* switch buttons around */
 	if (ret) {
@@ -1175,26 +1177,26 @@
 	package = gtk_entry_get_text (GTK_ENTRY (widget));
 
 	/* have we got input? */
-	if (pk_strzero (package)) {
-		pk_debug ("no input");
+	if (egg_strzero (package)) {
+		egg_debug ("no input");
 		return FALSE;
 	}
 
 	ret = pk_strvalidate (package);
 	if (!ret) {
-		pk_debug ("invalid input text, will fail");
+		egg_debug ("invalid input text, will fail");
 		/* TODO - make the dialog turn red... */
 		widget = glade_xml_get_widget (application->priv->glade_xml, "window_manager");
 		gpk_error_dialog_modal (GTK_WINDOW (widget), _("Invalid search text"),
 					_("The search text contains invalid characters"), NULL);
 		return FALSE;
 	}
-	pk_debug ("find %s", package);
+	egg_debug ("find %s", package);
 
 	/* reset */
 	ret = pk_client_reset (application->priv->client_search, &error);
 	if (!ret) {
-		pk_warning ("failed to reset client: %s", error->message);
+		egg_warning ("failed to reset client: %s", error->message);
 		g_error_free (error);
 		return FALSE;
 	}
@@ -1207,7 +1209,7 @@
 	} else if (application->priv->search_type == PK_SEARCH_FILE) {
 		ret = pk_client_search_file (application->priv->client_search, application->priv->filters_current, package, &error);
 	} else {
-		pk_warning ("invalid search type");
+		egg_warning ("invalid search type");
 		return FALSE;
 	}
 
@@ -1238,7 +1240,7 @@
 	/* cancel this, we don't care about old results that are pending */
 	ret = pk_client_reset (application->priv->client_search, &error);
 	if (!ret) {
-		pk_warning ("failed to reset client: %s", error->message);
+		egg_warning ("failed to reset client: %s", error->message);
 		g_error_free (error);
 		return FALSE;
 	}
@@ -1282,7 +1284,7 @@
 		   application->priv->search_mode == PK_MODE_ALL_PACKAGES) {
 		ret = gpk_application_perform_search_others (application);
 	} else {
-		pk_debug ("doing nothing");
+		egg_debug ("doing nothing");
 	}
 	if (!ret) {
 		return ret;
@@ -1321,24 +1323,24 @@
 	/* we might have visual stuff running, close them down */
 	ret = pk_client_cancel (application->priv->client_search, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel client: %s", error->message);
+		egg_warning ("failed to cancel client: %s", error->message);
 		g_error_free (error);
 		error = NULL;
 	}
 	ret = pk_client_cancel (application->priv->client_details, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel client: %s", error->message);
+		egg_warning ("failed to cancel client: %s", error->message);
 		g_error_free (error);
 		error = NULL;
 	}
 	ret = pk_client_cancel (application->priv->client_files, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel client: %s", error->message);
+		egg_warning ("failed to cancel client: %s", error->message);
 		g_error_free (error);
 		error = NULL;
 	}
 
-	pk_debug ("emitting action-close");
+	egg_debug ("emitting action-close");
 	g_signal_emit (application, signals [ACTION_CLOSE], 0);
 	return TRUE;
 }
@@ -1385,7 +1387,7 @@
 	valid = pk_strvalidate (package);
 
 	widget = glade_xml_get_widget (application->priv->glade_xml, "button_find");
-	if (valid == FALSE || pk_strzero (package)) {
+	if (valid == FALSE || egg_strzero (package)) {
 		gtk_widget_set_sensitive (widget, FALSE);
 	} else {
 		gtk_widget_set_sensitive (widget, TRUE);
@@ -1521,7 +1523,7 @@
 			if (exec != NULL) {
 				ret = g_spawn_command_line_async (exec, &error);
 				if (!ret) {
-					pk_warning ("failed to run: %s", error->message);
+					egg_warning ("failed to run: %s", error->message);
 					g_error_free (error);
 				}
 			}
@@ -1626,10 +1628,10 @@
 	if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
 		g_free (application->priv->group);
 		gtk_tree_model_get (model, &iter, GROUPS_COLUMN_ID, &application->priv->group, -1);
-		pk_debug ("selected row is: %s", application->priv->group);
+		egg_debug ("selected row is: %s", application->priv->group);
 
 		/* GetPackages? */
-		if (pk_strequal (application->priv->group, "all-packages")) {
+		if (egg_strequal (application->priv->group, "all-packages")) {
 			application->priv->search_mode = PK_MODE_ALL_PACKAGES;
 		} else {
 			application->priv->search_mode = PK_MODE_GROUP;
@@ -1665,7 +1667,7 @@
 
 	/* This will only work in single or browse selection mode! */
 	if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
-		pk_debug ("no row selected");
+		egg_debug ("no row selected");
 
 		/* we cannot now add it */
 		gpk_application_allow_install (application, FALSE);
@@ -1680,10 +1682,10 @@
 
 	/* check we aren't a help line */
 	gtk_tree_model_get (model, &iter, PACKAGES_COLUMN_IMAGE, &image, -1);
-	ret = pk_strequal (image, "search");
+	ret = egg_strequal (image, "search");
 	g_free (image);
 	if (ret) {
-		pk_debug ("ignoring help click");
+		egg_debug ("ignoring help click");
 		return;
 	}
 
@@ -1721,7 +1723,7 @@
 	/* cancel any previous request */
 	ret = pk_client_reset (application->priv->client_details, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel, and adding to queue: %s", error->message);
+		egg_warning ("failed to cancel, and adding to queue: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -1731,7 +1733,7 @@
 	ret = pk_client_get_details (application->priv->client_details, package_ids, &error);
 	g_strfreev (package_ids);
 	if (!ret) {
-		pk_warning ("failed to get details: %s", error->message);
+		egg_warning ("failed to get details: %s", error->message);
 		g_error_free (error);
 	}
 }
@@ -1744,7 +1746,7 @@
 {
 	g_return_if_fail (PK_IS_APPLICATION (application));
 
-	pk_debug ("connected=%i", connected);
+	egg_debug ("connected=%i", connected);
 }
 
 /**
@@ -1776,13 +1778,13 @@
 				      gchar *string1, gchar *string2,
 				      gint int1, gint int2, gpointer user_data)
 {
-	if (pk_strequal (name, "entry_text")) {
+	if (egg_strequal (name, "entry_text")) {
 		return sexy_icon_entry_new ();
 	}
-	if (pk_strequal (name, "image_status")) {
+	if (egg_strequal (name, "image_status")) {
 		return gpk_animated_icon_new ();
 	}
-	pk_warning ("name unknown='%s'", name);
+	egg_warning ("name unknown='%s'", name);
 	return NULL;
 }
 
@@ -1821,7 +1823,7 @@
 
 	/* change type */
 	application->priv->search_type = PK_SEARCH_NAME;
-	pk_debug ("set search type=%i", application->priv->search_type);
+	egg_debug ("set search type=%i", application->priv->search_type);
 
 	/* set the new icon */
 	widget = glade_xml_get_widget (application->priv->glade_xml, "entry_text");
@@ -1842,7 +1844,7 @@
 
 	/* set type */
 	application->priv->search_type = PK_SEARCH_DETAILS;
-	pk_debug ("set search type=%i", application->priv->search_type);
+	egg_debug ("set search type=%i", application->priv->search_type);
 
 	/* set the new icon */
 	widget = glade_xml_get_widget (application->priv->glade_xml, "entry_text");
@@ -1863,7 +1865,7 @@
 
 	/* set type */
 	application->priv->search_type = PK_SEARCH_FILE;
-	pk_debug ("set search type=%i", application->priv->search_type);
+	egg_debug ("set search type=%i", application->priv->search_type);
 
 	/* set the new icon */
 	widget = glade_xml_get_widget (application->priv->glade_xml, "entry_text");
@@ -1889,7 +1891,7 @@
 	if (button != 1) {
 		return;
 	}
-	pk_debug ("icon_pos=%i", icon_pos);
+	egg_debug ("icon_pos=%i", icon_pos);
 
 	if (pk_bitfield_contain (application->priv->roles, PK_ROLE_ENUM_SEARCH_NAME)) {
 		item = gtk_image_menu_item_new_with_mnemonic (_("Search by name"));
@@ -1949,7 +1951,7 @@
 	list = pk_package_list_new ();
 	ret = pk_package_list_add_file (list, PK_PACKAGE_LIST_LOCATION);
 	if (!ret) {
-		pk_warning ("no package list, try running pk-generate-package-list as root");
+		egg_warning ("no package list, try running pk-generate-package-list as root");
 		return NULL;
 	}
 
@@ -1957,7 +1959,7 @@
 	for (i=0; i<length; i++) {
 		obj = pk_package_list_get_obj (list, i);
 		if (obj == NULL || obj->id == NULL || obj->id->name == NULL) {
-			pk_warning ("obj invalid!");
+			egg_warning ("obj invalid!");
 			break;
 		}
 		data = g_hash_table_lookup (hash, (gpointer) obj->id->name);
@@ -2116,7 +2118,7 @@
 
 	ret = g_spawn_command_line_async ("gpk-repo", NULL);
 	if (!ret) {
-		pk_warning ("spawn of pk-repo failed");
+		egg_warning ("spawn of pk-repo failed");
 	}
 }
 
@@ -2450,7 +2452,7 @@
 	model = gtk_tree_view_get_model (treeview);
 	ret = gtk_tree_model_get_iter (model, &iter, path);
 	if (!ret) {
-		pk_warning ("failed to get selection");
+		egg_warning ("failed to get selection");
 		return;
 	}
 
@@ -2474,7 +2476,7 @@
 	gchar *name = NULL;
 	gboolean ret;
 	gtk_tree_model_get (model, iter, GROUPS_COLUMN_ID, &name, -1);
-	ret = pk_strequal (name, "separator");
+	ret = egg_strequal (name, "separator");
 	g_free (name);
 	return ret;
 }
@@ -2489,7 +2491,7 @@
 {
 	g_return_if_fail (PK_IS_APPLICATION (application));
 
-	pk_debug ("repo = %s:%s", repo_id, description);
+	egg_debug ("repo = %s:%s", repo_id, description);
 	/* no problem, just no point adding as we will fallback to the repo_id */
 	if (description == NULL) {
 		return;
@@ -2503,7 +2505,7 @@
 static void
 gpk_application_treeview_renderer_clicked (GtkCellRendererToggle *cell, gchar *uri, GpkApplication *application)
 {
-	pk_debug ("clicked %s", uri);
+	egg_debug ("clicked %s", uri);
 	gpk_gnome_open (uri);
 }
 
@@ -2681,7 +2683,7 @@
 	application->priv->extra = pk_extra_new ();
 	ret = pk_extra_set_database (application->priv->extra, NULL);
 	if (!ret) {
-		pk_warning ("Failure setting database");
+		egg_warning ("Failure setting database");
 	}
 
 	/* set the locale */
@@ -3071,7 +3073,7 @@
 	/* get repos, so we can show the full name in the software source box */
 	ret = pk_client_get_repo_list (application->priv->client_action, PK_FILTER_ENUM_NONE, &error);
 	if (!ret) {
-		pk_warning ("failed to get repo list: %s", error->message);
+		egg_warning ("failed to get repo list: %s", error->message);
 		g_error_free (error);
 	}
 

Modified: trunk/src/gpk-auto-refresh.c
==============================================================================
--- trunk/src/gpk-auto-refresh.c	(original)
+++ trunk/src/gpk-auto-refresh.c	Tue Sep  2 16:20:06 2008
@@ -34,11 +34,12 @@
 #endif /* HAVE_UNISTD_H */
 #include <glib/gi18n.h>
 #include <dbus/dbus-glib.h>
-#include <pk-dbus-monitor.h>
 #include <gconf/gconf-client.h>
-
-#include <pk-debug.h>
 #include <pk-control.h>
+
+#include "egg-debug.h"
+#include "egg-dbus-monitor.h"
+
 #include "gpk-common.h"
 #include "gpk-auto-refresh.h"
 
@@ -73,8 +74,8 @@
 	gboolean		 network_active;
 	gboolean		 session_delay;
 	gboolean		 sent_get_updates;
-	PkDbusMonitor		*monitor_gs;
-	PkDbusMonitor		*monitor_gpm;
+	EggDbusMonitor		*monitor_gs;
+	EggDbusMonitor		*monitor_gpm;
 	GConfClient		*gconf_client;
 	DBusGProxy		*proxy_gs;
 	DBusGProxy		*proxy_gpm;
@@ -128,7 +129,7 @@
 {
 	g_return_val_if_fail (GPK_IS_AUTO_REFRESH (arefresh), FALSE);
 
-	pk_debug ("emitting refresh-cache");
+	egg_debug ("emitting refresh-cache");
 	g_signal_emit (arefresh, signals [REFRESH_CACHE], 0);
 	return TRUE;
 }
@@ -141,7 +142,7 @@
 {
 	g_return_val_if_fail (GPK_IS_AUTO_REFRESH (arefresh), FALSE);
 
-	pk_debug ("emitting get-updates");
+	egg_debug ("emitting get-updates");
 	g_signal_emit (arefresh, signals [GET_UPDATES], 0);
 	return TRUE;
 }
@@ -154,7 +155,7 @@
 {
 	g_return_val_if_fail (GPK_IS_AUTO_REFRESH (arefresh), FALSE);
 
-	pk_debug ("emitting get-upgrades");
+	egg_debug ("emitting get-upgrades");
 	g_signal_emit (arefresh, signals [GET_UPGRADES], 0);
 	return TRUE;
 }
@@ -169,7 +170,7 @@
 gpk_auto_refresh_convert_frequency (PkFreqEnum freq)
 {
 	if (freq == PK_FREQ_ENUM_UNKNOWN) {
-		pk_warning ("no schema");
+		egg_warning ("no schema");
 		return 0;
 	}
 	if (freq == PK_FREQ_ENUM_NEVER) {
@@ -184,7 +185,7 @@
 	if (freq == PK_FREQ_ENUM_WEEKLY) {
 		return 60*60*24*7;
 	}
-	pk_warning ("unknown frequency enum");
+	egg_warning ("unknown frequency enum");
 	return 0;
 }
 
@@ -202,7 +203,7 @@
 	/* get from gconf */
 	freq_text = gconf_client_get_string (arefresh->priv->gconf_client, key, NULL);
 	if (freq_text == NULL) {
-		pk_warning ("no schema for %s", key);
+		egg_warning ("no schema for %s", key);
 		return 0;
 	}
 
@@ -226,26 +227,26 @@
 	/* if we don't want to auto check for updates, don't do this either */
 	thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_GET_UPDATES);
 	if (thresh == 0) {
-		pk_debug ("not when policy is to never refresh");
+		egg_debug ("not when policy is to never refresh");
 		return FALSE;
 	}
 
 	/* not on battery */
 	if (arefresh->priv->on_battery) {
-		pk_debug ("not when on battery");
+		egg_debug ("not when on battery");
 		return FALSE;
 	}
 
 	/* only do the refresh cache when the user is idle */
 	if (arefresh->priv->session_idle == FALSE) {
-		pk_debug ("not when session active");
+		egg_debug ("not when session active");
 		return FALSE;
 	}
 
 	/* get this each time, as it may have changed behind out back */
 	thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_REFRESH_CACHE);
 	if (thresh == 0) {
-		pk_debug ("not when policy is to never refresh");
+		egg_debug ("not when policy is to never refresh");
 		return FALSE;
 	}
 
@@ -253,13 +254,13 @@
 	ret = pk_control_get_time_since_action (arefresh->priv->control,
 						PK_ROLE_ENUM_REFRESH_CACHE, &time, NULL);
 	if (ret == FALSE) {
-		pk_warning ("failed to get last time");
+		egg_warning ("failed to get last time");
 		return FALSE;
 	}
 
 	/* have we passed the timout? */
 	if (time < thresh) {
-		pk_debug ("not before timeout, thresh=%u, now=%u", thresh, time);
+		egg_debug ("not before timeout, thresh=%u, now=%u", thresh, time);
 		return FALSE;
 	}
 
@@ -282,7 +283,7 @@
 	/* get this each time, as it may have changed behind out back */
 	thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_GET_UPDATES);
 	if (thresh == 0) {
-		pk_debug ("not when policy is to never refresh");
+		egg_debug ("not when policy is to never refresh");
 		return FALSE;
 	}
 
@@ -290,13 +291,13 @@
 	ret = pk_control_get_time_since_action (arefresh->priv->control,
 						PK_ROLE_ENUM_GET_UPDATES, &time, NULL);
 	if (ret == FALSE) {
-		pk_warning ("failed to get last time");
+		egg_warning ("failed to get last time");
 		return FALSE;
 	}
 
 	/* have we passed the timout? */
 	if (time < thresh) {
-		pk_debug ("not before timeout, thresh=%u, now=%u", thresh, time);
+		egg_debug ("not before timeout, thresh=%u, now=%u", thresh, time);
 		return FALSE;
 	}
 
@@ -319,7 +320,7 @@
 	/* get this each time, as it may have changed behind out back */
 	thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_GET_UPGRADES);
 	if (thresh == 0) {
-		pk_debug ("not when policy is to never refresh");
+		egg_debug ("not when policy is to never refresh");
 		return FALSE;
 	}
 
@@ -327,13 +328,13 @@
 	ret = pk_control_get_time_since_action (arefresh->priv->control,
 						PK_ROLE_ENUM_GET_DISTRO_UPGRADES, &time, NULL);
 	if (ret == FALSE) {
-		pk_debug ("failed to get last time");
+		egg_debug ("failed to get last time");
 		return FALSE;
 	}
 
 	/* have we passed the timout? */
 	if (time < thresh) {
-		pk_debug ("not before timeout, thresh=%u, now=%u", thresh, time);
+		egg_debug ("not before timeout, thresh=%u, now=%u", thresh, time);
 		return FALSE;
 	}
 
@@ -351,13 +352,13 @@
 
 	/* we shouldn't do this early in the session startup */
 	if (arefresh->priv->session_delay == FALSE) {
-		pk_debug ("not when this early in the session");
+		egg_debug ("not when this early in the session");
 		return FALSE;
 	}
 
 	/* no point continuing if we have no network */
 	if (arefresh->priv->network_active == FALSE) {
-		pk_debug ("not when no network");
+		egg_debug ("not when no network");
 		return FALSE;
 	}
 
@@ -385,7 +386,7 @@
 {
 	g_return_if_fail (GPK_IS_AUTO_REFRESH (arefresh));
 
-	pk_debug ("setting is_idle %i", is_idle);
+	egg_debug ("setting is_idle %i", is_idle);
 	arefresh->priv->session_idle = is_idle;
 	gpk_auto_refresh_change_state (arefresh);
 }
@@ -398,7 +399,7 @@
 {
 	g_return_if_fail (GPK_IS_AUTO_REFRESH (arefresh));
 
-	pk_debug ("setting on_battery %i", on_battery);
+	egg_debug ("setting on_battery %i", on_battery);
 	arefresh->priv->on_battery = on_battery;
 	gpk_auto_refresh_change_state (arefresh);
 }
@@ -422,7 +423,7 @@
 	g_return_if_fail (GPK_IS_AUTO_REFRESH (arefresh));
 
 	arefresh->priv->network_active = (state == PK_NETWORK_ENUM_ONLINE);
-	pk_debug ("setting online %i", arefresh->priv->network_active);
+	egg_debug ("setting online %i", arefresh->priv->network_active);
 	gpk_auto_refresh_change_state (arefresh);
 }
 
@@ -437,7 +438,7 @@
 	g_return_val_if_fail (GPK_IS_AUTO_REFRESH (arefresh), FALSE);
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	/* triggered once an hour */
 	gpk_auto_refresh_change_state (arefresh);
@@ -457,11 +458,11 @@
 	g_return_val_if_fail (GPK_IS_AUTO_REFRESH (arefresh), FALSE);
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	/* we have waited enough */
 	if (arefresh->priv->session_delay == FALSE) {
-		pk_debug ("setting session delay TRUE");
+		egg_debug ("setting session delay TRUE");
 		arefresh->priv->session_delay = TRUE;
 	}
 
@@ -476,7 +477,7 @@
  * pk_connection_gpm_changed_cb:
  **/
 static void
-pk_connection_gpm_changed_cb (PkDbusMonitor *pk_dbus_monitor, gboolean connected, GpkAutoRefresh *arefresh)
+pk_connection_gpm_changed_cb (EggDbusMonitor *egg_dbus_monitor, gboolean connected, GpkAutoRefresh *arefresh)
 {
 	GError *error = NULL;
 	gboolean on_battery;
@@ -484,7 +485,7 @@
 
 	g_return_if_fail (GPK_IS_AUTO_REFRESH (arefresh));
 
-	pk_debug ("gnome-power-manager connection-changed: %i", connected);
+	egg_debug ("gnome-power-manager connection-changed: %i", connected);
 
 	/* is this valid? */
 	if (connected == FALSE) {
@@ -499,7 +500,7 @@
 	arefresh->priv->proxy_gpm = dbus_g_proxy_new_for_name_owner (arefresh->priv->connection,
 					  GPM_DBUS_SERVICE, GPM_DBUS_PATH, GPM_DBUS_INTERFACE, &error);
 	if (error != NULL) {
-		pk_warning ("Cannot connect to gnome-power-manager: %s", error->message);
+		egg_warning ("Cannot connect to gnome-power-manager: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -521,7 +522,7 @@
 	}
 	if (ret) {
 		arefresh->priv->on_battery = on_battery;
-		pk_debug ("setting on battery %i", on_battery);
+		egg_debug ("setting on battery %i", on_battery);
 	}
 }
 
@@ -529,13 +530,13 @@
  * pk_connection_gs_changed_cb:
  **/
 static void
-pk_connection_gs_changed_cb (PkDbusMonitor *pk_dbus_monitor, gboolean connected, GpkAutoRefresh *arefresh)
+pk_connection_gs_changed_cb (EggDbusMonitor *egg_dbus_monitor, gboolean connected, GpkAutoRefresh *arefresh)
 {
 	GError *error = NULL;
 
 	g_return_if_fail (GPK_IS_AUTO_REFRESH (arefresh));
 
-	pk_debug ("gnome-screensaver connection-changed: %i", connected);
+	egg_debug ("gnome-screensaver connection-changed: %i", connected);
 
 	/* is this valid? */
 	if (connected == FALSE) {
@@ -550,7 +551,7 @@
 	arefresh->priv->proxy_gs = dbus_g_proxy_new_for_name_owner (arefresh->priv->connection,
 					  GS_DBUS_SERVICE, GS_DBUS_PATH, GS_DBUS_INTERFACE, &error);
 	if (error != NULL) {
-		pk_warning ("Cannot connect to gnome-screensaver: %s", error->message);
+		egg_warning ("Cannot connect to gnome-screensaver: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -599,22 +600,22 @@
 	/* connect to session bus */
 	arefresh->priv->connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
 	if (error != NULL) {
-		pk_warning ("Cannot connect to session bus: %s", error->message);
+		egg_warning ("Cannot connect to session bus: %s", error->message);
 		g_error_free (error);
 		return;
 	}
 
 	/* watch gnome-screensaver */
-	arefresh->priv->monitor_gs = pk_dbus_monitor_new ();
+	arefresh->priv->monitor_gs = egg_dbus_monitor_new ();
 	g_signal_connect (arefresh->priv->monitor_gs, "connection-changed",
 			  G_CALLBACK (pk_connection_gs_changed_cb), arefresh);
-	pk_dbus_monitor_assign (arefresh->priv->monitor_gs, PK_DBUS_MONITOR_SESSION, GS_DBUS_SERVICE);
+	egg_dbus_monitor_assign (arefresh->priv->monitor_gs, EGG_DBUS_MONITOR_SESSION, GS_DBUS_SERVICE);
 
 	/* watch gnome-power-manager */
-	arefresh->priv->monitor_gpm = pk_dbus_monitor_new ();
+	arefresh->priv->monitor_gpm = egg_dbus_monitor_new ();
 	g_signal_connect (arefresh->priv->monitor_gpm, "connection-changed",
 			  G_CALLBACK (pk_connection_gpm_changed_cb), arefresh);
-	pk_dbus_monitor_assign (arefresh->priv->monitor_gpm, PK_DBUS_MONITOR_SESSION, GPM_DBUS_SERVICE);
+	egg_dbus_monitor_assign (arefresh->priv->monitor_gpm, EGG_DBUS_MONITOR_SESSION, GPM_DBUS_SERVICE);
 
 	/* we check this in case we miss one of the async signals */
 	g_timeout_add_seconds (GPK_AUTO_REFRESH_PERIODIC_CHECK, gpk_auto_refresh_timeout_cb, arefresh);

Modified: trunk/src/gpk-backend-status.c
==============================================================================
--- trunk/src/gpk-backend-status.c	(original)
+++ trunk/src/gpk-backend-status.c	Tue Sep  2 16:20:06 2008
@@ -33,7 +33,7 @@
 #include <pk-control.h>
 #include <locale.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 
 /**
  * pk_updates_close_cb:
@@ -42,7 +42,7 @@
 pk_updates_close_cb (GtkWidget *widget, gpointer data)
 {
 	GMainLoop *loop = (GMainLoop *) data;
-	pk_debug ("emitting action-close");
+	egg_debug ("emitting action-close");
 	g_main_loop_quit (loop);
 }
 
@@ -107,7 +107,7 @@
 		return 0;
 	}
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	loop = g_main_loop_new (NULL, FALSE);
@@ -119,7 +119,7 @@
 	/* general stuff */
 	retval = pk_control_get_backend_detail (control, &name, &author, NULL);
 	if (FALSE == retval) {
-		pk_warning (_("Exiting as backend details could not be retrieved"));
+		egg_warning (_("Exiting as backend details could not be retrieved"));
 		return 1;
 	}
 

Modified: trunk/src/gpk-cell-renderer-uri.c
==============================================================================
--- trunk/src/gpk-cell-renderer-uri.c	(original)
+++ trunk/src/gpk-cell-renderer-uri.c	Tue Sep  2 16:20:06 2008
@@ -24,7 +24,7 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <pk-debug.h>
+#include "egg-debug.h"
 
 #include "gpk-cell-renderer-uri.h"
 
@@ -82,7 +82,7 @@
 
 	gpk_cell_renderer_uri_set_clicked (cru, TRUE);
 
-	pk_debug ("emit: %s", cru->uri);
+	egg_debug ("emit: %s", cru->uri);
 	g_signal_emit (cell, signals [CLICKED], 0, cru->uri);
 	return TRUE;
 }
@@ -160,7 +160,7 @@
 			return;
 		}
 	}
-	pk_debug ("cannot get color for %i,%i,%i", color->red, color->blue, color->green);
+	egg_debug ("cannot get color for %i,%i,%i", color->red, color->blue, color->green);
 }
 
 static void

Modified: trunk/src/gpk-check-update.c
==============================================================================
--- trunk/src/gpk-check-update.c	(original)
+++ trunk/src/gpk-check-update.c	Tue Sep  2 16:20:06 2008
@@ -38,7 +38,6 @@
 #include <gconf/gconf-client.h>
 #include <libnotify/notify.h>
 
-#include <pk-debug.h>
 #include <pk-client.h>
 #include <pk-control.h>
 #include <pk-common.h>
@@ -48,9 +47,11 @@
 #include <pk-package-ids.h>
 #include <pk-package-list.h>
 
-#include <gpk-common.h>
-#include <gpk-gnome.h>
+#include "egg-debug.h"
+#include "egg-string.h"
 
+#include "gpk-common.h"
+#include "gpk-gnome.h"
 #include "gpk-smart-icon.h"
 #include "gpk-auto-refresh.h"
 #include "gpk-client.h"
@@ -112,7 +113,7 @@
 {
 	const gchar *command = "gpk-prefs";
 	if (g_spawn_command_line_async (command, NULL) == FALSE) {
-		pk_warning ("Couldn't execute command: %s", command);
+		egg_warning ("Couldn't execute command: %s", command);
 	}
 }
 
@@ -237,7 +238,7 @@
 	GtkWidget *item;
 	GtkWidget *image;
 
-	pk_debug ("icon right clicked");
+	egg_debug ("icon right clicked");
 
 	/* Preferences */
 	item = gtk_image_menu_item_new_with_mnemonic (_("_Preferences"));
@@ -288,7 +289,7 @@
 	g_return_val_if_fail (GPK_IS_CHECK_UPDATE (cupdate), FALSE);
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	gpk_check_update_query_updates (cupdate);
 	return FALSE;
@@ -332,7 +333,7 @@
 {
 	const gchar *command = "gpk-update-viewer";
 	if (g_spawn_command_line_async (command, NULL) == FALSE) {
-		pk_warning ("Couldn't execute command: %s", command);
+		egg_warning ("Couldn't execute command: %s", command);
 	}
 }
 
@@ -349,7 +350,7 @@
 	GtkWidget *item;
 	GtkWidget *image;
 
-	pk_debug ("icon left clicked");
+	egg_debug ("icon left clicked");
 
 	/* show updates */
 	item = gtk_image_menu_item_new_with_mnemonic (_("_Show Updates"));
@@ -381,7 +382,7 @@
 pk_connection_changed_cb (PkConnection *pconnection, gboolean connected, GpkCheckUpdate *cupdate)
 {
 	g_return_if_fail (GPK_IS_CHECK_UPDATE (cupdate));
-	pk_debug ("connected=%i", connected);
+	egg_debug ("connected=%i", connected);
 }
 
 /**
@@ -395,28 +396,28 @@
 	gchar **package_ids;
 	GpkCheckUpdate *cupdate = GPK_CHECK_UPDATE (data);
 
-	if (pk_strequal (action, "update-all-packages")) {
+	if (egg_strequal (action, "update-all-packages")) {
 		gpk_check_update_update_system (cupdate);
-	} else if (pk_strequal (action, "update-just-security")) {
+	} else if (egg_strequal (action, "update-just-security")) {
 
 		/* just update the important updates */
 		package_ids = pk_package_ids_from_array (cupdate->priv->important_updates_array);
 		gpk_client_set_interaction (cupdate->priv->gclient, GPK_CLIENT_INTERACT_NEVER);
 		ret = gpk_client_update_packages (cupdate->priv->gclient, package_ids, &error);
 		if (!ret) {
-			pk_warning ("Individual updates failed: %s", error->message);
+			egg_warning ("Individual updates failed: %s", error->message);
 			g_error_free (error);
 		}
 		g_strfreev (package_ids);
 
-	} else if (pk_strequal (action, "do-not-show-notify-critical")) {
-		pk_debug ("set %s to FALSE", GPK_CONF_NOTIFY_CRITICAL);
+	} else if (egg_strequal (action, "do-not-show-notify-critical")) {
+		egg_debug ("set %s to FALSE", GPK_CONF_NOTIFY_CRITICAL);
 		gconf_client_set_bool (cupdate->priv->gconf_client, GPK_CONF_NOTIFY_CRITICAL, FALSE, NULL);
-	} else if (pk_strequal (action, "do-not-show-update-not-battery")) {
-		pk_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_NOT_BATTERY);
+	} else if (egg_strequal (action, "do-not-show-update-not-battery")) {
+		egg_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_NOT_BATTERY);
 		gconf_client_set_bool (cupdate->priv->gconf_client, GPK_CONF_NOTIFY_UPDATE_NOT_BATTERY, FALSE, NULL);
 	} else {
-		pk_warning ("unknown action id: %s", action);
+		egg_warning ("unknown action id: %s", action);
 	}
 }
 
@@ -440,7 +441,7 @@
 	/* do we do the notification? */
 	ret = gconf_client_get_bool (cupdate->priv->gconf_client, GPK_CONF_NOTIFY_CRITICAL, NULL);
 	if (!ret) {
-		pk_debug ("ignoring due to GConf");
+		egg_debug ("ignoring due to GConf");
 		return;
 	}
 
@@ -474,7 +475,7 @@
 	/* do the bubble */
 	notification = notify_notification_new (title, message, "help-browser", NULL);
 	if (notification == NULL) {
-		pk_warning ("failed to get bubble");
+		egg_warning ("failed to get bubble");
 		return;
 	}
 	notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
@@ -487,7 +488,7 @@
 					_("Do not show this again"), gpk_check_update_libnotify_cb, cupdate, NULL);
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 	/* track so we can prevent doubled notifications */
@@ -519,10 +520,10 @@
 	for (i=0; i<length; i++) {
 		obj = pk_package_list_get_obj (list, i);
 		if (obj == NULL) {
-			pk_warning ("not found obj %i", i);
+			egg_warning ("not found obj %i", i);
 			break;
 		}
-		pk_debug ("%s %s", obj->id->name, pk_info_enum_to_text (obj->info));
+		egg_debug ("%s %s", obj->id->name, pk_info_enum_to_text (obj->info));
 		pk_bitfield_add (infos, obj->info);
 	}
 	return infos;
@@ -552,7 +553,7 @@
 					   PK_INFO_ENUM_ENHANCEMENT,
 					   PK_INFO_ENUM_LOW, -1);
 	if (value == -1) {
-		pk_warning ("should not be possible!");
+		egg_warning ("should not be possible!");
 		value = PK_INFO_ENUM_LOW;
 	}
 
@@ -576,20 +577,20 @@
 
 	ret = gconf_client_get_bool (cupdate->priv->gconf_client, GPK_CONF_UPDATE_BATTERY, NULL);
 	if (ret) {
-		pk_debug ("okay to update due to policy");
+		egg_debug ("okay to update due to policy");
 		return TRUE;
 	}
 
 	ret = gpk_auto_refresh_get_on_battery (cupdate->priv->arefresh);
 	if (!ret) {
-		pk_debug ("okay to update as on AC");
+		egg_debug ("okay to update as on AC");
 		return TRUE;
 	}
 
 	/* do we do the notification? */
 	ret = gconf_client_get_bool (cupdate->priv->gconf_client, GPK_CONF_NOTIFY_UPDATE_NOT_BATTERY, NULL);
 	if (!ret) {
-		pk_debug ("ignoring due to GConf");
+		egg_debug ("ignoring due to GConf");
 		return FALSE;
 	}
 
@@ -604,7 +605,7 @@
 					_("Do the updates anyway"), gpk_check_update_libnotify_cb, cupdate, NULL);
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 
@@ -624,7 +625,7 @@
 
 	updates = gconf_client_get_string (cupdate->priv->gconf_client, GPK_CONF_AUTO_UPDATE, NULL);
 	if (updates == NULL) {
-		pk_warning ("'%s' gconf key is null!", GPK_CONF_AUTO_UPDATE);
+		egg_warning ("'%s' gconf key is null!", GPK_CONF_AUTO_UPDATE);
 		return PK_UPDATE_ENUM_UNKNOWN;
 	}
 	update = pk_update_enum_from_text (updates);
@@ -657,14 +658,14 @@
 
 	/* are we already called */
 	if (cupdate->priv->get_updates_in_progress) {
-		pk_debug ("GetUpdate already in progress");
+		egg_debug ("GetUpdate already in progress");
 		return FALSE;
 	}
 
 	/* No point if we are already updating */
 	if (pk_task_list_contains_role (cupdate->priv->tlist, PK_ROLE_ENUM_UPDATE_PACKAGES) ||
 	    pk_task_list_contains_role (cupdate->priv->tlist, PK_ROLE_ENUM_UPDATE_SYSTEM)) {
-		pk_debug ("Not checking for updates as already in progress");
+		egg_debug ("Not checking for updates as already in progress");
 		return FALSE;
 	}
 
@@ -674,7 +675,7 @@
 	list = gpk_client_get_updates (cupdate->priv->gclient, &error);
 	cupdate->priv->get_updates_in_progress = FALSE;
 	if (list == NULL) {
-		pk_warning ("failed to get updates: %s", error->message);
+		egg_warning ("failed to get updates: %s", error->message);
 		g_error_free (error);
 		return FALSE;
 	}
@@ -686,11 +687,11 @@
 
 	/* find packages */
 	length = pk_package_list_get_size (list);
-	pk_debug ("length=%i", length);
+	egg_debug ("length=%i", length);
 
 	/* we have no updates */
 	if (length == 0) {
-		pk_debug ("no updates");
+		egg_debug ("no updates");
 		gpk_smart_icon_set_icon_name (cupdate->priv->sicon, NULL);
 		goto out;
 	}
@@ -719,7 +720,7 @@
 	/* do we do the automatic updates? */
 	update = gpk_check_update_get_update_policy (cupdate);
 	if (update == PK_UPDATE_ENUM_UNKNOWN) {
-		pk_warning ("policy unknown");
+		egg_warning ("policy unknown");
 		goto out;
 	}
 
@@ -738,7 +739,7 @@
 
 	/* is policy none? */
 	if (update == PK_UPDATE_ENUM_NONE) {
-		pk_debug ("not updating as policy NONE");
+		egg_debug ("not updating as policy NONE");
 
 		/* do we warn the user? */
 		if (security_array->len > 0) {
@@ -750,7 +751,7 @@
 	/* are we on battery and configured to skip the action */
 	ret = gpk_check_update_check_on_battery (cupdate);
 	if (!ret) {
-		pk_debug ("on battery so not doing update");
+		egg_debug ("on battery so not doing update");
 		/* do we warn the user? */
 		if (security_array->len > 0) {
 			gpk_check_update_critical_updates_warning (cupdate, status_security->str, security_array);
@@ -761,7 +762,7 @@
 	/* just do security updates */
 	if (update == PK_UPDATE_ENUM_SECURITY) {
 		if (security_array->len == 0) {
-			pk_debug ("policy security, but none available");
+			egg_debug ("policy security, but none available");
 			goto out;
 		}
 
@@ -770,7 +771,7 @@
 		gpk_client_set_interaction (cupdate->priv->gclient, GPK_CLIENT_INTERACT_NEVER);
 		ret = gpk_client_update_packages (cupdate->priv->gclient, package_ids, &error);
 		if (!ret) {
-			pk_warning ("Individual updates failed: %s", error->message);
+			egg_warning ("Individual updates failed: %s", error->message);
 			g_error_free (error);
 		}
 		g_strfreev (package_ids);
@@ -779,14 +780,14 @@
 
 	/* just do everything */
 	if (update == PK_UPDATE_ENUM_ALL) {
-		pk_debug ("we should do the update automatically!");
+		egg_debug ("we should do the update automatically!");
 		gpk_client_set_interaction (cupdate->priv->gclient, GPK_CLIENT_INTERACT_NEVER);
 		g_idle_add ((GSourceFunc) gpk_check_update_update_system, cupdate);
 		goto out;
 	}
 
 	/* shouldn't happen */
-	pk_warning ("unknown update mode");
+	egg_warning ("unknown update mode");
 out:
 	g_object_unref (list);
 	g_string_free (status_security, TRUE);
@@ -814,7 +815,7 @@
 	g_return_if_fail (GPK_IS_CHECK_UPDATE (cupdate));
 
 	/* now try to get newest update list */
-	pk_debug ("updates changed");
+	egg_debug ("updates changed");
 
 	/* ignore our own updates */
 	if (!cupdate->priv->get_updates_in_progress) {
@@ -838,10 +839,10 @@
 	g_usleep (2*G_USEC_PER_SEC);
 
 	file = BINDIR "/gpk-update-icon";
-	pk_debug ("trying to spawn: %s", file);
+	egg_debug ("trying to spawn: %s", file);
 	ret = g_spawn_command_line_async (file, &error);
 	if (!ret) {
-		pk_warning ("failed to spawn new instance: %s", error->message);
+		egg_warning ("failed to spawn new instance: %s", error->message);
 		g_error_free (error);
 	}
 }
@@ -887,7 +888,7 @@
 	ret = gpk_client_refresh_cache (cupdate->priv->gclient, NULL);
 	if (!ret) {
 		/* we failed to get the cache */
-		pk_warning ("failed to refresh cache");
+		egg_warning ("failed to refresh cache");
 
 		/* try again in a few minutes */
 		cupdate->priv->cache_okay = FALSE;
@@ -896,7 +897,7 @@
 		cupdate->priv->cache_okay = TRUE;
 
 		/* now try to get updates */
-		pk_debug ("get updates");
+		egg_debug ("get updates");
 		gpk_check_update_query_updates (cupdate);
 	}
 	cupdate->priv->cache_update_in_progress = FALSE;
@@ -936,21 +937,21 @@
 	gpk_client_set_interaction (cupdate->priv->gclient, GPK_CLIENT_INTERACT_ALWAYS);
 	array = gpk_client_get_distro_upgrades (cupdate->priv->gclient, &error);
 	if (array == NULL) {
-		pk_warning ("failed to get upgrades: %s", error->message);
+		egg_warning ("failed to get upgrades: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
 
 	/* any updates? */
 	if (array->len == 0) {
-		pk_debug ("no upgrades");
+		egg_debug ("no upgrades");
 		goto out;
 	}
 
 	/* do we do the notification? */
 	ret = gconf_client_get_bool (cupdate->priv->gconf_client, GPK_CONF_NOTIFY_DISTRO_UPGRADES, NULL);
 	if (!ret) {
-		pk_debug ("ignoring due to GConf");
+		egg_debug ("ignoring due to GConf");
 		goto out;
 	}
 
@@ -968,7 +969,7 @@
 	title = _("Distribution upgrades available");
 	notification = notify_notification_new (title, string->str, "help-browser", NULL);
 	if (notification == NULL) {
-		pk_warning ("failed to get bubble");
+		egg_warning ("failed to get bubble");
 		return;
 	}
 	notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
@@ -979,7 +980,7 @@
 					_("Do not show this again"), gpk_check_update_libnotify_cb, cupdate, NULL);
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 out:

Modified: trunk/src/gpk-client-chooser.c
==============================================================================
--- trunk/src/gpk-client-chooser.c	(original)
+++ trunk/src/gpk-client-chooser.c	Tue Sep  2 16:20:06 2008
@@ -28,12 +28,15 @@
 #include <glade/glade.h>
 #include <polkit-gnome/polkit-gnome.h>
 
-#include <pk-debug.h>
 #include <pk-common.h>
 #include <pk-client.h>
 #include <pk-enum.h>
 #include <pk-extra.h>
 #include <pk-package-id.h>
+
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include "gpk-gnome.h"
 #include "gpk-common.h"
 
@@ -94,9 +97,9 @@
 		gtk_tree_model_get (model, &iter, GPK_CHOOSER_COLUMN_ID, &package_id, -1);
 
 		/* show package_id */
-		pk_debug ("selected row is: %s", package_id);
+		egg_debug ("selected row is: %s", package_id);
 	} else {
-		pk_debug ("no row selected");
+		egg_debug ("no row selected");
 	}
 }
 
@@ -108,10 +111,10 @@
 				        gchar *string1, gchar *string2,
 				        gint int1, gint int2, gpointer user_data)
 {
-	if (pk_strequal (name, "button_action")) {
+	if (egg_strequal (name, "button_action")) {
 		return polkit_gnome_action_create_button (button_action);
 	}
-	pk_warning ("name unknown=%s", name);
+	egg_warning ("name unknown=%s", name);
 	return NULL;
 }
 
@@ -240,7 +243,7 @@
 	len = pk_package_list_get_size (list);
 	for (i=0; i<len; i++) {
 		obj = pk_package_list_get_obj (list, i);
-		pk_debug ("package '%s' got:", obj->id->name);
+		egg_debug ("package '%s' got:", obj->id->name);
 
 		/* put formatted text into treeview */
 		gtk_list_store_append (list_store, &iter);

Modified: trunk/src/gpk-client-depends.c
==============================================================================
--- trunk/src/gpk-client-depends.c	(original)
+++ trunk/src/gpk-client-depends.c	Tue Sep  2 16:20:06 2008
@@ -28,7 +28,7 @@
 #include <glade/glade.h>
 #include <gconf/gconf-client.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-client.h>
 #include <pk-package-id.h>
 #include <pk-package-list.h>
@@ -82,7 +82,7 @@
 	/* have we previously said we don't want to be shown the confirmation */
 	ret = gconf_client_get_bool (gconf_client, GPK_CONF_SHOW_DEPENDS, NULL);
 	if (!ret) {
-		pk_debug ("we've said we don't want the dep dialog");
+		egg_debug ("we've said we don't want the dep dialog");
 		ret = TRUE;
 		goto out;
 	}

Modified: trunk/src/gpk-client-eula.c
==============================================================================
--- trunk/src/gpk-client-eula.c	(original)
+++ trunk/src/gpk-client-eula.c	Tue Sep  2 16:20:06 2008
@@ -27,7 +27,7 @@
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-package-id.h>
 #include "gpk-gnome.h"
 #include "gpk-common.h"

Modified: trunk/src/gpk-client-requires.c
==============================================================================
--- trunk/src/gpk-client-requires.c	(original)
+++ trunk/src/gpk-client-requires.c	Tue Sep  2 16:20:06 2008
@@ -27,7 +27,7 @@
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-common.h>
 #include <pk-client.h>
 #include <pk-extra.h>

Modified: trunk/src/gpk-client-resolve.c
==============================================================================
--- trunk/src/gpk-client-resolve.c	(original)
+++ trunk/src/gpk-client-resolve.c	Tue Sep  2 16:20:06 2008
@@ -27,7 +27,7 @@
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-client.h>
 #include <pk-common.h>
 #include <pk-package-id.h>
@@ -97,7 +97,7 @@
 		if (obj->info == PK_INFO_ENUM_INSTALLED) {
 			already_installed = TRUE;
 		} else if (obj->info == PK_INFO_ENUM_AVAILABLE) {
-			pk_debug ("package '%s' resolved", obj->id->name);
+			egg_debug ("package '%s' resolved", obj->id->name);
 			id = obj->id;
 			//TODO: we need to list these in a gpk-client-chooser
 		}

Modified: trunk/src/gpk-client-run.c
==============================================================================
--- trunk/src/gpk-client-run.c	(original)
+++ trunk/src/gpk-client-run.c	Tue Sep  2 16:20:06 2008
@@ -27,11 +27,14 @@
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 
-#include <pk-debug.h>
 #include <pk-common.h>
 #include <pk-client.h>
 #include <pk-enum.h>
 #include <pk-package-id.h>
+
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include "gpk-gnome.h"
 #include "gpk-client.h"
 #include "gpk-common.h"
@@ -93,9 +96,9 @@
 		gtk_tree_model_get (model, &iter, GPK_CHOOSER_COLUMN_FULL_PATH, &full_path, -1);
 
 		/* show full_path */
-		pk_debug ("selected row is: %s", full_path);
+		egg_debug ("selected row is: %s", full_path);
 	} else {
-		pk_debug ("no row selected");
+		egg_debug ("no row selected");
 	}
 }
 
@@ -107,10 +110,10 @@
 				        gchar *string1, gchar *string2,
 				        gint int1, gint int2, gpointer user_data)
 {
-	if (pk_strequal (name, "button_action")) {
+	if (egg_strequal (name, "button_action")) {
 		return gtk_button_new_with_mnemonic (_("_Run"));
 	}
-	pk_warning ("name unknown=%s", name);
+	egg_warning ("name unknown=%s", name);
 	return NULL;
 }
 
@@ -174,8 +177,8 @@
 		/* have we the same executable name?
 		 * this helps when there's "f-spot", "fspot --import %f", and "f-spot --view" in 3
 		 * different desktop files */
-		if (pk_strequal (exec, last_tryexec)) {
-			pk_debug ("same as the last exec '%s' so skipping", exec);
+		if (egg_strequal (exec, last_tryexec)) {
+			egg_debug ("same as the last exec '%s' so skipping", exec);
 			goto out;
 		}
 
@@ -245,10 +248,10 @@
 
 	for (i=0; i<length; i++) {
 		package_id = package_ids[i];
-		pk_debug ("package_id=%s", package_id);
+		egg_debug ("package_id=%s", package_id);
 		files = gpk_client_get_file_list (gclient, package_ids[0], &error);
 		if (files == NULL) {
-			pk_warning ("could not get file list: %s", error->message);
+			egg_warning ("could not get file list: %s", error->message);
 			g_error_free (error);
 			error = NULL;
 			continue;
@@ -256,7 +259,7 @@
 		files_len = g_strv_length (files);
 		for (j=0; j<files_len; j++) {
 			if (g_str_has_suffix (files[j], ".desktop")) {
-				pk_debug ("package=%s, file=%s", package_id, files[j]);
+				egg_debug ("package=%s, file=%s", package_id, files[j]);
 				gpk_client_add_executable (package_id, files[j]);
 				added++;
 			}

Modified: trunk/src/gpk-client-signature.c
==============================================================================
--- trunk/src/gpk-client-signature.c	(original)
+++ trunk/src/gpk-client-signature.c	Tue Sep  2 16:20:06 2008
@@ -27,7 +27,7 @@
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-package-id.h>
 #include "gpk-gnome.h"
 #include "gpk-common.h"

Modified: trunk/src/gpk-client-untrusted.c
==============================================================================
--- trunk/src/gpk-client-untrusted.c	(original)
+++ trunk/src/gpk-client-untrusted.c	Tue Sep  2 16:20:06 2008
@@ -28,7 +28,7 @@
 #include <glade/glade.h>
 #include <polkit-gnome/polkit-gnome.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-enum.h>
 #include <pk-package-id.h>
 #include "gpk-gnome.h"
@@ -42,7 +42,7 @@
 static void
 gpk_client_untrusted_button_cb (PolKitGnomeAction *action, gpointer data)
 {
-	pk_debug ("need to retry...");
+	egg_debug ("need to retry...");
 	retry_untrusted = TRUE;
 	gtk_main_quit ();
 }

Modified: trunk/src/gpk-client.c
==============================================================================
--- trunk/src/gpk-client.c	(original)
+++ trunk/src/gpk-client.c	Tue Sep  2 16:20:06 2008
@@ -40,7 +40,6 @@
 #include <polkit-gnome/polkit-gnome.h>
 #include <libnotify/notify.h>
 
-#include <pk-debug.h>
 #include <pk-client.h>
 #include <pk-package-id.h>
 #include <pk-package-ids.h>
@@ -49,6 +48,9 @@
 #include <pk-catalog.h>
 #include <pk-distro-upgrade-obj.h>
 
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include <gpk-client.h>
 #include <gpk-client-eula.h>
 #include <gpk-client-signature.h>
@@ -187,7 +189,7 @@
 gpk_client_main_wait (GpkClient *gclient)
 {
 	if (gclient->priv->gtk_main_waiting) {
-		pk_warning ("already started!");
+		egg_warning ("already started!");
 		return FALSE;
 	}
 	/* wait for completion */
@@ -204,7 +206,7 @@
 gpk_client_main_quit (GpkClient *gclient)
 {
 	if (!gclient->priv->gtk_main_waiting) {
-		pk_warning ("not already started!");
+		egg_warning ("not already started!");
 		return FALSE;
 	}
 	gtk_main_quit ();
@@ -250,7 +252,7 @@
 	/* go! */
 	gtk_widget_hide (widget);
 
-	pk_debug ("quitting due to window close");
+	egg_debug ("quitting due to window close");
 	gpk_client_main_quit (gclient);
 	g_signal_emit (gclient, signals [GPK_CLIENT_QUIT], 0);
 	return FALSE;
@@ -266,7 +268,7 @@
 	GpkClient *gclient = (GpkClient *) data;
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	/* hide window manually to get it out of the way */
 	widget = glade_xml_get_widget (gclient->priv->glade_xml, "window_updates");
@@ -275,7 +277,7 @@
 	/* the timer will be done */
 	gclient->priv->finished_timer_id = 0;
 
-	pk_debug ("quitting due to timeout");
+	egg_debug ("quitting due to timeout");
 	gpk_client_main_quit (gclient);
 	g_signal_emit (gclient, signals [GPK_CLIENT_QUIT], 0);
 	return FALSE;
@@ -320,30 +322,30 @@
 	GError *error = NULL;
 	GpkClient *gclient = GPK_CLIENT (data);
 
-	if (pk_strequal (action, "do-not-show-complete-restart")) {
-		pk_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_COMPLETE_RESTART);
+	if (egg_strequal (action, "do-not-show-complete-restart")) {
+		egg_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_COMPLETE_RESTART);
 		gconf_client_set_bool (gclient->priv->gconf_client, GPK_CONF_NOTIFY_UPDATE_COMPLETE_RESTART, FALSE, NULL);
-	} else if (pk_strequal (action, "do-not-show-complete")) {
-		pk_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_COMPLETE);
+	} else if (egg_strequal (action, "do-not-show-complete")) {
+		egg_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_COMPLETE);
 		gconf_client_set_bool (gclient->priv->gconf_client, GPK_CONF_NOTIFY_UPDATE_COMPLETE, FALSE, NULL);
-	} else if (pk_strequal (action, "do-not-show-update-started")) {
-		pk_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_STARTED);
+	} else if (egg_strequal (action, "do-not-show-update-started")) {
+		egg_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_STARTED);
 		gconf_client_set_bool (gclient->priv->gconf_client, GPK_CONF_NOTIFY_UPDATE_STARTED, FALSE, NULL);
-	} else if (pk_strequal (action, "cancel")) {
+	} else if (egg_strequal (action, "cancel")) {
 		/* try to cancel */
 		ret = pk_client_cancel (gclient->priv->client_action, &error);
 		if (!ret) {
-			pk_warning ("failed to cancel client: %s", error->message);
+			egg_warning ("failed to cancel client: %s", error->message);
 			g_error_free (error);
 		}
-	} else if (pk_strequal (action, "restart-computer")) {
+	} else if (egg_strequal (action, "restart-computer")) {
 		/* restart using gnome-power-manager */
 		ret = gpk_restart_system ();
 		if (!ret) {
-			pk_warning ("failed to reboot");
+			egg_warning ("failed to reboot");
 		}
 	} else {
-		pk_warning ("unknown action id: %s", action);
+		egg_warning ("unknown action id: %s", action);
 	}
 }
 
@@ -370,9 +372,9 @@
 	/* check we got some packages */
 	list = pk_client_get_package_list (client);
 	length = pk_package_list_get_size (list);
-	pk_debug ("length=%i", length);
+	egg_debug ("length=%i", length);
 	if (length == 0) {
-		pk_debug ("no updates");
+		egg_debug ("no updates");
 		return;
 	}
 
@@ -381,7 +383,7 @@
 	/* find any we skipped */
 	for (i=0; i<length; i++) {
 		obj = pk_package_list_get_obj (list, i);
-		pk_debug ("%s, %s, %s", pk_info_enum_to_text (obj->info),
+		egg_debug ("%s, %s, %s", pk_info_enum_to_text (obj->info),
 			  obj->id->name, obj->summary);
 		if (obj->info == PK_INFO_ENUM_BLOCKED) {
 			skipped_number++;
@@ -421,7 +423,7 @@
 	/* do we do the notification? */
 	ret = gconf_client_get_bool (gclient->priv->gconf_client, GPK_CONF_NOTIFY_UPDATE_COMPLETE, NULL);
 	if (!ret) {
-		pk_debug ("ignoring due to GConf");
+		egg_debug ("ignoring due to GConf");
 		return;
 	}
 
@@ -440,7 +442,7 @@
 	}
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 	g_string_free (message_text, TRUE);
@@ -491,7 +493,7 @@
 out:
 	/* only quit if there is not another transaction scheduled to be finished */
 	if (!gclient->priv->using_secondary_client) {
-		pk_debug ("quitting due to finished");
+		egg_debug ("quitting due to finished");
 		gpk_client_main_quit (gclient);
 	}
 }
@@ -507,7 +509,7 @@
 	g_return_val_if_fail (GPK_IS_CLIENT (gclient), FALSE);
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	widget = glade_xml_get_widget (gclient->priv->glade_xml, "progressbar_percent");
 	gtk_progress_bar_pulse (GTK_PROGRESS_BAR (widget));
@@ -676,16 +678,16 @@
 	if (code == PK_ERROR_ENUM_GPG_FAILURE ||
 	    code == PK_ERROR_ENUM_NO_LICENSE_AGREEMENT) {
 		if (gclient->priv->using_secondary_client) {
-			pk_debug ("ignoring error as handled");
+			egg_debug ("ignoring error as handled");
 			return;
 		}
-		pk_warning ("did not auth");
+		egg_warning ("did not auth");
 	}
 
 	/* have we handled? */
 	if (code == PK_ERROR_ENUM_BAD_GPG_SIGNATURE ||
 	    code == PK_ERROR_ENUM_MISSING_GPG_SIGNATURE) {
-		pk_debug ("handle and requeue");
+		egg_debug ("handle and requeue");
 		gclient->priv->retry_untrusted_value = gpk_client_untrusted_show (code);
 		return;
 	}
@@ -693,11 +695,11 @@
 	/* ignore some errors */
 	if (code == PK_ERROR_ENUM_PROCESS_KILL ||
 	    code == PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
-		pk_debug ("error ignored %s\n%s", pk_error_enum_to_text (code), details);
+		egg_debug ("error ignored %s\n%s", pk_error_enum_to_text (code), details);
 		return;
 	}
 
-	pk_debug ("code was %s", pk_error_enum_to_text (code));
+	egg_debug ("code was %s", pk_error_enum_to_text (code));
 
 	/* use a modal dialog if showing progress, else use libnotify */
 	title = gpk_error_enum_to_localised_text (code);
@@ -714,7 +716,7 @@
 	notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 }
@@ -748,7 +750,7 @@
 
 	/* copy into array */
 	g_ptr_array_add (gclient->priv->upgrade_array, pk_distro_upgrade_obj_copy (obj));
-	pk_debug ("%s, %s, %s", obj->name, pk_update_state_enum_to_text (obj->state), obj->summary);
+	egg_debug ("%s, %s, %s", obj->name, pk_update_state_enum_to_text (obj->state), obj->summary);
 }
 
 /**
@@ -764,7 +766,7 @@
 	g_strfreev (gclient->priv->files_array);
 
 	/* no data, eugh */
-	if (pk_strzero (filelist)) {
+	if (egg_strzero (filelist)) {
 		gclient->priv->files_array = NULL;
 		return;
 	}
@@ -809,7 +811,7 @@
 	/* we might have a transaction running */
 	ret = pk_client_cancel (gclient->priv->client_action, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel client: %s", error->message);
+		egg_warning ("failed to cancel client: %s", error->message);
 		g_error_free (error);
 	}
 }
@@ -847,14 +849,14 @@
 
 	/* dumb */
 	if (error == NULL) {
-		pk_warning ("No error set, so can't set: %s", buffer);
+		egg_warning ("No error set, so can't set: %s", buffer);
 		ret = FALSE;
 		goto out;
 	}
 
 	/* already set */
 	if (*error != NULL) {
-		pk_warning ("not NULL error!");
+		egg_warning ("not NULL error!");
 		g_clear_error (error);
 	}
 
@@ -996,7 +998,7 @@
 	} else if (exit == PK_EXIT_ENUM_KILLED) {
 		gpk_client_error_set (error, GPK_CLIENT_ERROR_FAILED, "The transaction was killed");
 	} else {
-		pk_error ("unknown exit code");
+		egg_error ("unknown exit code");
 	}
 	return FALSE;
 }
@@ -1074,6 +1076,45 @@
 }
 
 /**
+ * gpk_check_permissions:
+ * @filename: a filename to check
+ * @euid: the effective user ID to check for, or the output of geteuid()
+ * @egid: the effective group ID to check for, or the output of getegid()
+ * @mode: bitfield of R_OK, W_OK, XOK
+ *
+ * Like, access but a bit more accurate - access will let root do anything.
+ * Does not get read-only or no-exec filesystems right.
+ *
+ * Return value: %TRUE if the file has access perms
+ **/
+static gboolean
+gpk_check_permissions (const gchar *filename, guint euid, guint egid, guint mode)
+{
+	struct stat statbuf;
+
+	if (stat (filename, &statbuf) == 0) {
+		if ((mode & R_OK) &&
+		    !((statbuf.st_mode & S_IROTH) ||
+		      ((statbuf.st_mode & S_IRUSR) && euid == statbuf.st_uid) ||
+		      ((statbuf.st_mode & S_IRGRP) && egid == statbuf.st_gid)))
+			return FALSE;
+		if ((mode & W_OK) &&
+		    !((statbuf.st_mode & S_IWOTH) ||
+		      ((statbuf.st_mode & S_IWUSR) && euid == statbuf.st_uid) ||
+		      ((statbuf.st_mode & S_IWGRP) && egid == statbuf.st_gid)))
+			return FALSE;
+		if ((mode & X_OK) &&
+		    !((statbuf.st_mode & S_IXOTH) ||
+		      ((statbuf.st_mode & S_IXUSR) && euid == statbuf.st_uid) ||
+		      ((statbuf.st_mode & S_IXGRP) && egid == statbuf.st_gid)))
+			return FALSE;
+
+		return TRUE;
+	}
+	return FALSE;
+}
+
+/**
  * gpk_client_install_local_files_copy_private:
  *
  * Allow the user to confirm the package copy to /tmp
@@ -1100,7 +1141,7 @@
 	array_missing = g_ptr_array_new ();
 	for (i=0; i<array->len; i++) {
 		data = (gchar *) g_ptr_array_index (array, i);
-		ret = pk_check_permissions (data, 0, 0, R_OK);
+		ret = gpk_check_permissions (data, 0, 0, R_OK);
 		if (!ret)
 			g_ptr_array_add (array_missing, g_strdup (data));
 	}
@@ -1116,8 +1157,11 @@
 		/* show UI */
 		dialog = gtk_message_dialog_new (gclient->priv->parent_window,
 						 GTK_DIALOG_DESTROY_WITH_PARENT,
-						 GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL,
+						 GTK_MESSAGE_QUESTION, GTK_BUTTONS_CANCEL,
 						 "%s", title);
+		/* add a specialist button */
+		gtk_dialog_add_button (GTK_DIALOG (dialog), _("Copy file"), GTK_RESPONSE_OK);
+
 		gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", message);
 		g_free (message);
 
@@ -1145,7 +1189,7 @@
 		GError *error = NULL;
 
 		data = (gchar *) g_ptr_array_index (array_new, i);
-		ret = pk_check_permissions (data, 0, 0, R_OK);
+		ret = gpk_check_permissions (data, 0, 0, R_OK);
 		if (ret) {
 			/* just copy over the name */
 			g_ptr_array_add (array, g_strdup (data));
@@ -1155,12 +1199,12 @@
 			dest_path = g_strdup_printf ("/tmp/%s", dest);
 
 			command = g_strdup_printf ("cp \"%s\" \"%s\"", data, dest_path);
-			pk_debug ("command=%s", command);
+			egg_debug ("command=%s", command);
 			ret = g_spawn_command_line_sync (command, NULL, NULL, NULL, &error);
 
 			/* we failed */
 			if (!ret) {
-				pk_warning ("failed to copy %s: %s", data, error->message);
+				egg_warning ("failed to copy %s: %s", data, error->message);
 				g_error_free (error);
 				break;
 			}
@@ -1169,7 +1213,7 @@
 			retval = g_chmod (dest_path, 0644);
 			if (retval < 0) {
 				ret = FALSE;
-				pk_warning ("failed to chmod %s", dest_path);
+				egg_warning ("failed to chmod %s", dest_path);
 				break;
 			}
 
@@ -1224,8 +1268,11 @@
 	/* show UI */
 	dialog = gtk_message_dialog_new (gclient->priv->parent_window,
 					 GTK_DIALOG_DESTROY_WITH_PARENT,
-					 GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL,
+					 GTK_MESSAGE_QUESTION, GTK_BUTTONS_CANCEL,
 					 "%s", title);
+	/* add a specialist button */
+	gtk_dialog_add_button (GTK_DIALOG (dialog), _("Install"), GTK_RESPONSE_OK);
+
 	gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", message);
 
 	button = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1421,7 +1468,7 @@
 
 	/* are we dumb and can't check for depends? */
 	if (!pk_bitfield_contain (gclient->priv->roles, PK_ROLE_ENUM_GET_REQUIRES)) {
-		pk_warning ("skipping depends check");
+		egg_warning ("skipping depends check");
 		goto skip_checks;
 	}
 
@@ -1521,7 +1568,7 @@
 
 	/* are we dumb and can't check for depends? */
 	if (!pk_bitfield_contain (gclient->priv->roles, PK_ROLE_ENUM_GET_DEPENDS)) {
-		pk_warning ("skipping depends check");
+		egg_warning ("skipping depends check");
 		goto skip_checks;
 	}
 
@@ -1676,7 +1723,7 @@
 			already_installed = TRUE;
 			id = obj->id;
 		} else if (obj->info == PK_INFO_ENUM_AVAILABLE) {
-			pk_debug ("package '%s' resolved to:", obj->id->name);
+			egg_debug ("package '%s' resolved to:", obj->id->name);
 			id = obj->id;
 		}
 	}
@@ -1906,7 +1953,11 @@
 
 	/* show UI */
 	dialog = gtk_message_dialog_new (gclient->priv->parent_window, GTK_DIALOG_DESTROY_WITH_PARENT,
-					 GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", title);
+					 GTK_MESSAGE_QUESTION, GTK_BUTTONS_CANCEL, "%s", title);
+
+	/* add a specialist button */
+	gtk_dialog_add_button (GTK_DIALOG (dialog), _("Install"), GTK_RESPONSE_OK);
+
 	gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", message);
 
 	button = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -2075,7 +2126,7 @@
 						_("Do not show this again"), gpk_client_libnotify_cb, gclient, NULL);
 		ret = notify_notification_show (notification, &error_local);
 		if (!ret) {
-			pk_warning ("error: %s", error_local->message);
+			egg_warning ("error: %s", error_local->message);
 			g_error_free (error_local);
 		}
 	}
@@ -2412,7 +2463,7 @@
 	}
 
 	/* install signature */
-	pk_debug ("install signature %s", key_id);
+	egg_debug ("install signature %s", key_id);
 	ret = pk_client_reset (gclient->priv->client_secondary, &error);
 	if (!ret) {
 		widget = glade_xml_get_widget (gclient->priv->glade_xml, "window_updates");
@@ -2454,7 +2505,7 @@
 	}
 
 	/* install signature */
-	pk_debug ("accept EULA %s", eula_id);
+	egg_debug ("accept EULA %s", eula_id);
 	ret = pk_client_reset (gclient->priv->client_secondary, &error);
 	if (!ret) {
 		widget = glade_xml_get_widget (gclient->priv->glade_xml, "window_updates");
@@ -2492,7 +2543,7 @@
 	gpk_client_set_page (gclient, GPK_CLIENT_PAGE_PROGRESS);
 	gclient->priv->using_secondary_client = FALSE;
 
-	pk_debug ("trying to requeue install");
+	egg_debug ("trying to requeue install");
 	ret = pk_client_requeue (gclient->priv->client_action, &error);
 	if (!ret) {
 		widget = glade_xml_get_widget (gclient->priv->glade_xml, "window_updates");
@@ -2531,7 +2582,7 @@
 	/* get role and text */
 	ret = pk_client_get_role (client, &role, &text, &error);
 	if (!ret) {
-		pk_warning ("failed to get role: %s", error->message);
+		egg_warning ("failed to get role: %s", error->message);
 		g_error_free (error);
 		return NULL;
 	}
@@ -2539,7 +2590,7 @@
 	/* backup */
 	role_text = gpk_role_enum_to_localised_present (role);
 
-	if (!pk_strzero (text) && role != PK_ROLE_ENUM_UPDATE_PACKAGES) {
+	if (!egg_strzero (text) && role != PK_ROLE_ENUM_UPDATE_PACKAGES) {
 		message = g_strdup_printf ("%s: %s", role_text, text);
 	} else {
 		message = g_strdup_printf ("%s", role_text);
@@ -2572,7 +2623,7 @@
 
 	ret = pk_client_set_tid (gclient->priv->client_action, tid, &error);
 	if (!ret) {
-		pk_warning ("could not set tid: %s", error->message);
+		egg_warning ("could not set tid: %s", error->message);
 		g_error_free (error);
 		return FALSE;
 	}
@@ -2586,7 +2637,7 @@
 	ret = pk_client_get_status (gclient->priv->client_action, &status, NULL);
 	/* no such transaction? */
 	if (!ret) {
-		pk_warning ("could not get status");
+		egg_warning ("could not get status");
 		return FALSE;
 	}
 	gpk_client_set_status (gclient, status);
@@ -2603,7 +2654,7 @@
 		gpk_client_progress_changed_cb (gclient->priv->client_action, percentage,
 						subpercentage, elapsed, remaining, gclient);
 	} else {
-		pk_warning ("GetProgress failed");
+		egg_warning ("GetProgress failed");
 		gpk_client_progress_changed_cb (gclient->priv->client_action,
 						PK_CLIENT_PERCENTAGE_INVALID,
 						PK_CLIENT_PERCENTAGE_INVALID, 0, 0, gclient);
@@ -2627,7 +2678,7 @@
 	/* get the role */
 	ret = pk_client_get_role (gclient->priv->client_action, &role, NULL, &error);
 	if (!ret) {
-		pk_warning ("failed to get role: %s", error->message);
+		egg_warning ("failed to get role: %s", error->message);
 		g_error_free (error);
 	}
 
@@ -2672,10 +2723,10 @@
 				 gchar *string1, gchar *string2,
 				 gint int1, gint int2, gpointer user_data)
 {
-	if (pk_strequal (name, "image_status")) {
+	if (egg_strequal (name, "image_status")) {
 		return gpk_animated_icon_new ();
 	}
-	pk_warning ("name unknown=%s", name);
+	egg_warning ("name unknown=%s", name);
 	return NULL;
 }
 

Modified: trunk/src/gpk-common.c
==============================================================================
--- trunk/src/gpk-common.c	(original)
+++ trunk/src/gpk-common.c	Tue Sep  2 16:20:06 2008
@@ -32,11 +32,13 @@
 
 #include <polkit-gnome/polkit-gnome.h>
 
-#include <pk-debug.h>
 #include <pk-package-id.h>
 #include <pk-enum.h>
 #include <pk-common.h>
 
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include "gpk-common.h"
 #include "gpk-error.h"
 
@@ -213,7 +215,7 @@
 		return g_strdup_printf ("%.1lf GB", frac);
 	}
 	/* no way.... */
-	pk_warning ("cannot have a file this large!");
+	egg_warning ("cannot have a file this large!");
 	return NULL;
 }
 
@@ -232,7 +234,7 @@
 	g_return_val_if_fail (id != NULL, NULL);
 
 	/* optional */
-	if (pk_strzero (summary)) {
+	if (egg_strzero (summary)) {
 		string = g_string_new (id->name);
 	} else {
 		string = g_string_new ("");
@@ -264,7 +266,7 @@
 	gchar *summary_safe;
 	gchar *text;
 
-	if (pk_strzero (summary)) {
+	if (egg_strzero (summary)) {
 		/* just have name */
 		text = g_strdup (id->name);
 	} else {
@@ -402,6 +404,9 @@
 	case PK_ERROR_ENUM_FILE_CONFLICTS:
 		text = _("Local file conflict between packages");
 		break;
+	case PK_ERROR_ENUM_PACKAGE_CONFLICTS:
+		text = _("Packages are not compatible");
+		break;
 	case PK_ERROR_ENUM_REPO_NOT_AVAILABLE:
 		text = _("Problem connecting to a software source");
 		break;
@@ -444,8 +449,11 @@
 	case PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED:
 		text = _("All packages are already installed");
 		break;
+	case PK_ERROR_ENUM_FILE_NOT_FOUND:
+		text = _("The specified file could not be found");
+		break;
 	default:
-		pk_warning ("Unknown error");
+		egg_warning ("Unknown error");
 	}
 	return text;
 }
@@ -555,6 +563,10 @@
 		text = _("Two packages provide the same file.\n"
 			 "This is usually due to mixing packages for different software sources.");
 		break;
+	case PK_ERROR_ENUM_PACKAGE_CONFLICTS:
+		text = _("Multiple packages exist that are not compatible with each other.\n"
+			 "This is usually due to mixing packages for different software sources.");
+		break;
 	case PK_ERROR_ENUM_REPO_NOT_AVAILABLE:
 		text = _("There was a (possibly temporary) problem connecting to a software source\n"
 			 "Please check the detailed error for further details.");
@@ -604,8 +616,12 @@
 	case PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED:
 		text = _("All of the packages selected for install are already installed on the system.");
 		break;
+	case PK_ERROR_ENUM_FILE_NOT_FOUND:
+		text = _("The specified file could not be found on the system.\n"
+			 "Check the file still exists and has not been deleted.");
+		break;
 	default:
-		pk_warning ("Unknown error, please report a bug at " GPK_BUGZILLA_URL ".\n"
+		egg_warning ("Unknown error, please report a bug at " GPK_BUGZILLA_URL ".\n"
 			    "More information is available in the detailed report.");
 	}
 	return text;
@@ -632,7 +648,7 @@
 		text = _("A system restart is required after this update");
 		break;
 	default:
-		pk_warning ("restart unrecognised: %i", restart);
+		egg_warning ("restart unrecognised: %i", restart);
 	}
 	return text;
 }
@@ -658,7 +674,7 @@
 		text = _("You need to restart the application");
 		break;
 	default:
-		pk_warning ("restart unrecognised: %i", restart);
+		egg_warning ("restart unrecognised: %i", restart);
 	}
 	return text;
 }
@@ -681,7 +697,7 @@
 		text = _("Testing");
 		break;
 	default:
-		pk_warning ("state unrecognised: %i", state);
+		egg_warning ("state unrecognised: %i", state);
 	}
 	return text;
 }
@@ -732,7 +748,7 @@
 		break;
 
 	default:
-		pk_warning ("message unrecognised: %i", message);
+		egg_warning ("message unrecognised: %i", message);
 	}
 	return text;
 }
@@ -830,7 +846,7 @@
 		text = _("Repackaging files");
 		break;
 	default:
-		pk_warning ("status unrecognised: %s", pk_status_enum_to_text (status));
+		egg_warning ("status unrecognised: %s", pk_status_enum_to_text (status));
 	}
 	return text;
 }
@@ -865,7 +881,7 @@
 		text = g_strdup_printf (ngettext ("%i bloked update", "%i blocked updates", number), number);
 		break;
 	default:
-		pk_warning ("update info unrecognised: %s", pk_info_enum_to_text (info));
+		egg_warning ("update info unrecognised: %s", pk_info_enum_to_text (info));
 	}
 	return text;
 }
@@ -906,7 +922,7 @@
 		text = _("Available");
 		break;
 	default:
-		pk_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
+		egg_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
 	}
 	return text;
 }
@@ -938,7 +954,7 @@
 		text = _("Obsoleting");
 		break;
 	default:
-		pk_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
+		egg_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
 	}
 	return text;
 }
@@ -970,7 +986,7 @@
 		text = _("Obsoleted");
 		break;
 	default:
-		pk_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
+		egg_warning ("info unrecognised: %s", pk_info_enum_to_text (info));
 	}
 	return text;
 }
@@ -1074,7 +1090,7 @@
 		text = _("Getting distribution upgrade information");
 		break;
 	default:
-		pk_warning ("role unrecognised: %s", pk_role_enum_to_text (role));
+		egg_warning ("role unrecognised: %s", pk_role_enum_to_text (role));
 	}
 	return text;
 }
@@ -1180,7 +1196,7 @@
 		text = _("Got distribution upgrades");
 		break;
 	default:
-		pk_warning ("role unrecognised: %s", pk_role_enum_to_text (role));
+		egg_warning ("role unrecognised: %s", pk_role_enum_to_text (role));
 	}
 	return text;
 }
@@ -1290,7 +1306,7 @@
 		text = _("Unknown group");
 		break;
 	default:
-		pk_warning ("group unrecognised: %i", group);
+		egg_warning ("group unrecognised: %i", group);
 	}
 	return text;
 }
@@ -1372,7 +1388,7 @@
 		gpk_error_dialog (title, message, "");
 		g_free (title);
 		g_free (message);
-		pk_warning ("uid=%i so closing", uid);
+		egg_warning ("uid=%i so closing", uid);
 		return FALSE;
 	}
 	return TRUE;
@@ -1391,7 +1407,7 @@
 	gboolean ret = TRUE;
 
 	/* trivial case */
-	if (pk_strzero (icon)) {
+	if (egg_strzero (icon)) {
 		return FALSE;
 	}
 
@@ -1403,7 +1419,7 @@
 	/* default to 32x32 */
 	icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon, 32, GTK_ICON_LOOKUP_USE_BUILTIN);
 	if (icon_info == NULL) {
-		pk_debug ("ignoring broken icon %s", icon);
+		egg_debug ("ignoring broken icon %s", icon);
 		ret = FALSE;
 	} else {
 		/* we only used this to see if it was valid */
@@ -1555,7 +1571,7 @@
 	for (i=0; i<length; i++) {
 		/* we miss out argv[0] as it's the program name */
 		array[i] = g_strdup (argv[i+1]);
-		pk_debug ("array[%i]=%s", i, array[i]);
+		egg_debug ("array[%i]=%s", i, array[i]);
 	}
 	array[i] = NULL;
 	return array;

Modified: trunk/src/gpk-consolekit.c
==============================================================================
--- trunk/src/gpk-consolekit.c	(original)
+++ trunk/src/gpk-consolekit.c	Tue Sep  2 16:20:06 2008
@@ -28,7 +28,7 @@
 #include <dbus/dbus-glib.h>
 #include <polkit-gnome/polkit-gnome.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <gpk-common.h>
 #include <gpk-error.h>
 
@@ -97,7 +97,7 @@
 
 	if (!gained_privilege) {
 		if (error != NULL) {
-			pk_warning ("Not privileged to restart system: %s", error->message);
+			egg_warning ("Not privileged to restart system: %s", error->message);
 		}
 		return;
 	}
@@ -105,7 +105,7 @@
         local_error = NULL;
         res = gpk_consolekit_try_system_restart (proxy, &local_error);
         if (!res) {
-                pk_warning ("Unable to restart system: %s", local_error->message);
+                egg_warning ("Unable to restart system: %s", local_error->message);
                 g_error_free (local_error);
         }
 }
@@ -146,7 +146,7 @@
 	/* check dbus connections, exit if not valid */
 	connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
 	if (error != NULL) {
-		pk_warning ("cannot acccess the system bus: %s", error->message);
+		egg_warning ("cannot acccess the system bus: %s", error->message);
 		g_error_free (error);
 		return FALSE;
 	}
@@ -157,7 +157,7 @@
 					   "/org/freedesktop/ConsoleKit/Manager",
 					   "org.freedesktop.ConsoleKit.Manager");
 	if (proxy == NULL) {
-		pk_warning ("Cannot connect to ConsoleKit");
+		egg_warning ("Cannot connect to ConsoleKit");
 		return FALSE;
 	}
 
@@ -190,7 +190,7 @@
 			polkit_action_unref (action);
 		}
 		if (!ret) {
-			pk_warning ("Unable to restart system: %s", error->message);
+			egg_warning ("Unable to restart system: %s", error->message);
 			g_error_free (error);
 		}
 	}

Modified: trunk/src/gpk-dbus.c
==============================================================================
--- trunk/src/gpk-dbus.c	(original)
+++ trunk/src/gpk-dbus.c	Tue Sep  2 16:20:06 2008
@@ -43,7 +43,7 @@
 #include <pk-package-id.h>
 #include <pk-package-ids.h>
 #include <pk-enum.h>
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-package-list.h>
 
 #include "gpk-dbus.h"
@@ -110,11 +110,11 @@
 
 	g_return_if_fail (PK_IS_DBUS (dbus));
 
-	pk_debug ("InstallLocalFile method called: %s", full_path);
+	egg_debug ("InstallLocalFile method called: %s", full_path);
 
 	/* check sender */
 	sender = dbus_g_method_get_sender (context);
-	pk_warning ("sender=%s", sender);
+	egg_warning ("sender=%s", sender);
 
 	/* just convert from char* to char** */
 	full_paths = g_strsplit (full_path, "|", 1);
@@ -144,11 +144,11 @@
 
 	g_return_if_fail (PK_IS_DBUS (dbus));
 
-	pk_debug ("InstallProvideFile method called: %s", full_path);
+	egg_debug ("InstallProvideFile method called: %s", full_path);
 
 	/* check sender */
 	sender = dbus_g_method_get_sender (context);
-	pk_warning ("sender=%s", sender);
+	egg_warning ("sender=%s", sender);
 
 	ret = gpk_client_install_provide_file (dbus->priv->gclient, full_path, &error_local);
 	if (!ret) {
@@ -176,11 +176,11 @@
 
 	g_return_if_fail (PK_IS_DBUS (dbus));
 
-	pk_debug ("InstallPackageName method called: %s", package_name);
+	egg_debug ("InstallPackageName method called: %s", package_name);
 
 	/* check sender */
 	sender = dbus_g_method_get_sender (context);
-	pk_warning ("sender=%s", sender);
+	egg_warning ("sender=%s", sender);
 
 	/* just convert from char* to char** */
 	package_names = g_strsplit (package_name, "|", 1);
@@ -211,11 +211,11 @@
 
 	g_return_if_fail (PK_IS_DBUS (dbus));
 
-	pk_debug ("InstallMimeType method called: %s", mime_type);
+	egg_debug ("InstallMimeType method called: %s", mime_type);
 
 	/* check sender */
 	sender = dbus_g_method_get_sender (context);
-	pk_warning ("sender=%s", sender);
+	egg_warning ("sender=%s", sender);
 
 	ret = gpk_client_install_mime_type (dbus->priv->gclient, mime_type, &error_local);
 	if (!ret) {
@@ -242,11 +242,11 @@
 
 	g_return_if_fail (PK_IS_DBUS (dbus));
 
-	pk_debug ("InstallFont method called: %s", font_desc);
+	egg_debug ("InstallFont method called: %s", font_desc);
 
 	/* check sender */
 	sender = dbus_g_method_get_sender (context);
-	pk_warning ("sender=%s", sender);
+	egg_warning ("sender=%s", sender);
 
 	ret = gpk_client_install_font (dbus->priv->gclient, font_desc, &error_local);
 	if (!ret) {

Modified: trunk/src/gpk-dialog.c
==============================================================================
--- trunk/src/gpk-dialog.c	(original)
+++ trunk/src/gpk-dialog.c	Tue Sep  2 16:20:06 2008
@@ -25,13 +25,15 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include <pk-debug.h>
 #include <pk-common.h>
 #include <pk-enum.h>
 #include <pk-extra.h>
 #include <pk-package-id.h>
 #include <gconf/gconf-client.h>
 
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include "gpk-common.h"
 #include "gpk-dialog.h"
 
@@ -60,7 +62,7 @@
 	for (i=0; i<length; i++) {
 		ident = pk_package_id_new_from_string (package_ids[i]);
 		if (ident == NULL) {
-			pk_warning ("failed to split %s", package_ids[i]);
+			egg_warning ("failed to split %s", package_ids[i]);
 			continue;
 		}
 		g_ptr_array_add (array, g_strdup (ident->name));
@@ -227,7 +229,7 @@
 	array = pk_ptr_array_to_argv (files);
 	text = g_strjoinv ("\n", array);
 
-	if (pk_strzero (text)) {
+	if (egg_strzero (text)) {
 		g_free (text);
 		text = g_strdup (_("No files"));
 	}
@@ -272,7 +274,7 @@
 
 	/* set the policy */
 	checked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-	pk_debug ("Changing %s to %i", key, checked);
+	egg_debug ("Changing %s to %i", key, checked);
 	gconf_client = gconf_client_get_default ();
 	gconf_client_set_bool (gconf_client, key, checked, NULL);
 	g_object_unref (gconf_client);

Modified: trunk/src/gpk-error.c
==============================================================================
--- trunk/src/gpk-error.c	(original)
+++ trunk/src/gpk-error.c	Tue Sep  2 16:20:06 2008
@@ -27,9 +27,11 @@
 #include <unistd.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
-#include <pk-debug.h>
 #include <pk-common.h>
 
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include "gpk-common.h"
 
 /**
@@ -78,7 +80,7 @@
 	gtk_label_set_label (GTK_LABEL (widget), message);
 
 	/* show text in the expander */
-	if (pk_strzero (details)) {
+	if (egg_strzero (details)) {
 		widget = glade_xml_get_widget (glade_xml, "expander_details");
 		gtk_widget_hide (widget);
 	} else {

Modified: trunk/src/gpk-firmware.c
==============================================================================
--- trunk/src/gpk-firmware.c	(original)
+++ trunk/src/gpk-firmware.c	Tue Sep  2 16:20:06 2008
@@ -37,14 +37,15 @@
 #include <gconf/gconf-client.h>
 #include <libnotify/notify.h>
 
-#include <pk-debug.h>
 #include <pk-client.h>
 #include <pk-common.h>
 #include <pk-task-list.h>
 
-#include <gpk-client.h>
-#include <gpk-common.h>
+#include "egg-debug.h"
+#include "egg-string.h"
 
+#include "gpk-client.h"
+#include "gpk-common.h"
 #include "gpk-firmware.h"
 
 static void     gpk_firmware_class_init	(GpkFirmwareClass *klass);
@@ -86,13 +87,13 @@
 {
 	GpkFirmware *firmware = GPK_FIRMWARE (data);
 
-	if (pk_strequal (action, "install-firmware")) {
+	if (egg_strequal (action, "install-firmware")) {
 		gpk_firmware_install_file (firmware);
-	} else if (pk_strequal (action, "do-not-show-prompt-firmware")) {
-		pk_debug ("set %s to FALSE", GPK_CONF_PROMPT_FIRMWARE);
+	} else if (egg_strequal (action, "do-not-show-prompt-firmware")) {
+		egg_debug ("set %s to FALSE", GPK_CONF_PROMPT_FIRMWARE);
 		gconf_client_set_bool (firmware->priv->gconf_client, GPK_CONF_PROMPT_FIRMWARE, FALSE, NULL);
 	} else {
-		pk_warning ("unknown action id: %s", action);
+		egg_warning ("unknown action id: %s", action);
 	}
 }
 
@@ -106,7 +107,7 @@
 	NotifyNotification *notification;
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	message = _("Additional firmware is required to make hardware in this computer function correctly.");
 	notification = notify_notification_new (_("Additional firmware required"), message, "help-browser", NULL);
@@ -118,7 +119,7 @@
 					_("Do not show this again"), gpk_firmware_libnotify_cb, firmware, NULL);
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 
@@ -156,20 +157,20 @@
 	/* should we check and show the user */
 	ret = gconf_client_get_bool (firmware->priv->gconf_client, GPK_CONF_PROMPT_FIRMWARE, NULL);
 	if (!ret) {
-		pk_debug ("not showing thanks to GConf");
+		egg_debug ("not showing thanks to GConf");
 		return;
 	}
 
 	/* file exists? */
 	ret = g_file_test (GPK_FIRMWARE_STATE_FILE, G_FILE_TEST_EXISTS);
 	if (!ret) {
-		pk_debug ("file '%s' not found", GPK_FIRMWARE_STATE_FILE);
+		egg_debug ("file '%s' not found", GPK_FIRMWARE_STATE_FILE);
 		return;
 	}
 	/* can we get the contents */
 	ret = g_file_get_contents (GPK_FIRMWARE_STATE_FILE, &files, NULL, &error);
 	if (!ret) {
-		pk_warning ("can't open file %s, %s", GPK_FIRMWARE_STATE_FILE, error->message);
+		egg_warning ("can't open file %s, %s", GPK_FIRMWARE_STATE_FILE, error->message);
 		g_error_free (error);
 		return;
 	}
@@ -180,7 +181,7 @@
 	/* file already exists */
 	ret = g_file_test (firmware->priv->files[0], G_FILE_TEST_EXISTS);
 	if (ret) {
-		pk_debug ("file '%s' already exists", firmware->priv->files[0]);
+		egg_debug ("file '%s' already exists", firmware->priv->files[0]);
 		return;
 	}
 

Modified: trunk/src/gpk-gnome.c
==============================================================================
--- trunk/src/gpk-gnome.c	(original)
+++ trunk/src/gpk-gnome.c	Tue Sep  2 16:20:06 2008
@@ -25,7 +25,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 
 /**
  * gpk_gnome_open:
@@ -42,7 +42,7 @@
 	data = g_strconcat ("gnome-open ", url, NULL);
 	ret = g_spawn_command_line_async (data, NULL);
 	if (ret == FALSE) {
-		pk_warning ("spawn of '%s' failed", data);
+		egg_warning ("spawn of '%s' failed", data);
 	}
 	g_free (data);
 	return ret;
@@ -83,7 +83,7 @@
 	} else {
 		command = g_strconcat ("gnome-open ghelp://", uri,  NULL);
 	}
-	pk_debug ("using command %s", command);
+	egg_debug ("using command %s", command);
 
 	gscreen = gdk_screen_get_default();
 	gdk_spawn_command_line_on_screen (gscreen, command, &error);

Modified: trunk/src/gpk-inhibit.c
==============================================================================
--- trunk/src/gpk-inhibit.c	(original)
+++ trunk/src/gpk-inhibit.c	Tue Sep  2 16:20:06 2008
@@ -36,7 +36,7 @@
 #include <gtk/gtk.h>
 #include <dbus/dbus-glib.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-client.h>
 #include "gpk-inhibit.h"
 #include "gpk-common.h"
@@ -83,13 +83,13 @@
 	g_return_val_if_fail (PK_IS_INHIBIT (inhibit), FALSE);
 
 	if (inhibit->priv->proxy_gpm == NULL) {
-		pk_debug ("no connection to g-p-m");
+		egg_debug ("no connection to g-p-m");
 		return FALSE;
 	}
 
 	/* check we are not trying to do this twice... */
 	if (inhibit->priv->cookie != 0) {
-		pk_debug ("cookie already set as %i", inhibit->priv->cookie);
+		egg_debug ("cookie already set as %i", inhibit->priv->cookie);
 		return FALSE;
 	}
 
@@ -119,13 +119,13 @@
 	g_return_val_if_fail (PK_IS_INHIBIT (inhibit), FALSE);
 
 	if (inhibit->priv->proxy_gpm == NULL) {
-		pk_debug ("no connection to g-p-m");
+		egg_debug ("no connection to g-p-m");
 		return FALSE;
 	}
 
 	/* check we are not trying to do this twice... */
 	if (inhibit->priv->cookie == 0) {
-		pk_debug ("cookie not already set");
+		egg_debug ("cookie not already set");
 		return FALSE;
 	}
 
@@ -157,7 +157,7 @@
 	/* connect to session bus */
 	connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
 	if (error != NULL) {
-		pk_warning ("Cannot connect to session bus: %s", error->message);
+		egg_warning ("Cannot connect to session bus: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -167,7 +167,7 @@
 				  GPM_DBUS_SERVICE, GPM_DBUS_PATH_INHIBIT,
 				  GPM_DBUS_INTERFACE_INHIBIT, &error);
 	if (error != NULL) {
-		pk_warning ("Cannot connect to gnome-power-manager: %s", error->message);
+		egg_warning ("Cannot connect to gnome-power-manager: %s", error->message);
 		g_error_free (error);
 	}
 }

Modified: trunk/src/gpk-install-catalog.c
==============================================================================
--- trunk/src/gpk-install-catalog.c	(original)
+++ trunk/src/gpk-install-catalog.c	Tue Sep  2 16:20:06 2008
@@ -26,7 +26,7 @@
 #include <gtk/gtk.h>
 #include <locale.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-common.h>
 #include <gpk-common.h>
 #include <gpk-error.h>
@@ -68,7 +68,7 @@
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */

Modified: trunk/src/gpk-install-local-file.c
==============================================================================
--- trunk/src/gpk-install-local-file.c	(original)
+++ trunk/src/gpk-install-local-file.c	Tue Sep  2 16:20:06 2008
@@ -26,7 +26,7 @@
 #include <gtk/gtk.h>
 #include <locale.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <gpk-common.h>
 #include <gpk-client.h>
 #include <gpk-error.h>
@@ -68,7 +68,7 @@
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */

Modified: trunk/src/gpk-install-mime-type.c
==============================================================================
--- trunk/src/gpk-install-mime-type.c	(original)
+++ trunk/src/gpk-install-mime-type.c	Tue Sep  2 16:20:06 2008
@@ -26,7 +26,7 @@
 #include <gtk/gtk.h>
 #include <locale.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <gpk-common.h>
 #include <gpk-client.h>
 #include <gpk-error.h>
@@ -67,7 +67,7 @@
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */

Modified: trunk/src/gpk-install-package-name.c
==============================================================================
--- trunk/src/gpk-install-package-name.c	(original)
+++ trunk/src/gpk-install-package-name.c	Tue Sep  2 16:20:06 2008
@@ -26,7 +26,7 @@
 #include <gtk/gtk.h>
 #include <locale.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <gpk-common.h>
 #include <gpk-client.h>
 #include <gpk-error.h>
@@ -68,7 +68,7 @@
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */

Modified: trunk/src/gpk-install-provide-file.c
==============================================================================
--- trunk/src/gpk-install-provide-file.c	(original)
+++ trunk/src/gpk-install-provide-file.c	Tue Sep  2 16:20:06 2008
@@ -26,7 +26,7 @@
 #include <gtk/gtk.h>
 #include <locale.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <gpk-common.h>
 #include <gpk-client.h>
 #include <gpk-error.h>
@@ -67,7 +67,7 @@
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */

Modified: trunk/src/gpk-interface.h
==============================================================================
--- trunk/src/gpk-interface.h	(original)
+++ trunk/src/gpk-interface.h	Tue Sep  2 16:20:06 2008
@@ -53,7 +53,7 @@
 #endif /* !G_ENABLE_DEBUG */
 
 
-/* NONE:STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.VN1IFU:1) */
+/* NONE:STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.DVLEGU:1) */
 extern void dbus_glib_marshal_gpk_dbus_VOID__STRING_POINTER (GClosure     *closure,
                                                              GValue       *return_value,
                                                              guint         n_param_values,

Modified: trunk/src/gpk-log.c
==============================================================================
--- trunk/src/gpk-log.c	(original)
+++ trunk/src/gpk-log.c	Tue Sep  2 16:20:06 2008
@@ -36,14 +36,16 @@
 /* local .la */
 #include <libunique.h>
 
-#include <pk-debug.h>
 #include <pk-client.h>
 #include <pk-control.h>
 #include <pk-package-id.h>
 #include <pk-common.h>
 
-#include <gpk-common.h>
-#include <gpk-gnome.h>
+#include "egg-debug.h"
+#include "egg-string.h"
+
+#include "gpk-common.h"
+#include "gpk-gnome.h"
 
 static GladeXML *glade_xml = NULL;
 static GtkListStore *list_store = NULL;
@@ -80,7 +82,7 @@
 	/* rollback */
 	ret = pk_client_rollback (client, transaction_id, &error);
 	if (!ret) {
-		pk_warning ("failed to reset client: %s", error->message);
+		egg_warning ("failed to reset client: %s", error->message);
 		g_error_free (error);
 	}
 	gtk_main_quit ();
@@ -211,7 +213,7 @@
 
 	/* only show transactions that succeeded */
 	if (!succeeded) {
-		pk_debug ("tid %s did not succeed, so not adding", tid);
+		egg_debug ("tid %s did not succeed, so not adding", tid);
 		return;
 	}
 
@@ -268,10 +270,10 @@
 		gtk_tree_model_get (model, &iter, GPK_LOG_COLUMN_ID, &id, -1);
 
 		/* show transaction_id */
-		pk_debug ("selected row is: %s", id);
+		egg_debug ("selected row is: %s", id);
 		g_free (id);
 	} else {
-		pk_debug ("no row selected");
+		egg_debug ("no row selected");
 	}
 }
 
@@ -283,10 +285,10 @@
 				        gchar *string1, gchar *string2,
 				        gint int1, gint int2, gpointer user_data)
 {
-	if (pk_strequal (name, "button_action")) {
+	if (egg_strequal (name, "button_action")) {
 		return polkit_gnome_action_create_button (button_action);
 	}
-	pk_warning ("name unknown=%s", name);
+	egg_warning ("name unknown=%s", name);
 	return NULL;
 }
 
@@ -369,7 +371,7 @@
 		return 0;
 	}
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */

Modified: trunk/src/gpk-prefs.c
==============================================================================
--- trunk/src/gpk-prefs.c	(original)
+++ trunk/src/gpk-prefs.c	Tue Sep  2 16:20:06 2008
@@ -35,13 +35,14 @@
 /* local .la */
 #include <libunique.h>
 
-#include <pk-debug.h>
 #include <pk-control.h>
 #include <pk-client.h>
 
 #include <gpk-common.h>
 #include <gpk-gnome.h>
 
+#include "egg-debug.h"
+
 #define PK_FREQ_HOURLY_TEXT		N_("Hourly")
 #define PK_FREQ_DAILY_TEXT		N_("Daily")
 #define PK_FREQ_WEEKLY_TEXT		N_("Weekly")
@@ -76,7 +77,7 @@
 	checked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 
 	gconf_key = (const char *) g_object_get_data (G_OBJECT (widget), "gconf_key");
-	pk_debug ("Changing %s to %i", gconf_key, checked);
+	egg_debug ("Changing %s to %i", gconf_key, checked);
 	gconf_client_set_bool (client, gconf_key, checked, NULL);
 
 	g_object_unref (client);
@@ -108,7 +109,7 @@
 	}
 
 	action = pk_freq_enum_to_text (freq);
-	pk_debug ("Changing %s to %s", GPK_CONF_FREQUENCY_GET_UPDATES, action);
+	egg_debug ("Changing %s to %s", GPK_CONF_FREQUENCY_GET_UPDATES, action);
 	gconf_client_set_string (client, GPK_CONF_FREQUENCY_GET_UPDATES, action, NULL);
 	g_free (value);
 	g_object_unref (client);
@@ -138,7 +139,7 @@
 	}
 
 	action = pk_freq_enum_to_text (freq);
-	pk_debug ("Changing %s to %s", GPK_CONF_FREQUENCY_GET_UPGRADES, action);
+	egg_debug ("Changing %s to %s", GPK_CONF_FREQUENCY_GET_UPGRADES, action);
 	gconf_client_set_string (client, GPK_CONF_FREQUENCY_GET_UPGRADES, action, NULL);
 	g_free (value);
 	g_object_unref (client);
@@ -159,7 +160,7 @@
 	client = gconf_client_get_default ();
 	value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget));
 	if (value == NULL) {
-		pk_warning ("value NULL");
+		egg_warning ("value NULL");
 		return;
 	}
 	notify_widget = glade_xml_get_widget (glade_xml, "checkbutton_notify_updates");
@@ -177,7 +178,7 @@
 	}
 
 	action = pk_update_enum_to_text (update);
-	pk_debug ("Changing %s to %s", GPK_CONF_AUTO_UPDATE, action);
+	egg_debug ("Changing %s to %s", GPK_CONF_AUTO_UPDATE, action);
 	gconf_client_set_string (client, GPK_CONF_AUTO_UPDATE, action, NULL);
 	g_free (value);
 	g_object_unref (client);
@@ -200,10 +201,10 @@
 	is_writable = gconf_client_key_is_writable (client, GPK_CONF_FREQUENCY_GET_UPDATES, NULL);
 	value = gconf_client_get_string (client, GPK_CONF_FREQUENCY_GET_UPDATES, NULL);
 	if (value == NULL) {
-		pk_warning ("invalid schema, please re-install");
+		egg_warning ("invalid schema, please re-install");
 		return;
 	}
-	pk_debug ("value from gconf %s", value);
+	egg_debug ("value from gconf %s", value);
 	freq = pk_freq_enum_from_text (value);
 	g_free (value);
 	g_object_unref (client);
@@ -240,10 +241,10 @@
 	is_writable = gconf_client_key_is_writable (client, GPK_CONF_FREQUENCY_GET_UPGRADES, NULL);
 	value = gconf_client_get_string (client, GPK_CONF_FREQUENCY_GET_UPGRADES, NULL);
 	if (value == NULL) {
-		pk_warning ("invalid schema, please re-install");
+		egg_warning ("invalid schema, please re-install");
 		return;
 	}
-	pk_debug ("value from gconf %s", value);
+	egg_debug ("value from gconf %s", value);
 	freq = pk_freq_enum_from_text (value);
 	g_free (value);
 	g_object_unref (client);
@@ -279,10 +280,10 @@
 	is_writable = gconf_client_key_is_writable (client, GPK_CONF_AUTO_UPDATE, NULL);
 	value = gconf_client_get_string (client, GPK_CONF_AUTO_UPDATE, NULL);
 	if (value == NULL) {
-		pk_warning ("invalid schema, please re-install");
+		egg_warning ("invalid schema, please re-install");
 		return;
 	}
-	pk_debug ("value from gconf %s", value);
+	egg_debug ("value from gconf %s", value);
 	update = pk_update_enum_from_text (value);
 	g_free (value);
 	g_object_unref (client);
@@ -312,7 +313,7 @@
 
 	client = gconf_client_get_default ();
 	value = gconf_client_get_bool (client, gconf_key, NULL);
-	pk_debug ("value from gconf %i for %s", value, gconf_key);
+	egg_debug ("value from gconf %i for %s", value, gconf_key);
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value);
 
 	g_object_set_data (G_OBJECT (widget), "gconf_key", (gpointer) gconf_key);
@@ -379,7 +380,7 @@
 		return 0;
 	}
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we already activated? */

Modified: trunk/src/gpk-repo.c
==============================================================================
--- trunk/src/gpk-repo.c	(original)
+++ trunk/src/gpk-repo.c	Tue Sep  2 16:20:06 2008
@@ -35,15 +35,17 @@
 /* local .la */
 #include <libunique.h>
 
-#include <pk-debug.h>
 #include <pk-common.h>
 #include <pk-client.h>
 #include <pk-control.h>
 #include <pk-connection.h>
 
-#include <gpk-gnome.h>
-#include <gpk-common.h>
-#include <gpk-error.h>
+#include "egg-debug.h"
+#include "egg-string.h"
+
+#include "gpk-gnome.h"
+#include "gpk-common.h"
+#include "gpk-error.h"
 #include "gpk-animated-icon.h"
 
 static GladeXML *glade_xml = NULL;
@@ -83,7 +85,7 @@
 
 	/* do we have the capability? */
 	if (pk_bitfield_contain (roles, PK_ROLE_ENUM_REPO_ENABLE) == FALSE) {
-		pk_debug ("can't change state");
+		egg_debug ("can't change state");
 		return;
 	}
 
@@ -97,16 +99,16 @@
 	installed ^= 1;
 
 	/* do this to the repo */
-	pk_debug ("setting %s to %i", repo_id, installed);
+	egg_debug ("setting %s to %i", repo_id, installed);
 	ret = pk_client_reset (client, &error);
 	if (!ret) {
-		pk_warning ("failed to reset client: %s", error->message);
+		egg_warning ("failed to reset client: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
 	ret = pk_client_repo_enable (client, repo_id, installed, &error);
 	if (!ret) {
-		pk_warning ("could not set repo enabled state: %s", error->message);
+		egg_warning ("could not set repo enabled state: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -129,7 +131,7 @@
 {
 	GtkTreeIter iter;
 
-	pk_debug ("repo = %s:%s:%i", repo_id, description, enabled);
+	egg_debug ("repo = %s:%s:%i", repo_id, description, enabled);
 
 	gtk_list_store_append (list_store, &iter);
 	gtk_list_store_set (list_store, &iter,
@@ -182,10 +184,10 @@
 	if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
 		gtk_tree_model_get (model, &iter,
 				    REPO_COLUMN_ID, &repo_id, -1);
-		pk_debug ("selected row is: %s", repo_id);
+		egg_debug ("selected row is: %s", repo_id);
 		g_free (repo_id);
 	} else {
-		pk_debug ("no row selected");
+		egg_debug ("no row selected");
 	}
 }
 
@@ -249,11 +251,11 @@
 	GError *error = NULL;
 	PkBitfield filters;
 
-	pk_debug ("refreshing list");
+	egg_debug ("refreshing list");
 	gtk_list_store_clear (list_store);
 	ret = pk_client_reset (client, &error);
 	if (!ret) {
-		pk_warning ("failed to reset client: %s", error->message);
+		egg_warning ("failed to reset client: %s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -265,7 +267,7 @@
 	}
 	ret = pk_client_get_repo_list (client, filters, &error);
 	if (!ret) {
-		pk_warning ("failed to get repo list: %s", error->message);
+		egg_warning ("failed to get repo list: %s", error->message);
 		g_error_free (error);
 	}
 }
@@ -286,7 +288,7 @@
 gpk_repo_checkbutton_details (GtkWidget *widget, gpointer data)
 {
 	show_details = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-	pk_debug ("Changing %s to %i", GPK_CONF_REPO_SHOW_DETAILS, show_details);
+	egg_debug ("Changing %s to %i", GPK_CONF_REPO_SHOW_DETAILS, show_details);
 	gconf_client_set_bool (gconf_client, GPK_CONF_REPO_SHOW_DETAILS, show_details, NULL);
 	gpk_repo_repo_list_refresh ();
 }
@@ -310,10 +312,10 @@
 			       gchar *string1, gchar *string2,
 			       gint int1, gint int2, gpointer user_data)
 {
-	if (pk_strequal (name, "image_animation")) {
+	if (egg_strequal (name, "image_animation")) {
 		return gpk_animated_icon_new ();
 	}
-	pk_warning ("name unknown='%s'", name);
+	egg_warning ("name unknown='%s'", name);
 	return NULL;
 }
 
@@ -356,7 +358,7 @@
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */

Modified: trunk/src/gpk-self-test.c
==============================================================================
--- trunk/src/gpk-self-test.c	(original)
+++ trunk/src/gpk-self-test.c	Tue Sep  2 16:20:06 2008
@@ -22,7 +22,7 @@
 #include <glib.h>
 #include <glib-object.h>
 #include <libselftest.h>
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include "gpk-common.h"
 
 int
@@ -35,7 +35,7 @@
 	}
 	g_type_init ();
 	libst_init (&test);
-	pk_debug_init (TRUE);
+	egg_debug_init (TRUE);
 
 	/* tests go here */
 	gpk_common_self_test (&test);

Modified: trunk/src/gpk-smart-icon.c
==============================================================================
--- trunk/src/gpk-smart-icon.c	(original)
+++ trunk/src/gpk-smart-icon.c	Tue Sep  2 16:20:06 2008
@@ -37,7 +37,7 @@
 #include <gtk/gtk.h>
 #include <gtk/gtkstatusicon.h>
 
-#include <pk-debug.h>
+#include "egg-debug.h"
 #include <pk-enum.h>
 #include "gpk-marshal.h"
 #include "gpk-common.h"
@@ -113,11 +113,11 @@
 	g_return_val_if_fail (GPK_IS_SMART_ICON (sicon), FALSE);
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	/* have we hidden the icon already? */
 	if (sicon->priv->current == NULL || sicon->priv->new == NULL) {
-		pk_debug ("not pulsing as icon cleared");
+		egg_debug ("not pulsing as icon cleared");
 		return FALSE;
 	}
 
@@ -162,7 +162,7 @@
 	sicon->priv->icon_opacity = 0.9;
 	sicon->priv->going_down = TRUE;
 	if (sicon->priv->pulse_source != 0) {
-		pk_debug ("already pulsing");
+		egg_debug ("already pulsing");
 		return FALSE;
 	}
 	sicon->priv->pulse_source = g_timeout_add (20, gpk_smart_icon_pulse_timeout_cb, sicon);
@@ -178,7 +178,7 @@
 	GpkSmartIcon *sicon = (GpkSmartIcon *) data;
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	/* no point setting the same */
 	if (sicon->priv->new != NULL &&
@@ -220,7 +220,7 @@
 	}
 	/* tell us what we -want- */
 	g_free (sicon->priv->new);
-	pk_debug ("setting icon name %s", icon_name);
+	egg_debug ("setting icon name %s", icon_name);
 	sicon->priv->new = g_strdup (icon_name);
 
 	/* wait a little while to see if it's worth displaying the icon */
@@ -236,7 +236,7 @@
 {
 	g_return_val_if_fail (GPK_IS_SMART_ICON (sicon), FALSE);
 
-	pk_debug ("set priority %i", number);
+	egg_debug ("set priority %i", number);
 	return TRUE;
 }
 

Modified: trunk/src/gpk-update-icon.c
==============================================================================
--- trunk/src/gpk-update-icon.c	(original)
+++ trunk/src/gpk-update-icon.c	Tue Sep  2 16:20:06 2008
@@ -32,11 +32,11 @@
 #include <locale.h>
 #include <libnotify/notify.h>
 
-#include <pk-dbus-monitor.h>
-
-#include <pk-debug.h>
 #include <pk-common.h>
 
+#include "egg-debug.h"
+#include "egg-dbus-monitor.h"
+
 #include "gpk-check-update.h"
 #include "gpk-watch.h"
 #include "gpk-firmware.h"
@@ -74,7 +74,7 @@
 				 G_TYPE_INVALID);
 	if (ret == FALSE) {
 		/* abort as the DBUS method failed */
-		pk_warning ("RequestName failed: %s", error->message);
+		egg_warning ("RequestName failed: %s", error->message);
 		g_error_free (error);
 		return FALSE;
 	}
@@ -98,9 +98,9 @@
  * pk_dbus_connection_replaced_cb:
  **/
 static void
-pk_dbus_connection_replaced_cb (PkDbusMonitor *monitor, gpointer data)
+pk_dbus_connection_replaced_cb (EggDbusMonitor *monitor, gpointer data)
 {
-	pk_warning ("exiting as we have been replaced");
+	egg_warning ("exiting as we have been replaced");
 	gtk_main_quit ();
 }
 
@@ -120,7 +120,7 @@
 	GError *error = NULL;
 	gboolean ret;
 	DBusGConnection *connection;
-	PkDbusMonitor *monitor;
+	EggDbusMonitor *monitor;
 
 	const GOptionEntry options[] = {
 		{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
@@ -155,7 +155,7 @@
 		return 0;
 	}
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* are we running privileged */
@@ -175,15 +175,15 @@
 	firmware = gpk_firmware_new ();
 
 	/* find out when we are replaced */
-	monitor = pk_dbus_monitor_new ();
-	pk_dbus_monitor_assign (monitor, PK_DBUS_MONITOR_SESSION, PK_DBUS_SERVICE);
+	monitor = egg_dbus_monitor_new ();
+	egg_dbus_monitor_assign (monitor, EGG_DBUS_MONITOR_SESSION, PK_DBUS_SERVICE);
 	g_signal_connect (monitor, "connection-replaced",
 			  G_CALLBACK (pk_dbus_connection_replaced_cb), NULL);
 
 	/* get the bus */
 	connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
 	if (error) {
-		pk_warning ("%s", error->message);
+		egg_warning ("%s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -191,7 +191,7 @@
 	/* try to register */
 	ret = gpk_object_register (connection, G_OBJECT (dbus));
 	if (!ret) {
-		pk_warning ("failed to replace running instance.");
+		egg_warning ("failed to replace running instance.");
 		goto out;
 	}
 

Modified: trunk/src/gpk-update-viewer.c
==============================================================================
--- trunk/src/gpk-update-viewer.c	(original)
+++ trunk/src/gpk-update-viewer.c	Tue Sep  2 16:20:06 2008
@@ -37,7 +37,6 @@
 /* local .la */
 #include <libunique.h>
 
-#include <pk-debug.h>
 #include <pk-client.h>
 #include <pk-control.h>
 #include <pk-common.h>
@@ -46,10 +45,12 @@
 #include <pk-package-ids.h>
 #include <pk-update-detail-obj.h>
 
-#include <gpk-common.h>
-#include <gpk-gnome.h>
-#include <gpk-error.h>
+#include "egg-debug.h"
+#include "egg-string.h"
 
+#include "gpk-common.h"
+#include "gpk-gnome.h"
+#include "gpk-error.h"
 #include "gpk-consolekit.h"
 #include "gpk-cell-renderer-uri.h"
 #include "gpk-animated-icon.h"
@@ -176,7 +177,7 @@
 	GtkWidget *widget;
 	gboolean ret;
 
-	pk_debug ("Doing the system update");
+	egg_debug ("Doing the system update");
 
 	widget = glade_xml_get_widget (glade_xml, "button_overview2");
 	gtk_widget_hide (widget);
@@ -212,7 +213,7 @@
 	GPtrArray *array;
 	gchar **package_ids;
 
-	pk_debug ("Doing the package updates");
+	egg_debug ("Doing the package updates");
 	array = g_ptr_array_new ();
 
 	widget = glade_xml_get_widget (glade_xml, "treeview_updates");
@@ -234,7 +235,7 @@
 
 		/* do something with the data */
 		if (update) {
-			pk_debug ("%s", package_id);
+			egg_debug ("%s", package_id);
 			g_ptr_array_add (array, package_id);
 		} else {
 			/* need to free the one in the array later */
@@ -388,7 +389,7 @@
 	ret = gpk_client_refresh_cache (gclient, &error);
 	polkit_gnome_action_set_sensitive (refresh_action, TRUE);
 	if (ret == FALSE) {
-		pk_warning ("failed: %s", error->message);
+		egg_warning ("failed: %s", error->message);
 		g_error_free (error);
 	}
 	/* get new list */
@@ -407,7 +408,7 @@
 	/* we might have a transaction running */
 	ret = pk_client_cancel (client_action, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel client: %s", error->message);
+		egg_warning ("failed to cancel client: %s", error->message);
 		g_error_free (error);
 	}
 
@@ -563,7 +564,7 @@
 	gpk_client_set_interaction (gclient, GPK_CLIENT_INTERACT_NEVER);
 	list = gpk_client_get_updates (gclient, &error);
 	if (list == NULL) {
-		pk_warning ("failed: %s", error->message);
+		egg_warning ("failed: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -609,7 +610,7 @@
 	/* reset */
 	ret = pk_client_reset (client_query, &error);
 	if (!ret) {
-		pk_warning ("failed to reset: %s", error->message);
+		egg_warning ("failed to reset: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -619,7 +620,7 @@
 	ret = pk_client_get_update_detail (client_query, package_ids, &error);
 	g_strfreev (package_ids);
 	if (!ret) {
-		pk_warning ("failed to cache update detail: %s", error->message);
+		egg_warning ("failed to cache update detail: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -653,7 +654,7 @@
 	PkRoleEnum role;
 
 	pk_client_get_role (client, &role, NULL, NULL);
-	pk_debug ("role = %s, package = %s:%s:%s", pk_role_enum_to_text (role),
+	egg_debug ("role = %s, package = %s:%s:%s", pk_role_enum_to_text (role),
 		  pk_info_enum_to_text (obj->info), obj->id->name, obj->summary);
 }
 
@@ -671,7 +672,7 @@
 	/* format */
 	markup = g_strdup_printf ("<b>%s:</b>", title);
 
-	pk_debug ("%s %s %s", markup, text, uri);
+	egg_debug ("%s %s %s", markup, text, uri);
 	gtk_list_store_append (list_store_description, &iter);
 	gtk_list_store_set (list_store_description, &iter,
 			    DESC_COLUMN_TITLE, markup,
@@ -705,14 +706,14 @@
 
 	/* could we have malformed descriptions with ';' in them? */
 	if (length % 2 != 0) {
-		pk_warning ("length not correct, correcting");
+		egg_warning ("length not correct, correcting");
 		length--;
 	}
 
 	for (i=0; i<length; i+=2) {
 		uri = urls[i];
 		text = urls[i+1];
-		if (pk_strzero (text)) {
+		if (egg_strzero (text)) {
 			text = uri;
 		}
 		/* no suffix needed */
@@ -743,7 +744,7 @@
 	PkPackageId *id;
 
 	/* do we have any data? */
-	if (pk_strzero (package_ids_delimit)) {
+	if (egg_strzero (package_ids_delimit)) {
 		goto out;
 	}
 
@@ -797,7 +798,7 @@
 		}
 
 		/* if not null then append back */
-		if (!pk_strzero (line2)) {
+		if (!egg_strzero (line2)) {
 			g_string_append_printf (string, "%s\n", line2);
 		}
 		g_free (line2);
@@ -896,7 +897,7 @@
 	/* translators: this is the repository the package has come from */
 	gpk_update_viewer_add_description_item (_("Repository"), obj->id->data, NULL);
 
-	if (!pk_strzero (obj->update_text)) {
+	if (!egg_strzero (obj->update_text)) {
 		/* convert the bullets */
 		line = gpk_update_viewer_pretty_description (obj->update_text);
 		/* translators: this is the package description */
@@ -905,21 +906,21 @@
 	}
 
 	/* changelog */
-	if (!pk_strzero (obj->changelog)) {
+	if (!egg_strzero (obj->changelog)) {
 		/* translators: this is a list of CVE (security) URLs */
 		gpk_update_viewer_add_description_item (_("Changes"), obj->changelog, NULL);
 	}
 
 	/* add all the links */
-	if (!pk_strzero (obj->vendor_url)) {
+	if (!egg_strzero (obj->vendor_url)) {
 		/* translators: this is a list of vendor URLs */
 		gpk_update_viewer_add_description_link_item (_("Vendor"), obj->vendor_url);
 	}
-	if (!pk_strzero (obj->bugzilla_url)) {
+	if (!egg_strzero (obj->bugzilla_url)) {
 		/* translators: this is a list of bugzilla URLs */
 		gpk_update_viewer_add_description_link_item (_("Bugzilla"), obj->bugzilla_url);
 	}
-	if (!pk_strzero (obj->cve_url)) {
+	if (!egg_strzero (obj->cve_url)) {
 		/* translators: this is a list of CVE (security) URLs */
 		gpk_update_viewer_add_description_link_item (_("CVE"), obj->cve_url);
 	}
@@ -968,7 +969,7 @@
 	/* unstage */
 	update ^= 1;
 
-	pk_debug ("update %s[%i]", package_id, update);
+	egg_debug ("update %s[%i]", package_id, update);
 	g_free (package_id);
 
 	/* set new value */
@@ -1009,7 +1010,7 @@
 static void
 gpk_update_viewer_treeview_renderer_clicked (GtkCellRendererToggle *cell, gchar *uri, gpointer data)
 {
-	pk_debug ("clicked %s", uri);
+	egg_debug ("clicked %s", uri);
 	gpk_gnome_open (uri);
 }
 
@@ -1097,12 +1098,12 @@
 		/* clear and display animation until new details come in */
 		gpk_update_viewer_description_animation_start ();
 
-		pk_debug ("selected row is: %s", cached_package_id);
+		egg_debug ("selected row is: %s", cached_package_id);
 
 		/* reset */
 		ret = pk_client_reset (client_query, &error);
 		if (!ret) {
-			pk_warning ("failed to reset: %s", error->message);
+			egg_warning ("failed to reset: %s", error->message);
 			g_error_free (error);
 		}
 
@@ -1112,11 +1113,11 @@
 		ret = pk_client_get_update_detail (client_query, package_ids, &error);
 		g_strfreev (package_ids);
 		if (!ret) {
-			pk_warning ("failed to get update detail: %s", error->message);
+			egg_warning ("failed to get update detail: %s", error->message);
 			g_error_free (error);
 		}
 	} else {
-		pk_debug ("no row selected");
+		egg_debug ("no row selected");
 	}
 }
 
@@ -1333,7 +1334,7 @@
 			restart = pk_client_get_require_restart (client);
 			if (restart == PK_RESTART_ENUM_SYSTEM ||
 			    restart == PK_RESTART_ENUM_SESSION) {
-				pk_debug ("showing reboot widgets");
+				egg_debug ("showing reboot widgets");
 				widget = glade_xml_get_widget (glade_xml, "hbox_restart");
 				gtk_widget_show (widget);
 				polkit_gnome_action_set_visible (restart_action, TRUE);
@@ -1432,7 +1433,7 @@
 	/* ignore some errors */
 	if (code == PK_ERROR_ENUM_PROCESS_KILL ||
 	    code == PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
-		pk_debug ("error ignored %s\n%s", pk_error_enum_to_text (code), details);
+		egg_debug ("error ignored %s\n%s", pk_error_enum_to_text (code), details);
 		return;
 	}
 
@@ -1579,7 +1580,7 @@
 		return FALSE;
 	}
 
-	pk_debug ("Single right click on the tree view");
+	egg_debug ("Single right click on the tree view");
 
 	/* select the row */
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
@@ -1623,10 +1624,10 @@
 	/* get the role */
 	ret = pk_client_get_role (client, &role, NULL, NULL);
 	if (!ret) {
-		pk_warning ("cannot get role");
+		egg_warning ("cannot get role");
 		return;
 	}
-	pk_debug ("%s", pk_role_enum_to_text (role));
+	egg_debug ("%s", pk_role_enum_to_text (role));
 
 	/* update last time in the UI */
 	if (role == PK_ROLE_ENUM_REFRESH_CACHE) {
@@ -1640,7 +1641,7 @@
 	if (role == PK_ROLE_ENUM_UPDATE_SYSTEM ||
 	    role == PK_ROLE_ENUM_UPDATE_PACKAGES ||
 	    role == PK_ROLE_ENUM_REFRESH_CACHE) {
-		pk_debug ("getting new");
+		egg_debug ("getting new");
 		//gpk_update_viewer_get_new_update_list ();
 	}
 }
@@ -1653,25 +1654,25 @@
 				     gchar *string1, gchar *string2,
 				     gint int1, gint int2, gpointer user_data)
 {
-	if (pk_strequal (name, "button_refresh")) {
+	if (egg_strequal (name, "button_refresh")) {
 		return polkit_gnome_action_create_button (refresh_action);
 	}
-	if (pk_strequal (name, "button_restart")) {
+	if (egg_strequal (name, "button_restart")) {
 		return polkit_gnome_action_create_button (restart_action);
 	}
-	if (pk_strequal (name, "button_update_system")) {
+	if (egg_strequal (name, "button_update_system")) {
 		return polkit_gnome_action_create_button (update_system_action);
 	}
-	if (pk_strequal (name, "button_update_packages")) {
+	if (egg_strequal (name, "button_update_packages")) {
 		return polkit_gnome_action_create_button (update_packages_action);
 	}
-	if (pk_strequal (name, "image_animation_preview")) {
+	if (egg_strequal (name, "image_animation_preview")) {
 		return gpk_animated_icon_new ();
 	}
-	if (pk_strequal (name, "image_animation_description")) {
+	if (egg_strequal (name, "image_animation_description")) {
 		return gpk_animated_icon_new ();
 	}
-	pk_warning ("name unknown=%s", name);
+	egg_warning ("name unknown=%s", name);
 	return NULL;
 }
 
@@ -1797,7 +1798,7 @@
 		return 0;
 	}
 
-	pk_debug_init (verbose);
+	egg_debug_init (verbose);
 	gtk_init (&argc, &argv);
 
 	/* add application specific icons to search path */
@@ -1993,7 +1994,7 @@
 	/* we might have visual stuff running, close it down */
 	ret = pk_client_cancel (client_query, &error);
 	if (!ret) {
-		pk_warning ("failed to cancel client: %s", error->message);
+		egg_warning ("failed to cancel client: %s", error->message);
 		g_error_free (error);
 	}
 

Modified: trunk/src/gpk-watch.c
==============================================================================
--- trunk/src/gpk-watch.c	(original)
+++ trunk/src/gpk-watch.c	Tue Sep  2 16:20:06 2008
@@ -40,7 +40,6 @@
 
 #include <polkit-gnome/polkit-gnome.h>
 
-#include <pk-debug.h>
 #include <pk-control.h>
 #include <pk-client.h>
 #include <pk-task-list.h>
@@ -49,6 +48,9 @@
 #include <pk-connection.h>
 #include <pk-package-id.h>
 
+#include "egg-debug.h"
+#include "egg-string.h"
+
 #include "gpk-common.h"
 #include "gpk-error.h"
 #include "gpk-watch.h"
@@ -112,7 +114,7 @@
 	g_return_val_if_fail (GPK_IS_WATCH (watch), FALSE);
 
 	length = pk_task_list_get_size (watch->priv->tlist);
-	pk_debug ("refresh tooltip %i", length);
+	egg_debug ("refresh tooltip %i", length);
 	if (length == 0) {
 		gtk_status_icon_set_tooltip (GTK_STATUS_ICON (watch->priv->sicon), "Doing nothing...");
 		return TRUE;
@@ -121,14 +123,14 @@
 	for (i=0; i<length; i++) {
 		item = pk_task_list_get_item (watch->priv->tlist, i);
 		if (item == NULL) {
-			pk_warning ("not found item %i", i);
+			egg_warning ("not found item %i", i);
 			break;
 		}
 		localised_status = gpk_status_enum_to_localised_text (item->status);
 
 		/* should we display the text */
 		if (item->role == PK_ROLE_ENUM_UPDATE_PACKAGES ||
-		    pk_strzero (item->text)) {
+		    egg_strzero (item->text)) {
 			g_string_append_printf (status, "%s\n", localised_status);
 		} else {
 			/* display the package name, not the package_id */
@@ -175,10 +177,10 @@
 	for (i=0; i<length; i++) {
 		item = pk_task_list_get_item (watch->priv->tlist, i);
 		if (item == NULL) {
-			pk_warning ("not found item %i", i);
+			egg_warning ("not found item %i", i);
 			break;
 		}
-		pk_debug ("%s %s", item->tid, pk_status_enum_to_text (item->status));
+		egg_debug ("%s %s", item->tid, pk_status_enum_to_text (item->status));
 		pk_bitfield_add (status, item->status);
 	}
 out:
@@ -197,12 +199,12 @@
 
 	g_return_val_if_fail (GPK_IS_WATCH (watch), FALSE);
 
-	pk_debug ("rescan");
+	egg_debug ("rescan");
 	status = gpk_watch_task_list_to_status_bitfield (watch);
 
 	/* nothing in the list */
 	if (status == 0) {
-		pk_debug ("no activity");
+		egg_debug ("no activity");
 		gpk_smart_icon_set_icon_name (watch->priv->sicon, NULL);
 		return TRUE;
 	}
@@ -264,15 +266,15 @@
 {
 	GpkWatch *watch = GPK_WATCH (data);
 
-	if (pk_strequal (action, "do-not-show-notify-complete")) {
-		pk_debug ("set %s to FALSE", GPK_CONF_PROMPT_FIRMWARE);
+	if (egg_strequal (action, "do-not-show-notify-complete")) {
+		egg_debug ("set %s to FALSE", GPK_CONF_PROMPT_FIRMWARE);
 		gconf_client_set_bool (watch->priv->gconf_client, GPK_CONF_NOTIFY_COMPLETED, FALSE, NULL);
 
-	} else if (pk_strequal (action, "show-error-details")) {
+	} else if (egg_strequal (action, "show-error-details")) {
 		gpk_error_dialog (_("Error details"), NULL, watch->priv->error_details);
 
 	} else {
-		pk_warning ("unknown action id: %s", action);
+		egg_warning ("unknown action id: %s", action);
 	}
 }
 
@@ -298,10 +300,10 @@
 	/* get the role */
 	ret = pk_client_get_role (client, &role, &text, NULL);
 	if (!ret) {
-		pk_warning ("cannot get role");
+		egg_warning ("cannot get role");
 		goto out;
 	}
-	pk_debug ("role=%s, text=%s", pk_role_enum_to_text (role), text);
+	egg_debug ("role=%s, text=%s", pk_role_enum_to_text (role), text);
 
 	/* show an icon if the user needs to reboot */
 	if (role == PK_ROLE_ENUM_UPDATE_PACKAGES ||
@@ -319,32 +321,32 @@
 
 	/* is it worth showing a UI? */
 	if (runtime < 3000) {
-		pk_debug ("no notification, too quick");
+		egg_debug ("no notification, too quick");
 		goto out;
 	}
 
 	/* is it worth showing a UI? */
 	if (exit != PK_EXIT_ENUM_SUCCESS) {
-		pk_debug ("not notifying, as didn't complete okay");
+		egg_debug ("not notifying, as didn't complete okay");
 		goto out;
 	}
 
 	/* are we accepting notifications */
 	value = gconf_client_get_bool (watch->priv->gconf_client, GPK_CONF_NOTIFY_COMPLETED, NULL);
 	if (!value) {
-		pk_debug ("not showing notification as prevented in gconf");
+		egg_debug ("not showing notification as prevented in gconf");
 		goto out;
 	}
 
 	/* is caller able to handle the messages itself? */
 	ret = pk_client_is_caller_active (client, &value, &error);
 	if (!ret) {
-		pk_warning ("could not get caller active status: %s", error->message);
+		egg_warning ("could not get caller active status: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
 	if (value) {
-		pk_debug ("not showing notification as caller is still present");
+		egg_debug ("not showing notification as caller is still present");
 		goto out;
 	}
 
@@ -369,7 +371,7 @@
 					_("Do not show this again"), gpk_watch_libnotify_cb, watch, NULL);
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 
@@ -401,7 +403,7 @@
 
 	/* do we ignore this error? */
 	if (is_active) {
-		pk_debug ("client active so leaving error %s\n%s", title, details);
+		egg_debug ("client active so leaving error %s\n%s", title, details);
 		return;
 	}
 
@@ -410,14 +412,14 @@
 	    error_code == PK_ERROR_ENUM_NO_NETWORK ||
 	    error_code == PK_ERROR_ENUM_PROCESS_KILL ||
 	    error_code == PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
-		pk_debug ("error ignored %s\n%s", title, details);
+		egg_debug ("error ignored %s\n%s", title, details);
 		return;
 	}
 
         /* are we accepting notifications */
         value = gconf_client_get_bool (watch->priv->gconf_client, GPK_CONF_NOTIFY_ERROR, NULL);
         if (!value) {
-                pk_debug ("not showing notification as prevented in gconf");
+                egg_debug ("not showing notification as prevented in gconf");
                 return;
         }
 
@@ -437,7 +439,7 @@
 
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 }
@@ -461,7 +463,7 @@
         /* are we accepting notifications */
         value = gconf_client_get_bool (watch->priv->gconf_client, GPK_CONF_NOTIFY_MESSAGE, NULL);
         if (!value) {
-                pk_debug ("not showing notification as prevented in gconf");
+                egg_debug ("not showing notification as prevented in gconf");
                 return;
         }
 
@@ -477,7 +479,7 @@
 	notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		pk_warning ("error: %s", error->message);
+		egg_warning ("error: %s", error->message);
 		g_error_free (error);
 	}
 
@@ -600,7 +602,7 @@
 	GtkWidget *image;
 
 	g_return_if_fail (GPK_IS_WATCH (watch));
-	pk_debug ("icon right clicked");
+	egg_debug ("icon right clicked");
 
 	/* About */
 	item = gtk_image_menu_item_new_with_mnemonic (_("_About"));
@@ -641,12 +643,12 @@
 
 	g_return_if_fail (GPK_IS_WATCH (watch));
 
-	pk_debug ("refresh cache");
+	egg_debug ("refresh cache");
 	gpk_client_set_interaction (watch->priv->gclient, GPK_CLIENT_INTERACT_ALWAYS);
 	gpk_client_show_finished (watch->priv->gclient, FALSE);
 	ret = gpk_client_refresh_cache (watch->priv->gclient, &error);
 	if (!ret) {
-		pk_warning ("%s", error->message);
+		egg_warning ("%s", error->message);
 		g_error_free (error);
 	}
 }
@@ -674,8 +676,8 @@
 
 	/* find the job we should bind to */
 	tid = (gchar *) g_object_get_data (G_OBJECT (item), "tid");
-	if (pk_strzero(tid) || tid[0] != '/') {
-		pk_warning ("invalid job, maybe transaction already removed");
+	if (egg_strzero(tid) || tid[0] != '/') {
+		egg_warning ("invalid job, maybe transaction already removed");
 		return;
 	}
 
@@ -713,14 +715,14 @@
 	for (i=0; i<length; i++) {
 		item = pk_task_list_get_item (watch->priv->tlist, i);
 		if (item == NULL) {
-			pk_warning ("not found item %i", i);
+			egg_warning ("not found item %i", i);
 			break;
 		}
 		localised_role = gpk_role_enum_to_localised_present (item->role);
 		localised_status = gpk_status_enum_to_localised_text (item->status);
 
 		icon_name = gpk_status_enum_to_icon_name (item->status);
-		if (!pk_strzero (item->text) &&
+		if (!egg_strzero (item->text) &&
 		    item->role != PK_ROLE_ENUM_UPDATE_PACKAGES) {
 			text = g_strdup_printf ("%s %s (%s)", localised_role, item->text, localised_status);
 		} else {
@@ -758,7 +760,7 @@
 
 	g_return_if_fail (GPK_IS_WATCH (watch));
 
-	pk_debug ("icon left clicked");
+	egg_debug ("icon left clicked");
 
 	/* add jobs as drop down */
 	gpk_watch_populate_menu_with_jobs (watch, menu);
@@ -815,7 +817,7 @@
 
 	g_return_if_fail (GPK_IS_WATCH (watch));
 
-	pk_debug ("icon left clicked");
+	egg_debug ("icon left clicked");
 
 	/* restart computer */
 	widget = gtk_action_create_menu_item (GTK_ACTION (watch->priv->restart_action));
@@ -843,7 +845,7 @@
 pk_connection_changed_cb (PkConnection *pconnection, gboolean connected, GpkWatch *watch)
 {
 	g_return_if_fail (GPK_IS_WATCH (watch));
-	pk_debug ("connected=%i", connected);
+	egg_debug ("connected=%i", connected);
 	if (connected) {
 		gpk_watch_refresh_icon (watch);
 		gpk_watch_refresh_tooltip (watch);
@@ -860,7 +862,7 @@
 {
 	g_return_if_fail (GPK_IS_WATCH (watch));
 
-	pk_debug ("setting locked %i, doing g-p-m (un)inhibit", is_locked);
+	egg_debug ("setting locked %i, doing g-p-m (un)inhibit", is_locked);
 	if (is_locked) {
 		gpk_inhibit_create (watch->priv->inhibit);
 	} else {
@@ -884,14 +886,14 @@
 
 	/* common case, a direct connection */
 	mode = gconf_client_get_string (watch->priv->gconf_client, "/system/proxy/mode", NULL);
-	if (pk_strequal (mode, "none")) {
-		pk_debug ("not using session proxy");
+	if (egg_strequal (mode, "none")) {
+		egg_debug ("not using session proxy");
 		goto out;
 	}
 
 	host = gconf_client_get_string (watch->priv->gconf_client, "/system/proxy/ftp_host", NULL);
-	if (pk_strzero (host)) {
-		pk_debug ("no hostname for ftp proxy");
+	if (egg_strzero (host)) {
+		egg_debug ("no hostname for ftp proxy");
 		goto out;
 	}
 	port = gconf_client_get_int (watch->priv->gconf_client, "/system/proxy/ftp_port", NULL);
@@ -927,22 +929,22 @@
 
 	/* common case, a direct connection */
 	mode = gconf_client_get_string (watch->priv->gconf_client, "/system/proxy/mode", NULL);
-	if (pk_strequal (mode, "none")) {
-		pk_debug ("not using session proxy");
+	if (egg_strequal (mode, "none")) {
+		egg_debug ("not using session proxy");
 		goto out;
 	}
 
 	/* do we use this? */
 	ret = gconf_client_get_bool (watch->priv->gconf_client, "/system/http_proxy/use_http_proxy", NULL);
 	if (!ret) {
-		pk_debug ("not using http proxy");
+		egg_debug ("not using http proxy");
 		goto out;
 	}
 
 	/* http has 4 parameters */
 	host = gconf_client_get_string (watch->priv->gconf_client, "/system/http_proxy/host", NULL);
-	if (pk_strzero (host)) {
-		pk_debug ("no hostname for http proxy");
+	if (egg_strzero (host)) {
+		egg_debug ("no hostname for http proxy");
 		goto out;
 	}
 
@@ -976,7 +978,7 @@
 	}
 
 	/* the whole auth section is optional */
-	if (pk_strzero (auth)) {
+	if (egg_strzero (auth)) {
 		proxy_http = g_strdup (connection);
 	} else {
 		proxy_http = g_strdup_printf ("%s %s", auth, connection);
@@ -1002,15 +1004,15 @@
 	g_return_val_if_fail (GPK_IS_WATCH (watch), FALSE);
 
 	/* debug so we can catch polling */
-	pk_debug ("polling check");
+	egg_debug ("polling check");
 
 	proxy_http = gpk_watch_get_proxy_http (watch);
 	proxy_ftp = gpk_watch_get_proxy_ftp (watch);
 
-	pk_debug ("set proxy_http=%s, proxy_ftp=%s", proxy_http, proxy_ftp);
+	egg_debug ("set proxy_http=%s, proxy_ftp=%s", proxy_http, proxy_ftp);
 	ret = pk_control_set_proxy (watch->priv->control, proxy_http, proxy_ftp);
 	if (!ret) {
-		pk_warning ("setting proxy failed");
+		egg_warning ("setting proxy failed");
 	}
 
 	g_free (proxy_http);
@@ -1028,7 +1030,7 @@
 gpk_watch_set_proxies (GpkWatch *watch)
 {
 	if (watch->priv->set_proxy_timeout != 0) {
-		pk_debug ("already scheduled");
+		egg_debug ("already scheduled");
 		return FALSE;
 	}
 	watch->priv->set_proxy_timeout = g_timeout_add (GPK_WATCH_SET_PROXY_RATE_LIMIT,
@@ -1044,7 +1046,7 @@
 static void
 gpk_watch_gconf_key_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, GpkWatch *watch)
 {
-	pk_debug ("keys have changed");
+	egg_debug ("keys have changed");
 	/* set the proxy */
 	gpk_watch_set_proxies (watch);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]