[PackageKit-commit] packagekit: Branch 'master' - 11 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Mon Oct 18 05:02:01 PDT 2010
Makefile.am | 1
backends/alpm/pk-backend-alpm.c | 69 +--
backends/apt/pk-backend-apt.c | 4
backends/aptcc/apt.cpp | 32 -
backends/aptcc/pk-backend-aptcc.cpp | 36 -
backends/box/pk-backend-box.c | 7
backends/conary/pk-backend-conary.c | 8
backends/dummy/pk-backend-dummy.c | 16
backends/entropy/pk-backend-entropy.c | 4
backends/opkg/pk-backend-opkg.c | 11
backends/pacman/backend-groups.c | 2
backends/pacman/backend-pacman.c | 20
backends/pacman/backend-repos.c | 6
backends/pacman/backend-transaction.c | 18
backends/pacman/backend-update.c | 2
backends/pisi/pk-backend-pisi.c | 4
backends/poldek/pk-backend-poldek.c | 12
backends/portage/pk-backend-portage.c | 4
backends/ports/pk-backend-ports.c | 4
backends/razor/pk-backend-razor.c | 1
backends/slapt/pk-backend-slapt.c | 76 +--
backends/smart/pk-backend-smart.c | 4
backends/smart/smartBackend.py | 8
backends/test/pk-backend-test-spawn.c | 4
backends/test/pk-backend-test-thread.c | 10
backends/urpmi/pk-backend-urpmi.c | 4
backends/yum/Makefile.am | 1
backends/yum/Yum.conf | 2
backends/yum/pk-backend-yum.c | 48 +-
backends/zypp/pk-backend-zypp.cpp | 26 -
backends/zypp/zypp-events.h | 14
backends/zypp/zypp-utils.cpp | 14
client/Makefile.am | 6
client/egg-debug.c | 1
client/egg-debug.h | 1
client/pk-console.c | 12
client/pk-generate-pack.c | 10
client/pk-monitor.c | 16
contrib/command-not-found/Makefile.am | 3
contrib/command-not-found/egg-debug.c | 1
contrib/command-not-found/egg-debug.h | 1
contrib/command-not-found/pk-command-not-found.c | 19
contrib/debuginfo-install/Makefile.am | 3
contrib/debuginfo-install/egg-debug.c | 1
contrib/debuginfo-install/egg-debug.h | 1
contrib/debuginfo-install/pk-debuginfo-install.c | 22
docs/api/PackageKit-docs.sgml | 1
lib/packagekit-glib2/Makefile.am | 15
lib/packagekit-glib2/egg-debug.c | 1
lib/packagekit-glib2/egg-debug.h | 1
lib/packagekit-glib2/egg-string.c | 1
lib/packagekit-glib2/egg-string.h | 1
lib/packagekit-glib2/packagekit.h | 4
lib/packagekit-glib2/pk-bitfield.c | 14
lib/packagekit-glib2/pk-catalog.c | 30 -
lib/packagekit-glib2/pk-category.c | 2
lib/packagekit-glib2/pk-client-sync.c | 2
lib/packagekit-glib2/pk-client.c | 108 ++--
lib/packagekit-glib2/pk-common.c | 9
lib/packagekit-glib2/pk-console-shared.c | 14
lib/packagekit-glib2/pk-control-sync.c | 2
lib/packagekit-glib2/pk-control.c | 168 +++----
lib/packagekit-glib2/pk-debug.c | 167 +++++++
lib/packagekit-glib2/pk-debug.h | 35 +
lib/packagekit-glib2/pk-desktop.c | 13
lib/packagekit-glib2/pk-details.c | 2
lib/packagekit-glib2/pk-distro-upgrade.c | 2
lib/packagekit-glib2/pk-enum.c | 3
lib/packagekit-glib2/pk-error.c | 2
lib/packagekit-glib2/pk-eula-required.c | 2
lib/packagekit-glib2/pk-files.c | 2
lib/packagekit-glib2/pk-media-change-required.c | 2
lib/packagekit-glib2/pk-message.c | 2
lib/packagekit-glib2/pk-package-id.c | 4
lib/packagekit-glib2/pk-package-ids.c | 2
lib/packagekit-glib2/pk-package-sack-sync.c | 2
lib/packagekit-glib2/pk-package-sack.c | 16
lib/packagekit-glib2/pk-package.c | 2
lib/packagekit-glib2/pk-progress-bar.c | 4
lib/packagekit-glib2/pk-progress.c | 30 -
lib/packagekit-glib2/pk-repo-detail.c | 2
lib/packagekit-glib2/pk-repo-signature-required.c | 2
lib/packagekit-glib2/pk-require-restart.c | 2
lib/packagekit-glib2/pk-results.c | 6
lib/packagekit-glib2/pk-self-test.c | 91 +---
lib/packagekit-glib2/pk-service-pack.c | 18
lib/packagekit-glib2/pk-source.c | 2
lib/packagekit-glib2/pk-task-sync.c | 2
lib/packagekit-glib2/pk-task-text.c | 4
lib/packagekit-glib2/pk-task-wrapper.c | 2
lib/packagekit-glib2/pk-task.c | 87 +--
lib/packagekit-glib2/pk-transaction-list.c | 14
lib/packagekit-glib2/pk-transaction-past.c | 2
lib/packagekit-glib2/pk-update-detail.c | 2
po/POTFILES.in | 3
src/Makefile.am | 4
src/egg-dbus-monitor.c | 11
src/egg-debug.c | 500 ----------------------
src/egg-debug.h | 83 ---
src/egg-string.c | 3
src/pk-backend-spawn.c | 87 +--
src/pk-backend.c | 168 +++----
src/pk-backend.h | 1
src/pk-cache.c | 13
src/pk-conf.c | 19
src/pk-dbus.c | 20
src/pk-engine.c | 91 +---
src/pk-file-monitor.c | 9
src/pk-inhibit.c | 24 -
src/pk-lsof.c | 11
src/pk-main.c | 24 -
src/pk-network-stack-connman.c | 13
src/pk-network-stack-nm.c | 22
src/pk-network-stack-unix.c | 21
src/pk-network.c | 3
src/pk-notify.c | 8
src/pk-proc.c | 11
src/pk-self-test.c | 14
src/pk-shared.c | 11
src/pk-spawn.c | 83 +--
src/pk-store.c | 37 -
src/pk-syslog.c | 6
src/pk-time.c | 25 -
src/pk-transaction-db.c | 98 ++--
src/pk-transaction-extra.c | 101 ++--
src/pk-transaction-list.c | 81 +--
src/pk-transaction.c | 205 ++++-----
127 files changed, 1364 insertions(+), 1916 deletions(-)
New commits:
commit 0b9268120b5f25b5f86705e0e9345d5143357a45
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Oct 18 11:57:15 2010 +0100
Do not include egg-string in packagekit-glib2 to fix some introspection warnings
It's only used in two places, and certainly doesn't belong in the exported API at all.
diff --git a/lib/packagekit-glib2/Makefile.am b/lib/packagekit-glib2/Makefile.am
index 0b1d39d..366db1c 100644
--- a/lib/packagekit-glib2/Makefile.am
+++ b/lib/packagekit-glib2/Makefile.am
@@ -73,8 +73,6 @@ libpackagekit_glib2_include_HEADERS = \
$(NULL)
libpackagekit_glib2_la_SOURCES = \
- egg-string.c \
- egg-string.h \
packagekit.h \
pk-bitfield.c \
pk-bitfield.h \
@@ -170,8 +168,6 @@ libpackagekit_glib2_la_CFLAGS = \
noinst_LIBRARIES = libpackagekitprivate.a
libpackagekitprivate_a_SOURCES = \
- egg-string.c \
- egg-string.h \
packagekit-private.h \
pk-console-shared.c \
pk-console-shared.h \
diff --git a/lib/packagekit-glib2/egg-string.c b/lib/packagekit-glib2/egg-string.c
deleted file mode 120000
index da9b4c3..0000000
--- a/lib/packagekit-glib2/egg-string.c
+++ /dev/null
@@ -1 +0,0 @@
-../../src/egg-string.c
\ No newline at end of file
diff --git a/lib/packagekit-glib2/egg-string.h b/lib/packagekit-glib2/egg-string.h
deleted file mode 120000
index 6186dac..0000000
--- a/lib/packagekit-glib2/egg-string.h
+++ /dev/null
@@ -1 +0,0 @@
-../../src/egg-string.h
\ No newline at end of file
diff --git a/lib/packagekit-glib2/pk-catalog.c b/lib/packagekit-glib2/pk-catalog.c
index 8793977..24eb09a 100644
--- a/lib/packagekit-glib2/pk-catalog.c
+++ b/lib/packagekit-glib2/pk-catalog.c
@@ -30,10 +30,7 @@
# include "config.h"
#endif
-//#include <fcntl.h>
-
#include <glib.h>
-//#include <glib/gstdio.h>
#include <gio/gio.h>
#include <packagekit-glib2/pk-catalog.h>
@@ -45,8 +42,6 @@
#include <packagekit-glib2/pk-package-ids.h>
#include <packagekit-glib2/pk-control-sync.h>
-#include "egg-string.h"
-
#define PK_CATALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CATALOG, PkCatalogPrivate))
typedef enum {
diff --git a/lib/packagekit-glib2/pk-common.c b/lib/packagekit-glib2/pk-common.c
index a1be7c5..79c90e4 100644
--- a/lib/packagekit-glib2/pk-common.c
+++ b/lib/packagekit-glib2/pk-common.c
@@ -38,8 +38,6 @@
#include <packagekit-glib2/pk-common.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-string.h"
-
/**
* pk_iso8601_present:
*
@@ -101,7 +99,7 @@ pk_iso8601_to_date (const gchar *iso_date)
GTimeVal time_val;
GDate *date = NULL;
- if (egg_strzero (iso_date))
+ if (iso_date == NULL || iso_date[0] == '\0')
goto out;
/* try to parse complete ISO8601 date */
diff --git a/lib/packagekit-glib2/pk-desktop.c b/lib/packagekit-glib2/pk-desktop.c
index d94acbb..51d88ba 100644
--- a/lib/packagekit-glib2/pk-desktop.c
+++ b/lib/packagekit-glib2/pk-desktop.c
@@ -33,8 +33,6 @@
#include <sqlite3.h>
#include <packagekit-glib2/pk-desktop.h>
-#include "egg-string.h"
-
static void pk_desktop_finalize (GObject *object);
#define PK_DESKTOP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_DESKTOP, PkDesktopPrivate))
diff --git a/lib/packagekit-glib2/pk-enum.c b/lib/packagekit-glib2/pk-enum.c
index 42983f6..9b0a6dc 100644
--- a/lib/packagekit-glib2/pk-enum.c
+++ b/lib/packagekit-glib2/pk-enum.c
@@ -31,8 +31,6 @@
#include <string.h>
#include <glib.h>
-#include "egg-string.h"
-
#include <packagekit-glib2/pk-common.h>
#include <packagekit-glib2/pk-enum.h>
diff --git a/lib/packagekit-glib2/pk-service-pack.c b/lib/packagekit-glib2/pk-service-pack.c
index 4d4a626..1e43c08 100644
--- a/lib/packagekit-glib2/pk-service-pack.c
+++ b/lib/packagekit-glib2/pk-service-pack.c
@@ -37,6 +37,7 @@
#include <archive.h>
#include <archive_entry.h>
#endif /* HAVE_ARCHIVE_H */
+#include <string.h>
#include <glib.h>
#include <glib/gstdio.h>
@@ -50,8 +51,6 @@
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-package-ids.h>
-#include "egg-string.h"
-
#define PK_SERVICE_PACK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_SERVICE_PACK, PkServicePackPrivate))
typedef enum {
@@ -299,7 +298,7 @@ pk_service_pack_get_random (const gchar *prefix, guint length)
guint prefix_len;
/* make a string to hold both parts */
- prefix_len = egg_strlen (prefix, 28);
+ prefix_len = strlen (prefix);
str = g_strnfill (length + prefix_len, 'X');
/* copy over prefix */
commit 2eaf141dd02783fcc2672c6673b58f548ffefe6d
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Oct 18 11:45:37 2010 +0100
yum: set G_LOG_DOMAIN for pretty verbose output
diff --git a/backends/yum/Makefile.am b/backends/yum/Makefile.am
index d68f2ed..aa46841 100644
--- a/backends/yum/Makefile.am
+++ b/backends/yum/Makefile.am
@@ -8,6 +8,7 @@ dist_helper_DATA = \
INCLUDES = \
-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
+ -DG_LOG_DOMAIN=\"PackageKit-Zif\" \
$(ZIF_CFLAGS) \
-DSYSCONFDIR=\""$(sysconfdir)"\"
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index 9410d25..2ac7e7b 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -146,7 +146,7 @@ pk_backend_profile (const gchar *title)
if (title == NULL)
goto out;
elapsed = g_timer_elapsed (priv->timer, NULL);
- g_print ("PROFILE: %ims\t%s\n", (guint) (elapsed * 1000.0f), title);
+ g_debug ("PROFILE: %ims\t%s", (guint) (elapsed * 1000.0f), title);
out:
g_timer_reset (priv->timer);
}
commit 6233d4bd350e21cf62dd269ba0680ef557f62034
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Oct 18 11:41:38 2010 +0100
trivial: fix make distcheck
diff --git a/lib/packagekit-glib2/Makefile.am b/lib/packagekit-glib2/Makefile.am
index e2404c4..0b1d39d 100644
--- a/lib/packagekit-glib2/Makefile.am
+++ b/lib/packagekit-glib2/Makefile.am
@@ -249,7 +249,7 @@ gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
clean-local:
commit 5684954d9bf1af36c5022353ebca883eb9be283e
Author: Richard Hughes <richard at hughsie.com>
Date: Sun Oct 17 22:51:17 2010 +0100
Switch from EggDebug to the GLib debugging framework
diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c
index e7f4160..6f8095c 100644
--- a/backends/alpm/pk-backend-alpm.c
+++ b/backends/alpm/pk-backend-alpm.c
@@ -38,7 +38,6 @@
#include <glib.h>
#include <string.h>
#include <pk-backend.h>
-#include <egg-debug.h>
#include <alpm.h>
#include <alpm_list.h>
@@ -166,7 +165,7 @@ emit_package (PkBackend *backend, pmpkg_t *pkg, const gchar *repo, PkInfoEnum in
{
gchar *package_id_str;
- egg_debug ("alpm: emitting package with name %s", alpm_pkg_get_name (pkg));
+ g_debug ("alpm: emitting package with name %s", alpm_pkg_get_name (pkg));
package_id_str = pkg_to_package_id_str (pkg, repo);
pk_backend_package (backend, info, package_id_str, alpm_pkg_get_desc (pkg));
@@ -203,7 +202,7 @@ cb_trans_evt (pmtransevt_t event, void *data1, void *data2)
/* search for package in package_ids */
gchar *package_id_needle = pkg_to_package_id_str (data1, "");
- egg_debug ("needle is %s", package_id_needle);
+ g_debug ("needle is %s", package_id_needle);
for (iterator = 0; iterator < g_strv_length (package_ids); ++iterator)
if (strstr (package_ids[iterator], package_id_needle) != NULL) {
pk_backend_package (backend_instance, PK_INFO_ENUM_INSTALLING, package_ids[iterator], alpm_pkg_get_desc (data1));
@@ -224,7 +223,7 @@ cb_trans_evt (pmtransevt_t event, void *data1, void *data2)
emit_package (backend_instance, data1, ALPM_LOCAL_DB_ALIAS, PK_INFO_ENUM_UPDATING);
break;
- default: egg_debug ("alpm: event %i happened", event);
+ default: g_debug ("alpm: event %i happened", event);
}
}
@@ -244,7 +243,7 @@ cb_trans_progress (pmtransprog_t event, const char *pkgname, int percent, int ho
if (event == PM_TRANS_PROGRESS_ADD_START || event == PM_TRANS_PROGRESS_UPGRADE_START || event == PM_TRANS_PROGRESS_REMOVE_START) {
int trans_percent;
- egg_debug ("alpm: transaction percentage for %s is %i", pkgname, percent);
+ g_debug ("alpm: transaction percentage for %s is %i", pkgname, percent);
trans_percent = (int) ((float) ((current - 1) * 100 + percent)) / ((float) (howmany * 100)) * 100;
pk_backend_set_sub_percentage ((PkBackend *) backend_instance, percent);
pk_backend_set_percentage ((PkBackend *) backend_instance, trans_percent);
@@ -279,7 +278,7 @@ cb_dl_progress (const char *filename, off_t file_xfered, off_t file_total)
/* compare package information with file name */
gchar *needle = g_strjoin ("-", alpm_pkg_get_name (pkg), alpm_pkg_get_version (pkg), NULL);
if (needle != NULL && strcmp (needle, "") != 0)
- egg_debug ("matching %s with %s", filename, needle);
+ g_debug ("matching %s with %s", filename, needle);
if (g_str_has_prefix (filename, needle)) {
current_pkg = pkg;
repo_name = alpm_db_get_name (db);
@@ -411,12 +410,12 @@ set_repeating_option (const char *ptr, const char *option, void (*optionfunc) (c
while ((q = strchr (p, ' '))) {
*q = '\0';
(*optionfunc) (p);
- egg_debug ("config: %s: %s", option, p);
+ g_debug ("config: %s: %s", option, p);
p = q;
p++;
}
(*optionfunc) (p);
- egg_debug ("config: %s: %s", option, p);
+ g_debug ("config: %s: %s", option, p);
}
/**
@@ -464,7 +463,7 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
fp = fopen (file, "r");
if (fp == NULL) {
- egg_error ("config file %s could not be read", file);
+ g_error ("config file %s could not be read", file);
return 1;
}
@@ -495,9 +494,9 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
section = strdup (ptr);
section[strlen (section) - 1] = '\0';
- egg_debug ("config: new section '%s'", section);
+ g_debug ("config: new section '%s'", section);
if (!strlen (section)) {
- egg_debug ("config file %s, line %d: bad section name", file, linenum);
+ g_debug ("config file %s, line %d: bad section name", file, linenum);
return 1;
}
@@ -515,11 +514,11 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
strtrim (ptr);
if (key == NULL) {
- egg_error ("config file %s, line %d: syntax error in config file - missing key.", file, linenum);
+ g_error ("config file %s, line %d: syntax error in config file - missing key.", file, linenum);
return 1;
}
if (section == NULL) {
- egg_error ("config file %s, line %d: all directives must belong to a section.", file, linenum);
+ g_error ("config file %s, line %d: all directives must belong to a section.", file, linenum);
return 1;
}
@@ -527,17 +526,17 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
/* directives without settings, all in [options] */
if (g_strcmp0 (key, "UseSyslog") == 0) {
alpm_option_set_usesyslog (1);
- egg_debug ("config: usesyslog");
+ g_debug ("config: usesyslog");
} else if (g_strcmp0 (key, "UseDelta") == 0) {
alpm_option_set_usedelta (1);
- egg_debug ("config: usedelta");
+ g_debug ("config: usedelta");
} else if (g_strcmp0 (key, "ILoveCandy") != 0 && g_strcmp0 (key, "ShowSize") != 0 && g_strcmp0 (key, "TotalDownload") != 0 && g_strcmp0 (key, "NoPassiveFTP") != 0) {
- egg_warning ("config file %s, line %d: directive '%s' not recognized.", file, linenum, key);
+ g_warning ("config file %s, line %d: directive '%s' not recognized.", file, linenum, key);
}
} else {
/* directives with settings */
if (g_strcmp0 (key, "Include") == 0) {
- egg_debug ("config: including %s", ptr);
+ g_debug ("config: including %s", ptr);
parse_config (ptr, section, db);
/* Ignore include failures... assume non-critical */
} else if (g_strcmp0 (section, "options") == 0) {
@@ -557,18 +556,18 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
alpm_option_set_dbpath (ptr);
} else if (g_strcmp0 (key, "CacheDir") == 0) {
if (alpm_option_add_cachedir (ptr) != 0) {
- egg_error ("problem adding cachedir '%s' (%s)", ptr, alpm_strerrorlast ());
+ g_error ("problem adding cachedir '%s' (%s)", ptr, alpm_strerrorlast ());
return 1;
}
- egg_debug ("config: cachedir: %s", ptr);
+ g_debug ("config: cachedir: %s", ptr);
} else if (g_strcmp0 (key, "RootDir") == 0) {
alpm_option_set_root (ptr);
- egg_debug ("config: rootdir: %s", ptr);
+ g_debug ("config: rootdir: %s", ptr);
} else if (g_strcmp0 (key, "LogFile") == 0) {
alpm_option_set_logfile (ptr);
- egg_debug ("config: logfile: %s", ptr);
+ g_debug ("config: logfile: %s", ptr);
} else if (g_strcmp0 (key, "XferCommand") != 0 && g_strcmp0 (key, "CleanMethod") != 0) {
- egg_warning ("config file %s, line %d: directive '%s' not recognized.", file, linenum, key);
+ g_warning ("config file %s, line %d: directive '%s' not recognized.", file, linenum, key);
}
} else if (g_strcmp0 (key, "Server") == 0) {
/* let's attempt a replacement for the current repo */
@@ -576,13 +575,13 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
if (alpm_db_setserver (db, server) != 0) {
/* pm_errno is set by alpm_db_setserver */
- egg_error ("config file %s, line %d: could not add server URL to database (%s).", file, linenum, alpm_strerrorlast ());
+ g_error ("config file %s, line %d: could not add server URL to database (%s).", file, linenum, alpm_strerrorlast ());
free (server);
return 1;
}
free (server);
} else {
- egg_warning ("config file %s, line %d: directive '%s' not recognized.", file, linenum, key);
+ g_warning ("config file %s, line %d: directive '%s' not recognized.", file, linenum, key);
}
}
}
@@ -592,7 +591,7 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
if (section)
free (section);
- egg_debug ("config: finished parsing %s", file);
+ g_debug ("config: finished parsing %s", file);
return 0;
}
@@ -605,11 +604,11 @@ backend_initialize (PkBackend *backend)
/* initialize backend_instance for use in callback functions */
backend_instance = backend;
- egg_debug ("alpm: initializing backend");
+ g_debug ("alpm: initializing backend");
if (alpm_initialize () == -1) {
pk_backend_error_code (backend, PK_ERROR_ENUM_FAILED_INITIALIZATION, "Failed to initialize package manager");
- egg_debug ("alpm: %s", alpm_strerror (pm_errno));
+ g_debug ("alpm: %s", alpm_strerror (pm_errno));
return;
}
@@ -622,7 +621,7 @@ backend_initialize (PkBackend *backend)
if (alpm_db_register_local () == NULL) {
pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_AVAILABLE, "Failed to load local database");
- egg_debug ("alpm: %s", alpm_strerror (pm_errno));
+ g_debug ("alpm: %s", alpm_strerror (pm_errno));
alpm_release ();
return;
}
@@ -663,7 +662,7 @@ backend_initialize (PkBackend *backend)
g_hash_table_insert (group_map, (gchar *) "texlive-most-svn", (gchar *) "publishing");
g_hash_table_insert (group_map, (gchar *) "base", (gchar *) "system");
- egg_debug ("alpm: ready to go");
+ g_debug ("alpm: ready to go");
}
/**
@@ -676,7 +675,7 @@ backend_destroy (PkBackend *backend)
if (alpm_release () == -1) {
pk_backend_error_code (backend, PK_ERROR_ENUM_FAILED_FINALISE, "Failed to release package manager");
- egg_debug ("alpm: %s", alpm_strerror (pm_errno));
+ g_debug ("alpm: %s", alpm_strerror (pm_errno));
}
}
@@ -739,7 +738,7 @@ backend_download_packages_thread (PkBackend *backend)
alpm_list_t *cachedirs = NULL;
alpm_list_t *data = NULL;
- egg_debug ("alpm: downloading packages to %s", directory);
+ g_debug ("alpm: downloading packages to %s", directory);
/* old cachedirs list automatically gets freed in alpm, so make a copy */
for (list_iterator = alpm_option_get_cachedirs (); list_iterator; list_iterator = alpm_list_next (list_iterator))
@@ -790,7 +789,7 @@ backend_download_packages_thread (PkBackend *backend)
gchar *needle = g_strjoin ("-", package_id_data[PK_PACKAGE_ID_NAME], package_id_data[PK_PACKAGE_ID_VERSION], NULL);
if (needle != NULL && strcmp (needle, "") != 0)
- egg_debug ("matching %s with %s", (char *) alpm_list_getdata (list_iterator), needle);
+ g_debug ("matching %s with %s", (char *) alpm_list_getdata (list_iterator), needle);
if (g_str_has_prefix ((char *) alpm_list_getdata (list_iterator), needle))
package_id = package_ids[iterator];
@@ -858,7 +857,7 @@ backend_get_depends (PkBackend *backend, PkBitfield filters, gchar **package_ids
for (db_iterator = alpm_option_get_syncdbs (); found == FALSE && db_iterator; db_iterator = alpm_list_next (db_iterator)) {
pmdb_t *syncdb = alpm_list_getdata (db_iterator);
- egg_debug ("alpm: searching for %s in %s", alpm_dep_get_name (dep), alpm_db_get_name (syncdb));
+ g_debug ("alpm: searching for %s in %s", alpm_dep_get_name (dep), alpm_db_get_name (syncdb));
dep_pkg = alpm_db_get_pkg (syncdb, alpm_dep_get_name (dep));
if (dep_pkg && alpm_depcmp (dep_pkg, dep) && pkg_cmp (dep_pkg, alpm_db_get_pkg (alpm_option_get_localdb (), alpm_dep_get_name (dep))) != 0) {
@@ -869,7 +868,7 @@ backend_get_depends (PkBackend *backend, PkBitfield filters, gchar **package_ids
}
if (!pk_bitfield_contain (filters, PK_FILTER_ENUM_NOT_INSTALLED)) {
- egg_debug ("alpm: searching for %s in local db", alpm_dep_get_name (dep));
+ g_debug ("alpm: searching for %s in local db", alpm_dep_get_name (dep));
/* search in local db */
dep_pkg = alpm_db_get_pkg (alpm_option_get_localdb (), alpm_dep_get_name (dep));
@@ -1214,7 +1213,7 @@ backend_install_files_thread (PkBackend *backend)
pk_backend_finished (backend);
return FALSE;
} else
- egg_debug ("alpm: %s added to transaction queue", full_paths[iterator]);
+ g_debug ("alpm: %s added to transaction queue", full_paths[iterator]);
}
/* prepare and commit transaction */
diff --git a/backends/apt/pk-backend-apt.c b/backends/apt/pk-backend-apt.c
index 2e84422..66273ba 100644
--- a/backends/apt/pk-backend-apt.c
+++ b/backends/apt/pk-backend-apt.c
@@ -54,7 +54,7 @@ backend_stderr_cb (PkBackend *backend, const gchar *output)
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_filter_stderr (spawn, backend_stderr_cb);
pk_backend_spawn_set_name (spawn, "apt");
@@ -67,7 +67,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
diff --git a/backends/aptcc/apt.cpp b/backends/aptcc/apt.cpp
index e674be8..df5bdcb 100644
--- a/backends/aptcc/apt.cpp
+++ b/backends/aptcc/apt.cpp
@@ -145,25 +145,25 @@ aptcc::~aptcc()
{
if (packageRecords)
{
- egg_debug ("~apt_init packageRecords");
+ g_debug ("~apt_init packageRecords");
delete packageRecords;
}
if (packageCache)
{
- egg_debug ("~apt_init packageCache");
+ g_debug ("~apt_init packageCache");
delete packageCache;
}
if (packageDepCache)
{
- egg_debug ("~apt_init packageDepCache");
+ g_debug ("~apt_init packageDepCache");
delete packageDepCache;
}
if (Policy)
{
- egg_debug ("~apt_init Policy");
+ g_debug ("~apt_init Policy");
delete Policy;
}
@@ -444,7 +444,7 @@ void aptcc::povidesCodec(vector<pair<pkgCache::PkgIterator, pkgCache::VerIterato
"\\((.*)\\)\\?";
if(regcomp(&pkre, pkreg, 0) != 0) {
- egg_debug("Regex compilation error: ", pkreg);
+ g_debug("Regex compilation error: ", pkreg);
return;
}
@@ -493,11 +493,11 @@ void aptcc::povidesCodec(vector<pair<pkgCache::PkgIterator, pkgCache::VerIterato
if(regcomp(&sre, itemreg, REG_NEWLINE | REG_NOSUB) == 0) {
search.push_back(pair<string, regex_t>(version, sre));
} else {
- egg_debug("Search regex compilation error: ", itemreg);
+ g_debug("Search regex compilation error: ", itemreg);
}
g_free(itemreg);
} else {
- egg_debug("Did not match: %s", value);
+ g_debug("Did not match: %s", value);
}
}
regfree(&pkre);
@@ -922,7 +922,7 @@ vector<string> search_files (PkBackend *backend, gchar **values, bool &_cancel)
values_str);
g_free(values_str);
if(regcomp(&re, search, REG_NOSUB) != 0) {
- egg_debug("Regex compilation error");
+ g_debug("Regex compilation error");
g_free(search);
return vector<string>();
}
@@ -931,7 +931,7 @@ vector<string> search_files (PkBackend *backend, gchar **values, bool &_cancel)
DIR *dp;
struct dirent *dirp;
if (!(dp = opendir("/var/lib/dpkg/info/"))) {
- egg_debug ("Error opening /var/lib/dpkg/info/\n");
+ g_debug ("Error opening /var/lib/dpkg/info/\n");
regfree(&re);
return vector<string>();
}
@@ -976,7 +976,7 @@ vector<string> searchMimeType (PkBackend *backend, gchar **values, bool &error,
g_free(values_str);
if(regcomp(&re, value, REG_NOSUB) != 0) {
- egg_debug("Regex compilation error");
+ g_debug("Regex compilation error");
g_free(value);
return vector<string>();
}
@@ -985,7 +985,7 @@ vector<string> searchMimeType (PkBackend *backend, gchar **values, bool &error,
DIR *dp;
struct dirent *dirp;
if (!(dp = opendir("/usr/share/app-install/desktop/"))) {
- egg_debug ("Error opening /usr/share/app-install/desktop/\n");
+ g_debug ("Error opening /usr/share/app-install/desktop/\n");
regfree(&re);
error = true;
return vector<string>();
@@ -1041,7 +1041,7 @@ vector<string> searchMimeType (PkBackend *backend, gchar **values, bool &error,
// g_free(values_str);
//
// if(regcomp(&re, value, REG_NOSUB) != 0) {
-// egg_debug("Regex compilation error");
+// g_debug("Regex compilation error");
// g_free(value);
// return vector<string>();
// }
@@ -1050,7 +1050,7 @@ vector<string> searchMimeType (PkBackend *backend, gchar **values, bool &error,
// DIR *dp;
// struct dirent *dirp;
// if (!(dp = opendir("/usr/share/app-install/desktop/"))) {
-// egg_debug ("Error opening /usr/share/app-install/desktop/\n");
+// g_debug ("Error opening /usr/share/app-install/desktop/\n");
// regfree(&re);
// error = true;
// return vector<string>();
@@ -1147,7 +1147,7 @@ static bool checkTrusted(pkgAcquire &fetcher, PkBackend *backend)
if (pk_backend_get_bool(backend, "only_trusted") == false ||
_config->FindB("APT::Get::AllowUnauthenticated", false) == true)
{
- egg_debug ("Authentication warning overridden.\n");
+ g_debug ("Authentication warning overridden.\n");
return true;
}
@@ -1467,7 +1467,7 @@ void aptcc::updateInterface(int fd, int writeFd)
confmsg);
if (write(writeFd, "N\n", 2) != 2) {
// TODO we need a DPKG patch to use debconf
- egg_debug("Failed to write");
+ g_debug("Failed to write");
}
} else if (strstr(status, "pmstatus") != NULL) {
// INSTALL & UPDATE
@@ -1944,7 +1944,7 @@ cout << "How odd.. The sizes didn't match, email apt at packages.debian.org";
pkgPackageManager::OrderResult res;
res = PM->DoInstallPreFork();
if (res == pkgPackageManager::Failed) {
- egg_warning ("Failed to prepare installation");
+ g_warning ("Failed to prepare installation");
show_errors(m_backend, PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED);
return false;
}
diff --git a/backends/aptcc/pk-backend-aptcc.cpp b/backends/aptcc/pk-backend-aptcc.cpp
index 246a4c0..0238a38 100644
--- a/backends/aptcc/pk-backend-aptcc.cpp
+++ b/backends/aptcc/pk-backend-aptcc.cpp
@@ -47,12 +47,12 @@ static PkBackendSpawn *spawn;
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("APTcc Initializing");
+ g_debug ("APTcc Initializing");
if (pkgInitConfig(*_config) == false ||
pkgInitSystem(*_config, _system) == false)
{
- egg_debug ("ERROR initializing backend");
+ g_debug ("ERROR initializing backend");
}
spawn = pk_backend_spawn_new ();
@@ -65,7 +65,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("APTcc being destroyed");
+ g_debug ("APTcc being destroyed");
}
/**
@@ -151,7 +151,7 @@ backend_get_depends_or_requires_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -251,7 +251,7 @@ backend_get_files_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -315,7 +315,7 @@ backend_get_details_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -396,7 +396,7 @@ backend_get_or_update_system_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -427,7 +427,7 @@ backend_get_or_update_system_thread (PkBackend *backend)
if (pkgDistUpgrade(*Cache) == false)
{
show_broken(backend, Cache, false);
- egg_debug ("Internal error, DistUpgrade broke stuff");
+ g_debug ("Internal error, DistUpgrade broke stuff");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -508,7 +508,7 @@ backend_what_provides_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
g_strfreev (values);
delete m_apt;
pk_backend_finished (backend);
@@ -602,7 +602,7 @@ backend_download_packages_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -725,7 +725,7 @@ backend_refresh_cache_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -797,7 +797,7 @@ backend_resolve_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -878,7 +878,7 @@ backend_search_files_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -947,7 +947,7 @@ backend_search_groups_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -1021,7 +1021,7 @@ backend_search_package_thread (PkBackend *backend)
matcher *m_matcher = new matcher(search);
g_free(search);
if (m_matcher->hasError()) {
- egg_debug("Regex compilation error");
+ g_debug("Regex compilation error");
delete m_matcher;
pk_backend_finished (backend);
return false;
@@ -1030,7 +1030,7 @@ backend_search_package_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_matcher;
delete m_apt;
pk_backend_finished (backend);
@@ -1192,7 +1192,7 @@ backend_manage_packages_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
@@ -1423,7 +1423,7 @@ backend_get_packages_thread (PkBackend *backend)
aptcc *m_apt = new aptcc(backend, _cancel);
pk_backend_set_pointer(backend, "aptcc_obj", m_apt);
if (m_apt->init()) {
- egg_debug ("Failed to create apt cache");
+ g_debug ("Failed to create apt cache");
delete m_apt;
pk_backend_finished (backend);
return false;
diff --git a/backends/box/pk-backend-box.c b/backends/box/pk-backend-box.c
index bcd5fba..80f2cf1 100644
--- a/backends/box/pk-backend-box.c
+++ b/backends/box/pk-backend-box.c
@@ -22,7 +22,6 @@
#include <gmodule.h>
#include <glib.h>
#include <pk-backend.h>
-#include <egg-debug.h>
#include <sqlite3.h>
#include <libbox/libbox-db.h>
@@ -109,7 +108,6 @@ backend_find_packages_thread (PkBackend *backend)
sqlite3 *db = NULL;
gint filter_box = 0;
-
filters = pk_backend_get_uint (backend, "filters");
mode = pk_backend_get_uint (backend, "mode");
values = pk_backend_get_strv (backend, "search");
@@ -172,7 +170,6 @@ backend_find_packages_thread (PkBackend *backend)
return TRUE;
}
-
static gboolean
backend_get_packages_thread (PkBackend *backend)
{
@@ -207,7 +204,6 @@ backend_get_packages_thread (PkBackend *backend)
return TRUE;
}
-
static gboolean
backend_get_updates_thread (PkBackend *backend)
{
@@ -460,7 +456,6 @@ backend_get_mime_types (PkBackend *backend)
return g_strdup ("application/x-box-package");
}
-
/**
* backend_get_depends:
*/
@@ -692,7 +687,7 @@ backend_repo_set_data (PkBackend *backend, const gchar *rid, const gchar *parame
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
if (!box_repos_set_param (rid, parameter, value)) {
- egg_warning ("Cannot set PARAMETER '%s' TO '%s' for REPO '%s'", parameter, value, rid);
+ g_warning ("Cannot set PARAMETER '%s' TO '%s' for REPO '%s'", parameter, value, rid);
}
pk_backend_finished (backend);
diff --git a/backends/conary/pk-backend-conary.c b/backends/conary/pk-backend-conary.c
index a7617cd..b59339f 100644
--- a/backends/conary/pk-backend-conary.c
+++ b/backends/conary/pk-backend-conary.c
@@ -34,7 +34,7 @@ static PkBackendSpawn *spawn;
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "conary");
}
@@ -46,7 +46,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
@@ -275,7 +275,7 @@ backend_update_packages (PkBackend *backend, gboolean only_trusted, gchar **pack
}
/* send the complete list as stdin */
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug("Updates Packages");
+ g_debug("Updates Packages");
pk_backend_spawn_helper (spawn, "conaryBackend.py", "update-packages", pk_backend_bool_to_string (only_trusted), package_ids_temp, NULL);
g_free (package_ids_temp);
}
@@ -416,7 +416,7 @@ backend_simulate_update_packages (PkBackend *backend, gchar **package_ids)
}
/* send the complete list as stdin */
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug("Updates Packages");
+ g_debug("Updates Packages");
pk_backend_spawn_helper (spawn, "conaryBackend.py", "simulate-update-packages", package_ids_temp, NULL);
g_free (package_ids_temp);
}
diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index bc7243d..d3aaf9f 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -542,7 +542,7 @@ pk_backend_install_signature (PkBackend *backend, PkSigTypeEnum type,
if (type == PK_SIGTYPE_ENUM_GPG &&
/* egg_strequal (package_id, "vips-doc;7.12.4-2.fc8;noarch;linva") && */
g_strcmp0 (key_id, "BB7576AC") == 0) {
- egg_debug ("installed signature %s for %s", key_id, package_id);
+ g_debug ("installed signature %s for %s", key_id, package_id);
_has_signature = TRUE;
} else {
pk_backend_error_code (backend, PK_ERROR_ENUM_GPG_FAILURE,
@@ -780,7 +780,7 @@ pk_backend_search_name_timeout (gpointer data)
PkBackend *backend = (PkBackend *) data;
locale = pk_backend_get_locale (backend);
- egg_debug ("locale is %s", locale);
+ g_debug ("locale is %s", locale);
if (g_strcmp0 (locale, "en_GB.utf8") != 0) {
pk_backend_package (backend, PK_INFO_ENUM_INSTALLED,
"evince;0.9.3-5.fc8;i386;installed",
@@ -1062,19 +1062,19 @@ pk_backend_repo_enable (PkBackend *backend, const gchar *rid, gboolean enabled)
pk_backend_set_status (backend, PK_STATUS_ENUM_REQUEST);
if (g_strcmp0 (rid, "local") == 0) {
- egg_debug ("local repo: %i", enabled);
+ g_debug ("local repo: %i", enabled);
_repo_enabled_local = enabled;
} else if (g_strcmp0 (rid, "development") == 0) {
- egg_debug ("devel repo: %i", enabled);
+ g_debug ("devel repo: %i", enabled);
_repo_enabled_devel = enabled;
} else if (g_strcmp0 (rid, "fedora") == 0) {
- egg_debug ("fedora repo: %i", enabled);
+ g_debug ("fedora repo: %i", enabled);
_repo_enabled_fedora = enabled;
} else if (g_strcmp0 (rid, "livna-development") == 0) {
- egg_debug ("livna repo: %i", enabled);
+ g_debug ("livna repo: %i", enabled);
_repo_enabled_livna = enabled;
} else {
- egg_warning ("unknown repo: %s", rid);
+ g_warning ("unknown repo: %s", rid);
}
pk_backend_finished (backend);
}
@@ -1086,7 +1086,7 @@ void
pk_backend_repo_set_data (PkBackend *backend, const gchar *rid, const gchar *parameter, const gchar *value)
{
pk_backend_set_status (backend, PK_STATUS_ENUM_REQUEST);
- egg_warning ("REPO '%s' PARAMETER '%s' TO '%s'", rid, parameter, value);
+ g_warning ("REPO '%s' PARAMETER '%s' TO '%s'", rid, parameter, value);
if (g_strcmp0 (parameter, "use-blocked") == 0)
_use_blocked = atoi (value);
diff --git a/backends/entropy/pk-backend-entropy.c b/backends/entropy/pk-backend-entropy.c
index 5d8ae87..50519ef 100644
--- a/backends/entropy/pk-backend-entropy.c
+++ b/backends/entropy/pk-backend-entropy.c
@@ -32,7 +32,7 @@ static const gchar* BACKEND_FILE = "entropyBackend.py";
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "entropy");
/* allowing sigkill as long as no one complain */
@@ -46,7 +46,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
index d3c1800..e5f4ced 100644
--- a/backends/opkg/pk-backend-opkg.c
+++ b/backends/opkg/pk-backend-opkg.c
@@ -25,7 +25,6 @@
#include <glib.h>
#include <string.h>
#include <pk-backend.h>
-#include <egg-debug.h>
#include <stdio.h>
#include <libopkg/opkg.h>
@@ -176,7 +175,6 @@ backend_destroy (PkBackend *backend)
opkg_free ();
}
-
static void
pk_opkg_progress_cb (const opkg_progress_data_t *pdata, void *data)
{
@@ -246,7 +244,6 @@ backend_refresh_cache (PkBackend *backend, gboolean force)
pk_backend_set_status (backend, PK_STATUS_ENUM_REFRESH_CACHE);
pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
-
pk_backend_thread_create (backend, backend_refresh_cache_thread);
}
@@ -352,7 +349,6 @@ backend_search_name (PkBackend *backend, PkBitfield filters, gchar **search)
{
SearchParams *params;
-
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
@@ -374,7 +370,6 @@ backend_search_description (PkBackend *backend, PkBitfield filters, gchar **sear
{
SearchParams *params;
-
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
@@ -393,7 +388,6 @@ backend_search_group (PkBackend *backend, PkBitfield filters, gchar **search)
{
SearchParams *params;
-
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
@@ -407,7 +401,6 @@ backend_search_group (PkBackend *backend, PkBitfield filters, gchar **search)
pk_backend_thread_create (backend, backend_search_thread);
}
-
static gboolean
backend_install_packages_thread (PkBackend *backend)
{
@@ -533,7 +526,6 @@ backend_get_filters (PkBackend *backend)
-1);
}
-
static gboolean
backend_update_system_thread (PkBackend *backend)
{
@@ -584,7 +576,6 @@ backend_update_package_thread (PkBackend *backend)
if (err)
handle_install_error (backend, err);
-
g_strfreev (parts);
pk_backend_finished (backend);
return (err != 0);
@@ -677,7 +668,6 @@ backend_get_details_thread (PkBackend *backend)
package_ids = pk_backend_get_strv(backend, "package_ids");
parts = pk_package_id_split (package_ids[0]);
-
if (!parts)
{
pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "invalid package id");
@@ -685,7 +675,6 @@ backend_get_details_thread (PkBackend *backend)
return FALSE;
}
-
pkg = opkg_find_package (parts[PK_PACKAGE_ID_NAME], parts[PK_PACKAGE_ID_VERSION], parts[PK_PACKAGE_ID_ARCH], parts[PK_PACKAGE_ID_DATA]);
g_strfreev (parts);
diff --git a/backends/pacman/backend-groups.c b/backends/pacman/backend-groups.c
index 1c785f9..95ebce6 100644
--- a/backends/pacman/backend-groups.c
+++ b/backends/pacman/backend-groups.c
@@ -41,7 +41,7 @@ group_map_new (GError **error)
gchar *key, *value;
GError *e = NULL;
- egg_debug ("pacman: reading groups from %s", PACMAN_GROUP_LIST);
+ g_debug ("pacman: reading groups from %s", PACMAN_GROUP_LIST);
file = g_file_new_for_path (PACMAN_GROUP_LIST);
file_stream = g_file_read (file, NULL, &e);
diff --git a/backends/pacman/backend-pacman.c b/backends/pacman/backend-pacman.c
index 09612e8..5f11a75 100644
--- a/backends/pacman/backend-pacman.c
+++ b/backends/pacman/backend-pacman.c
@@ -46,17 +46,17 @@ pacman_message_cb (const gchar *domain, GLogLevelFlags level, const gchar *messa
switch (level) {
case G_LOG_LEVEL_WARNING:
case G_LOG_LEVEL_MESSAGE:
- egg_warning ("pacman: %s", message);
+ g_warning ("pacman: %s", message);
backend_message ((PkBackend *) user_data, message);
break;
case G_LOG_LEVEL_INFO:
case G_LOG_LEVEL_DEBUG:
- egg_debug ("pacman: %s", message);
+ g_debug ("pacman: %s", message);
break;
default:
- egg_warning ("pacman: %s", message);
+ g_warning ("pacman: %s", message);
break;
}
}
@@ -78,33 +78,33 @@ backend_initialize (PkBackend *backend)
/* PATH needs to be set for install scriptlets */
g_setenv ("PATH", PACMAN_DEFAULT_PATH, FALSE);
- egg_debug ("pacman: initializing");
+ g_debug ("pacman: initializing");
/* initialize pacman-glib */
pacman = pacman_manager_get (&error);
if (pacman == NULL) {
- egg_error ("pacman: %s", error->message);
+ g_error ("pacman: %s", error->message);
g_error_free (error);
return;
}
/* configure and disable the relevant databases */
if (!backend_initialize_databases (backend, &error)) {
- egg_error ("pacman: %s", error->message);
+ g_error ("pacman: %s", error->message);
g_error_free (error);
return;
}
/* read the group mapping from a config file */
if (!backend_initialize_groups (backend, &error)) {
- egg_error ("pacman: %s", error->message);
+ g_error ("pacman: %s", error->message);
g_error_free (error);
return;
}
/* setup better download progress reporting */
if (!backend_initialize_downloads (backend, &error)) {
- egg_error ("pacman: %s", error->message);
+ g_error ("pacman: %s", error->message);
g_error_free (error);
return;
}
@@ -118,7 +118,7 @@ backend_destroy (PkBackend *backend)
{
g_return_if_fail (backend != NULL);
- egg_debug ("pacman: cleaning up");
+ g_debug ("pacman: cleaning up");
backend_destroy_downloads (backend);
backend_destroy_groups (backend);
@@ -159,7 +159,7 @@ backend_run (PkBackend *backend, PkStatusEnum status, PkBackendThreadFunc func)
g_return_if_fail (func != NULL);
if (cancellable != NULL) {
- egg_warning ("pacman: cancellable was not NULL");
+ g_warning ("pacman: cancellable was not NULL");
g_object_unref (cancellable);
}
cancellable = g_cancellable_new ();
diff --git a/backends/pacman/backend-repos.c b/backends/pacman/backend-repos.c
index 35332be..8ef23d9 100644
--- a/backends/pacman/backend-repos.c
+++ b/backends/pacman/backend-repos.c
@@ -40,7 +40,7 @@ disabled_repos_new (GError **error)
gchar *line;
GError *e = NULL;
- egg_debug ("pacman: reading disabled repos from %s", PACMAN_REPO_LIST);
+ g_debug ("pacman: reading disabled repos from %s", PACMAN_REPO_LIST);
file = g_file_new_for_path (PACMAN_REPO_LIST);
file_stream = g_file_read (file, NULL, &e);
@@ -85,7 +85,7 @@ disabled_repos_configure (GHashTable *disabled, GError **error)
g_return_val_if_fail (pacman != NULL, FALSE);
- egg_debug ("pacman: reading config from %s", PACMAN_CONFIG_FILE);
+ g_debug ("pacman: reading config from %s", PACMAN_CONFIG_FILE);
/* read configuration from pacman config file */
if (!pacman_manager_configure (pacman, PACMAN_CONFIG_FILE, error)) {
@@ -125,7 +125,7 @@ disabled_repos_free (GHashTable *disabled)
g_return_if_fail (disabled != NULL);
- egg_debug ("pacman: storing disabled repos in %s", PACMAN_REPO_LIST);
+ g_debug ("pacman: storing disabled repos in %s", PACMAN_REPO_LIST);
file = g_file_new_for_path (PACMAN_REPO_LIST);
file_stream = g_file_replace (file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL);
diff --git a/backends/pacman/backend-transaction.c b/backends/pacman/backend-transaction.c
index 458ad83..748760b 100644
--- a/backends/pacman/backend-transaction.c
+++ b/backends/pacman/backend-transaction.c
@@ -188,7 +188,7 @@ transaction_download_cb (PacmanTransaction *transaction, const gchar *filename,
}
if (complete == 0) {
- egg_debug ("pacman: downloading database %s", filename);
+ g_debug ("pacman: downloading database %s", filename);
pk_backend_set_status ((PkBackend *) user_data, PK_STATUS_ENUM_REFRESH_CACHE);
}
@@ -202,7 +202,7 @@ transaction_download_cb (PacmanTransaction *transaction, const gchar *filename,
}
if (complete == 0) {
- egg_debug ("pacman: downloading package %s", filename);
+ g_debug ("pacman: downloading package %s", filename);
pk_backend_set_status ((PkBackend *) user_data, PK_STATUS_ENUM_DOWNLOAD);
transaction_download_start (transaction, download, filename, (PkBackend *) user_data);
}
@@ -235,13 +235,13 @@ transaction_progress_cb (PacmanTransaction *transaction, PacmanTransactionProgre
case PACMAN_TRANSACTION_PROGRESS_REMOVE:
case PACMAN_TRANSACTION_PROGRESS_FILE_CONFLICT_CHECK:
{
- egg_debug ("pacman: progress for %s (%u of %u) is %u%%", target, current, targets, percent);
+ g_debug ("pacman: progress for %s (%u of %u) is %u%%", target, current, targets, percent);
pk_backend_set_sub_percentage ((PkBackend *) user_data, percent);
pk_backend_set_percentage ((PkBackend *) user_data, (percent + (current - 1) * 100) / targets);
break;
}
default:
- egg_debug ("pacman: progress of type %d (%u of %u) is %u%%", type, current, targets, percent);
+ g_debug ("pacman: progress of type %d (%u of %u) is %u%%", type, current, targets, percent);
break;
}
}
@@ -261,7 +261,7 @@ transaction_question_cb (PacmanTransaction *transaction, PacmanTransactionQuesti
gchar *warning = g_strdup_printf ("The following packages were marked as ignored:\n%s\n", packages);
/* ignored packages are blocked in updates, can be explicitly installed */
- egg_warning ("pacman: %s", warning);
+ g_warning ("pacman: %s", warning);
backend_message ((PkBackend *) user_data, warning);
g_free (warning);
@@ -277,7 +277,7 @@ transaction_question_cb (PacmanTransaction *transaction, PacmanTransactionQuesti
case PACMAN_TRANSACTION_QUESTION_REMOVE_HOLD_PACKAGES:
case PACMAN_TRANSACTION_QUESTION_SYNC_FIRST:
/* none of these actions are safe */
- egg_warning ("pacman: ignoring question '%s'", message);
+ g_warning ("pacman: ignoring question '%s'", message);
return FALSE;
case PACMAN_TRANSACTION_QUESTION_REPLACE_PACKAGE:
@@ -285,11 +285,11 @@ transaction_question_cb (PacmanTransaction *transaction, PacmanTransactionQuesti
case PACMAN_TRANSACTION_QUESTION_INSTALL_OLDER_PACKAGE:
case PACMAN_TRANSACTION_QUESTION_DELETE_CORRUPTED_PACKAGE:
/* these actions are mostly harmless */
- egg_warning ("pacman: confirming question '%s'", message);
+ g_warning ("pacman: confirming question '%s'", message);
return TRUE;
default:
- egg_warning ("pacman: unrecognised question '%s'", message);
+ g_warning ("pacman: unrecognised question '%s'", message);
return FALSE;
}
}
@@ -349,7 +349,7 @@ transaction_status_cb (PacmanTransaction *transaction, PacmanTransactionStatus s
default:
state = PK_STATUS_ENUM_UNKNOWN;
info = PK_INFO_ENUM_UNKNOWN;
- egg_debug ("pacman: %s", message);
+ g_debug ("pacman: %s", message);
break;
}
diff --git a/backends/pacman/backend-update.c b/backends/pacman/backend-update.c
index 256ba2f..a34eb05 100644
--- a/backends/pacman/backend-update.c
+++ b/backends/pacman/backend-update.c
@@ -317,7 +317,7 @@ backend_get_updates_thread (PkBackend *backend)
return FALSE;
}
} else {
- egg_debug ("pacman: databases have been refreshed recently");
+ g_debug ("pacman: databases have been refreshed recently");
}
/* find outdated and replacement packages */
diff --git a/backends/pisi/pk-backend-pisi.c b/backends/pisi/pk-backend-pisi.c
index b871292..2acc9d7 100644
--- a/backends/pisi/pk-backend-pisi.c
+++ b/backends/pisi/pk-backend-pisi.c
@@ -32,7 +32,7 @@ static PkBackendSpawn *spawn;
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "pisi");
}
@@ -44,7 +44,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
diff --git a/backends/poldek/pk-backend-poldek.c b/backends/poldek/pk-backend-poldek.c
index df3222a..4c6df05 100644
--- a/backends/poldek/pk-backend-poldek.c
+++ b/backends/poldek/pk-backend-poldek.c
@@ -582,7 +582,7 @@ get_ts_summary (TsType type, tn_array *ipkgs, tn_array *dpkgs, tn_array *rpkgs,
break;
default:
- egg_error ("Unknown ts_type value: %d", type);
+ g_error ("Unknown ts_type value: %d", type);
}
/* return sorted arrays */
@@ -1807,7 +1807,7 @@ update_packages_thread (PkBackend *backend)
/* sth goes wrong. package_ids has to be set in UpdatePackages */
if (update_system == FALSE && package_ids == NULL) {
- egg_warning ("package_ids cannot be NULL in UpdatePackages method.");
+ g_warning ("package_ids cannot be NULL in UpdatePackages method.");
pk_backend_finished (backend);
return TRUE;
}
@@ -1955,14 +1955,14 @@ show_rpm_progress (PkBackend *backend, gchar *message)
g_return_if_fail (message != NULL);
if (pberror->rpmstate & PB_RPM_STATE_ENUM_REPACKAGING) {
- egg_debug ("repackaging '%s'", message);
+ g_debug ("repackaging '%s'", message);
} else if (pberror->rpmstate & PB_RPM_STATE_ENUM_INSTALLING) {
tn_array *upkgs, *ipkgs, *rpkgs, *arr = NULL;
guint to_install;
PkInfoEnum pkinfo;
gint n = -2;
- egg_debug ("installing or updating '%s'", message);
+ g_debug ("installing or updating '%s'", message);
to_install = pk_backend_get_uint (backend, "to_install");
@@ -2224,7 +2224,7 @@ poldek_reload (PkBackend *backend, gboolean load_packages) {
static void
backend_initalize (PkBackend *backend)
{
- egg_debug ("backend initalize start");
+ g_debug ("backend initalize start");
clv = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)n_array_free);
@@ -2233,7 +2233,7 @@ backend_initalize (PkBackend *backend)
do_poldek_init (backend);
- egg_debug ("backend initalize end");
+ g_debug ("backend initalize end");
}
/**
* backend_destroy:
diff --git a/backends/portage/pk-backend-portage.c b/backends/portage/pk-backend-portage.c
index c00040d..a51908b 100644
--- a/backends/portage/pk-backend-portage.c
+++ b/backends/portage/pk-backend-portage.c
@@ -32,7 +32,7 @@ static const gchar* BACKEND_FILE = "portageBackend.py";
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "portage");
/* allowing sigkill as long as no one complain */
@@ -46,7 +46,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
diff --git a/backends/ports/pk-backend-ports.c b/backends/ports/pk-backend-ports.c
index e442f06..2a93758 100644
--- a/backends/ports/pk-backend-ports.c
+++ b/backends/ports/pk-backend-ports.c
@@ -32,7 +32,7 @@ static const gchar* BACKEND_FILE = "portsBackend.rb";
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "ports");
/* allowing sigkill as long as no one complain */
@@ -46,7 +46,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
diff --git a/backends/razor/pk-backend-razor.c b/backends/razor/pk-backend-razor.c
index e20fe31..0a99899 100644
--- a/backends/razor/pk-backend-razor.c
+++ b/backends/razor/pk-backend-razor.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <pk-backend.h>
#include <pk-backend-internal.h>
-#include <egg-debug.h>
#include <razor/razor.h>
diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index 2cea306..78518d5 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -34,7 +34,7 @@ static const gchar* BACKEND_FILE = "smartBackend.py";
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "smart");
}
@@ -46,7 +46,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
diff --git a/backends/test/pk-backend-test-spawn.c b/backends/test/pk-backend-test-spawn.c
index 0501e67..c907292 100644
--- a/backends/test/pk-backend-test-spawn.c
+++ b/backends/test/pk-backend-test-spawn.c
@@ -51,7 +51,7 @@ pk_backend_search_names (PkBackend *backend, PkBitfield filters, gchar **values)
void
pk_backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "test");
}
@@ -63,6 +63,6 @@ pk_backend_initialize (PkBackend *backend)
void
pk_backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
diff --git a/backends/test/pk-backend-test-thread.c b/backends/test/pk-backend-test-thread.c
index 48d7e56..f781dae 100644
--- a/backends/test/pk-backend-test-thread.c
+++ b/backends/test/pk-backend-test-thread.c
@@ -33,7 +33,7 @@ static gboolean is_cancelled = FALSE;
void
pk_backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
}
/**
@@ -43,7 +43,7 @@ pk_backend_initialize (PkBackend *backend)
void
pk_backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
}
/**
@@ -88,7 +88,7 @@ pk_backend_search_names_thread (PkBackend *backend)
search = pk_backend_get_string (backend, "search");
filters_text = pk_filter_bitfield_to_string (filters);
- egg_debug ("started task (%p) search=%s filters=%s", backend, search, filters_text);
+ g_debug ("started task (%p) search=%s filters=%s", backend, search, filters_text);
g_free (filters_text);
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
timer = g_timer_new ();
@@ -107,7 +107,7 @@ pk_backend_search_names_thread (PkBackend *backend)
} while (percentage < 100);
g_timer_destroy (timer);
pk_backend_set_percentage (backend, 100);
- egg_debug ("exited task (%p)", backend);
+ g_debug ("exited task (%p)", backend);
pk_backend_package (backend, PK_INFO_ENUM_INSTALLED,
"glib2;2.14.0;i386;fedora", "The GLib library");
@@ -132,6 +132,6 @@ pk_backend_search_names (PkBackend *backend, PkBitfield filters, gchar **values)
void
pk_backend_cancel (PkBackend *backend)
{
- egg_debug ("cancelling %p", backend);
+ g_debug ("cancelling %p", backend);
is_cancelled = TRUE;
}
diff --git a/backends/urpmi/pk-backend-urpmi.c b/backends/urpmi/pk-backend-urpmi.c
index 387aa3b..99c31c9 100644
--- a/backends/urpmi/pk-backend-urpmi.c
+++ b/backends/urpmi/pk-backend-urpmi.c
@@ -31,7 +31,7 @@ static PkBackendSpawn *spawn;
static void
backend_initialize (PkBackend *backend)
{
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_name (spawn, "urpmi");
}
@@ -43,7 +43,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (spawn);
}
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index 90fc8f3..9410d25 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -200,7 +200,7 @@ pk_backend_transaction_start (PkBackend *backend)
pk_backend_set_status (backend, PK_STATUS_ENUM_WAITING_FOR_LOCK);
/* now wait */
- egg_debug ("Failed to lock on try %i of %i, already locked by PID %i (sleeping for %i seconds): %s\n",
+ g_debug ("Failed to lock on try %i of %i, already locked by PID %i (sleeping for %i seconds): %s\n",
i+1, YUM_BACKEND_LOCKING_RETRIES, pid, YUM_BACKEND_LOCKING_DELAY, error->message);
g_clear_error (&error);
g_usleep (YUM_BACKEND_LOCKING_DELAY * G_USEC_PER_SEC);
@@ -262,7 +262,7 @@ pk_backend_transaction_stop (PkBackend *backend)
/* try to unlock */
ret = zif_lock_set_unlocked (priv->lock, &error);
if (!ret) {
- egg_warning ("failed to unlock: %s", error->message);
+ g_warning ("failed to unlock: %s", error->message);
g_error_free (error);
goto out;
}
@@ -647,7 +647,7 @@ pk_backend_enable_media_repo (gboolean enabled)
/* find the right repo */
repo = zif_repos_get_store (priv->repos, "InstallMedia", priv->state, &error);
if (repo == NULL) {
- egg_debug ("failed to find install-media repo: %s", error->message);
+ g_debug ("failed to find install-media repo: %s", error->message);
g_error_free (error);
goto out;
}
@@ -655,11 +655,11 @@ pk_backend_enable_media_repo (gboolean enabled)
/* set the state */
ret = zif_store_remote_set_enabled (repo, enabled, &error);
if (!ret) {
- egg_debug ("failed to set enable: %s", error->message);
+ g_debug ("failed to set enable: %s", error->message);
g_error_free (error);
goto out;
}
- egg_debug ("%s InstallMedia", enabled ? "enabled" : "disabled");
+ g_debug ("%s InstallMedia", enabled ? "enabled" : "disabled");
out:
if (repo != NULL)
g_object_unref (repo);
@@ -674,7 +674,7 @@ out:
ret = g_key_file_load_from_file (keyfile, PACKAGE_MEDIA_REPO_FILENAME,
G_KEY_FILE_KEEP_COMMENTS, &error);
if (!ret) {
- egg_debug ("failed to open %s", error->message);
+ g_debug ("failed to open %s", error->message);
g_error_free (error);
goto out;
}
@@ -683,7 +683,7 @@ out:
g_key_file_set_integer (keyfile, "InstallMedia", "enabled", enabled);
data = g_key_file_to_data (keyfile, NULL, &error);
if (data == NULL) {
- egg_warning ("failed to get data: %s", error->message);
+ g_warning ("failed to get data: %s", error->message);
g_error_free (error);
goto out;
}
@@ -691,11 +691,11 @@ out:
/* save */
ret = g_file_set_contents (PACKAGE_MEDIA_REPO_FILENAME, data, -1, &error);
if (!ret) {
- egg_warning ("failed to save %s", error->message);
+ g_warning ("failed to save %s", error->message);
g_error_free (error);
goto out;
}
- egg_debug ("%s InstallMedia", enabled ? "enabled" : "disabled");
+ g_debug ("%s InstallMedia", enabled ? "enabled" : "disabled");
out:
g_free (data);
g_key_file_free (keyfile);
@@ -725,14 +725,14 @@ pk_backend_mount_add (GMount *mount, gpointer user_data)
/* media.repo exists */
ret = g_file_query_exists (repo, NULL);
- egg_debug ("checking for %s: %s", repo_path, ret ? "yes" : "no");
+ g_debug ("checking for %s: %s", repo_path, ret ? "yes" : "no");
if (!ret)
goto out;
/* copy to the system repo dir */
ret = g_file_copy (repo, dest, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &error);
if (!ret) {
- egg_warning ("failed to copy: %s", error->message);
+ g_warning ("failed to copy: %s", error->message);
g_error_free (error);
}
out:
@@ -792,7 +792,7 @@ pk_backend_initialize (PkBackend *backend)
g_signal_connect (backend, "status-changed",
G_CALLBACK (pk_backend_status_changed_cb), NULL);
- egg_debug ("backend: initialize");
+ g_debug ("backend: initialize");
priv->spawn = pk_backend_spawn_new ();
pk_backend_spawn_set_filter_stderr (priv->spawn, pk_backend_stderr_cb);
pk_backend_spawn_set_filter_stdout (priv->spawn, pk_backend_stdout_cb);
@@ -812,14 +812,14 @@ pk_backend_initialize (PkBackend *backend)
if (priv->monitor != NULL) {
g_signal_connect (priv->monitor, "changed", G_CALLBACK (pk_backend_yum_repos_changed_cb), backend);
} else {
- egg_warning ("failed to setup monitor: %s", error->message);
+ g_warning ("failed to setup monitor: %s", error->message);
g_error_free (error);
}
/* read the config file */
key_file = g_key_file_new ();
config_file = g_build_filename (SYSCONFDIR, "PackageKit", "Yum.conf", NULL);
- egg_debug ("loading configuration from %s", config_file);
+ g_debug ("loading configuration from %s", config_file);
ret = g_key_file_load_from_file (key_file, config_file, G_KEY_FILE_NONE, &error);
if (!ret) {
pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR, "failed to load Yum.conf: %s", error->message);
@@ -833,9 +833,9 @@ pk_backend_initialize (PkBackend *backend)
if (use_zif != NULL) {
priv->use_zif = pk_role_bitfield_from_string (use_zif);
if (priv->use_zif == 0)
- egg_warning ("failed to parse UseZif '%s'", use_zif);
+ g_warning ("failed to parse UseZif '%s'", use_zif);
}
- egg_debug ("UseZif=%s (%i)", use_zif, (gint)priv->use_zif);
+ g_debug ("UseZif=%s (%i)", use_zif, (gint)priv->use_zif);
/* use a timer for profiling */
priv->timer = g_timer_new ();
@@ -920,7 +920,7 @@ out:
void
pk_backend_destroy (PkBackend *backend)
{
- egg_debug ("backend: destroy");
+ g_debug ("backend: destroy");
g_object_unref (priv->spawn);
if (priv->monitor != NULL)
g_object_unref (priv->monitor);
@@ -1532,7 +1532,7 @@ pk_backend_get_details_thread (PkBackend *backend)
/* not being in a group is non-fatal */
if (group_str == NULL) {
- egg_warning ("failed to get group: %s", error->message);
+ g_warning ("failed to get group: %s", error->message);
g_clear_error (&error);
}
group = pk_group_enum_from_text (group_str);
@@ -1683,7 +1683,7 @@ pk_backend_get_distro_upgrades_thread (PkBackend *backend)
if (!g_key_file_get_boolean (file, groups[i], "stable", NULL))
goto out;
version = g_key_file_get_integer (file, groups[i], "version", NULL);
- egg_debug ("%s is update to version %i", groups[i], version);
+ g_debug ("%s is update to version %i", groups[i], version);
if (version > last_version) {
newest = i;
last_version = version;
@@ -1951,7 +1951,7 @@ pk_backend_get_updates_thread (PkBackend *backend)
g_error_free (error);
goto out;
}
- egg_debug ("searching for updates with %i packages", packages->len);
+ g_debug ("searching for updates with %i packages", packages->len);
/* this section done */
ret = zif_state_done (priv->state, &error);
@@ -2014,7 +2014,7 @@ pk_backend_get_updates_thread (PkBackend *backend)
update = zif_package_get_update_detail (package, state_loop, &error);
if (update == NULL) {
- egg_debug ("failed to get updateinfo for %s", zif_package_get_id (package));
+ g_debug ("failed to get updateinfo for %s", zif_package_get_id (package));
g_clear_error (&error);
ret = zif_state_finished (state_loop, NULL);
} else {
@@ -2185,7 +2185,7 @@ pk_backend_get_update_detail_thread (PkBackend *backend)
state_local = zif_state_get_child (priv->state);
update = zif_package_get_update_detail (package, state_local, &error);
if (update == NULL) {
- egg_debug ("failed to get updateinfo for %s", zif_package_get_id (package));
+ g_debug ("failed to get updateinfo for %s", zif_package_get_id (package));
g_clear_error (&error);
} else {
gchar *changelog_text = NULL;
@@ -2375,7 +2375,7 @@ pk_backend_refresh_cache_thread (PkBackend *backend)
/* don't nuke the metadata */
if (!force) {
- egg_debug ("not supported yet");
+ g_debug ("not supported yet");
goto out;
}
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index c59f079..d73be34 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -24,7 +24,6 @@
#include <pk-backend.h>
#include <pk-backend-spawn.h>
#include <unistd.h>
-#include <egg-debug.h>
#include <string>
#include <set>
#include <glib/gi18n.h>
@@ -85,7 +84,7 @@ backend_initialize (PkBackend *backend)
{
zypp_logging ();
// disabled get_zypp() - too slow for a dbus timeout after zypper clean -a
- egg_debug ("zypp_backend_initialize");
+ g_debug ("zypp_backend_initialize");
EventDirector *eventDirector = new EventDirector (backend);
_eventDirectors [backend] = eventDirector;
std::vector<std::string> *signature = new std::vector<std::string> ();
@@ -100,7 +99,7 @@ backend_initialize (PkBackend *backend)
static void
backend_destroy (PkBackend *backend)
{
- egg_debug ("zypp_backend_destroy");
+ g_debug ("zypp_backend_destroy");
delete (_eventDirectors [backend]);
_eventDirectors.erase (backend);
@@ -180,7 +179,7 @@ backend_get_requires_thread (PkBackend *backend)
if (!solver.resolvePool ()) {
std::list<zypp::ResolverProblem_Ptr> problems = solver.problems ();
for (std::list<zypp::ResolverProblem_Ptr>::iterator it = problems.begin (); it != problems.end (); it++){
- egg_warning("Solver problem (This should never happen): '%s'", (*it)->description ().c_str ());
+ g_warning("Solver problem (This should never happen): '%s'", (*it)->description ().c_str ());
}
return zypp_backend_finished_error (
backend, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED,
@@ -288,7 +287,7 @@ backend_get_depends_thread (PkBackend *backend)
zypp::ZYpp::Ptr zypp;
zypp = get_zypp (backend);
- egg_debug ("get_depends with filter '%s'", pk_filter_bitfield_to_string (_filters));
+ g_debug ("get_depends with filter '%s'", pk_filter_bitfield_to_string (_filters));
try
{
@@ -343,10 +342,10 @@ backend_get_depends_thread (PkBackend *backend)
std::vector<std::string> pkg_names;
for (zypp::Capabilities::const_iterator cap = req.begin (); cap != req.end (); ++cap) {
- egg_debug ("get_depends - capability '%s'", cap->asString().c_str());
+ g_debug ("get_depends - capability '%s'", cap->asString().c_str());
if (caps.find (cap->asString ()) != caps.end()) {
- egg_debug ("Interesting ! already have capability '%s'", cap->asString().c_str());
+ g_debug ("Interesting ! already have capability '%s'", cap->asString().c_str());
continue;
}
@@ -358,13 +357,12 @@ backend_get_depends_thread (PkBackend *backend)
for (zypp::sat::WhatProvides::const_iterator provider = prov_list.begin ();
provider != prov_list.end (); provider++) {
- egg_debug ("provider: '%s'", provider->asString().c_str());
+ g_debug ("provider: '%s'", provider->asString().c_str());
// filter out caps like "rpmlib(PayloadFilesHavePrefix) <= 4.0-1" (bnc#372429)
if (zypp_is_no_solvable (*provider))
continue;
-
// Is this capability provided by a package we already have listed ?
if (std::find (pkg_names.begin (), pkg_names.end(),
provider->name ()) != pkg_names.end()) {
@@ -407,7 +405,7 @@ backend_get_depends_thread (PkBackend *backend)
zypp::PoolItem item = zypp::ResPool::instance ().find (it->second);
PkInfoEnum info = it->second.isSystem () ? PK_INFO_ENUM_INSTALLED : PK_INFO_ENUM_AVAILABLE;
- egg_debug ("add dep - '%s' '%s' %d [%s]", it->second.name().c_str(),
+ g_debug ("add dep - '%s' '%s' %d [%s]", it->second.name().c_str(),
info == PK_INFO_ENUM_INSTALLED ? "installed" : "available",
it->second.isSystem(),
zypp_filter_solvable (_filters, it->second) ? "don't add" : "add" );
@@ -620,7 +618,7 @@ check_for_self_update (PkBackend *backend, std::set<zypp::PoolItem> *candidates)
zypp::ResObject::constPtr res = ci->resolvable();
if (zypp::isKind<zypp::Patch>(res)) {
zypp::Patch::constPtr patch = zypp::asKind<zypp::Patch>(res);
- //egg_debug ("restart_suggested is %d",(int)patch->restartSuggested());
+ //g_debug ("restart_suggested is %d",(int)patch->restartSuggested());
if (patch->restartSuggested ()) {
if (!strcmp (PACKAGEKIT_RPM_NAME, res->satSolvable ().name ().c_str ()) ||
!strcmp (GNOME_PACKAGKEKIT_RPM_NAME, res->satSolvable ().name ().c_str ())) {
@@ -1023,7 +1021,7 @@ backend_install_packages_thread (PkBackend *backend)
for (zypp::ResPool::byName_iterator it = pool.byNameBegin (name);
it != pool.byNameEnd (name); it++) {
- egg_debug ("PoolItem '%s'", it->satSolvable().asString().c_str());
+ g_debug ("PoolItem '%s'", it->satSolvable().asString().c_str());
if (!it->satSolvable().isSystem())
continue;
@@ -1631,7 +1629,7 @@ backend_update_packages_thread (PkBackend *backend)
delete zypp_get_updates (backend); // make sure _updating_self is set
if (_updating_self) {
- egg_debug ("updating self and setting restart");
+ g_debug ("updating self and setting restart");
restart = PK_RESTART_ENUM_SESSION;
_updating_self = FALSE;
}
@@ -1822,7 +1820,7 @@ backend_what_provides_thread (PkBackend *backend)
if (!solver.resolvePool ()) {
std::list<zypp::ResolverProblem_Ptr> problems = solver.problems ();
for (std::list<zypp::ResolverProblem_Ptr>::iterator it = problems.begin (); it != problems.end (); it++){
- egg_warning("Solver problem (This should never happen): '%s'", (*it)->description ().c_str ());
+ g_warning("Solver problem (This should never happen): '%s'", (*it)->description ().c_str ());
}
solver.setIgnoreAlreadyRecommended (FALSE);
return zypp_backend_finished_error (
diff --git a/backends/zypp/zypp-events.h b/backends/zypp/zypp-events.h
index 4f76bbb..5aa99ae 100644
--- a/backends/zypp/zypp-events.h
+++ b/backends/zypp/zypp-events.h
@@ -180,7 +180,7 @@ struct InstallResolvableReportReceiver : public zypp::callback::ReceiveReport<zy
clear_package_id ();
_package_id = zypp_build_package_id_from_resolvable (resolvable->satSolvable ());
gchar* summary = g_strdup(resolvable->satSolvable ().lookupStrAttribute (zypp::sat::SolvAttr::summary).c_str ());
- //egg_debug ("InstallResolvableReportReceiver::start(): %s", _package_id == NULL ? "unknown" : _package_id);
+ //g_debug ("InstallResolvableReportReceiver::start(): %s", _package_id == NULL ? "unknown" : _package_id);
if (_package_id != NULL) {
pk_backend_set_status (_backend, PK_STATUS_ENUM_INSTALL);
pk_backend_package (_backend, PK_INFO_ENUM_INSTALLING, _package_id, summary);
@@ -191,7 +191,7 @@ struct InstallResolvableReportReceiver : public zypp::callback::ReceiveReport<zy
virtual bool progress (int value, zypp::Resolvable::constPtr resolvable)
{
- //egg_debug ("InstallResolvableReportReceiver::progress(), %s:%d", _package_id == NULL ? "unknown" : _package_id, value);
+ //g_debug ("InstallResolvableReportReceiver::progress(), %s:%d", _package_id == NULL ? "unknown" : _package_id, value);
if (_package_id != NULL)
update_sub_percentage (value);
return true;
@@ -199,13 +199,13 @@ struct InstallResolvableReportReceiver : public zypp::callback::ReceiveReport<zy
virtual Action problem (zypp::Resolvable::constPtr resolvable, Error error, const std::string &description, RpmLevel level)
{
- //egg_debug ("InstallResolvableReportReceiver::problem()");
+ //g_debug ("InstallResolvableReportReceiver::problem()");
return ABORT;
}
virtual void finish (zypp::Resolvable::constPtr resolvable, Error error, const std::string &reason, RpmLevel level)
{
- //egg_debug ("InstallResolvableReportReceiver::finish(): %s", _package_id == NULL ? "unknown" : _package_id);
+ //g_debug ("InstallResolvableReportReceiver::finish(): %s", _package_id == NULL ? "unknown" : _package_id);
if (_package_id != NULL) {
//pk_backend_package (_backend, PK_INFO_ENUM_INSTALLED, _package_id, "TODO: Put the package summary here if possible");
clear_package_id ();
@@ -254,7 +254,7 @@ struct RepoProgressReportReceiver : public zypp::callback::ReceiveReport<zypp::P
{
virtual void start (const zypp::ProgressData &data)
{
- egg_debug ("_____________- RepoProgressReportReceiver::start()___________________");
+ g_debug ("_____________- RepoProgressReportReceiver::start()___________________");
reset_sub_percentage ();
}
@@ -275,7 +275,7 @@ struct RepoReportReceiver : public zypp::callback::ReceiveReport<zypp::repo::Rep
{
virtual void start (const zypp::ProgressData &data, const zypp::RepoInfo)
{
- egg_debug ("______________________ RepoReportReceiver::start()________________________");
+ g_debug ("______________________ RepoReportReceiver::start()________________________");
reset_sub_percentage ();
}
@@ -299,7 +299,7 @@ struct DownloadProgressReportReceiver : public zypp::callback::ReceiveReport<zyp
clear_package_id ();
_package_id = build_package_id_from_url (&file);
- //egg_debug ("DownloadProgressReportReceiver::start():%s --%s\n",
+ //g_debug ("DownloadProgressReportReceiver::start():%s --%s\n",
// g_strdup (file.asString().c_str()), g_strdup (localfile.asString().c_str()) );
if (_package_id != NULL) {
gchar* summary = g_strdup (file.asString().c_str());
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index 2fd39a2..e360dc5 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -100,7 +100,7 @@ get_zypp (PkBackend *backend)
initialized = TRUE;
}
} catch (const zypp::Exception &ex) {
- egg_error ("%s", ex.asUserString ().c_str ());
+ g_error ("%s", ex.asUserString ().c_str ());
}
return zypp;
@@ -178,7 +178,7 @@ zypp_build_pool (PkBackend *backend, gboolean include_local)
continue;
// skip not cached repos
if (manager.isCached (repo) == false) {
- egg_warning ("%s is not cached! Do a refresh", repo.alias ().c_str ());
+ g_warning ("%s is not cached! Do a refresh", repo.alias ().c_str ());
continue;
}
//FIXME see above, skip already cached repos
@@ -186,11 +186,11 @@ zypp_build_pool (PkBackend *backend, gboolean include_local)
manager.loadFromCache (repo);
}
} catch (const zypp::repo::RepoNoAliasException &ex) {
- egg_error ("Can't figure an alias to look in cache");
+ g_error ("Can't figure an alias to look in cache");
} catch (const zypp::repo::RepoNotCachedException &ex) {
- egg_error ("The repo has to be cached at first: %s", ex.asUserString ().c_str ());
+ g_error ("The repo has to be cached at first: %s", ex.asUserString ().c_str ());
} catch (const zypp::Exception &ex) {
- egg_error ("TODO: Handle exceptions: %s", ex.asUserString ().c_str ());
+ g_error ("TODO: Handle exceptions: %s", ex.asUserString ().c_str ());
}
return zypp->pool ();
@@ -242,7 +242,7 @@ zypp_build_local_pool (PkBackend *backend)
}
} catch (const zypp::Exception &ex) {
- egg_error ("%s", ex.asUserString ().c_str ());
+ g_error ("%s", ex.asUserString ().c_str ());
}
return zypp->pool ();
@@ -915,7 +915,7 @@ zypp_perform_execution (PkBackend *backend, PerformType type, gboolean force)
if (simulate) {
ret = TRUE;
- egg_debug ("simulating");
+ g_debug ("simulating");
for (zypp::ResPool::const_iterator it = pool.begin (); it != pool.end (); it++) {
if (!zypp_backend_pool_item_notify (backend, *it, TRUE))
diff --git a/client/Makefile.am b/client/Makefile.am
index f3de665..e6491c0 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -42,6 +42,8 @@ INCLUDES = \
-DPK_DATA=\"$(pkgdatadir)\" \
-DPK_DB_DIR=\""$(PK_DB_DIR)"\" \
-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
+ -DPK_COMPILATION \
+ -DG_LOG_DOMAIN=\"PackageKit\" \
-I$(top_srcdir)/lib \
$(NULL)
@@ -57,8 +59,6 @@ PK_GLIB2_LIBS = \
$(NULL)
pkcon_SOURCES = \
- egg-debug.c \
- egg-debug.h \
pk-console.c \
$(NULL)
@@ -74,8 +74,6 @@ pkcon_CFLAGS = \
$(NULL)
pkmon_SOURCES = \
- egg-debug.c \
- egg-debug.h \
pk-monitor.c \
$(NULL)
diff --git a/client/egg-debug.c b/client/egg-debug.c
deleted file mode 120000
index 0a3eb62..0000000
--- a/client/egg-debug.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/egg-debug.c
\ No newline at end of file
diff --git a/client/egg-debug.h b/client/egg-debug.h
deleted file mode 120000
index db811d2..0000000
--- a/client/egg-debug.h
+++ /dev/null
@@ -1 +0,0 @@
-../src/egg-debug.h
\ No newline at end of file
diff --git a/client/pk-console.c b/client/pk-console.c
index 0ad3190..992658e 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -33,8 +33,6 @@
#include <pwd.h>
#include <locale.h>
-#include "egg-debug.h"
-
#define PK_EXIT_CODE_SYNTAX_INVALID 3
#define PK_EXIT_CODE_FILE_NOT_FOUND 4
#define PK_EXIT_CODE_NOTHING_USEFUL 5
@@ -1129,7 +1127,7 @@ pk_console_notify_connected_cb (PkControl *control_, GParamSpec *pspec, gpointer
static void
pk_console_sigint_cb (int sig)
{
- egg_debug ("Handling SIGINT");
+ g_debug ("Handling SIGINT");
/* restore default ASAP, as the cancels might hang */
signal (SIGINT, SIG_DFL);
@@ -1138,7 +1136,7 @@ pk_console_sigint_cb (int sig)
g_cancellable_cancel (cancellable);
/* kill ourselves */
- egg_debug ("Retrying SIGINT");
+ g_debug ("Retrying SIGINT");
kill (getpid (), SIGINT);
}
@@ -1332,7 +1330,7 @@ main (int argc, char *argv[])
context = g_option_context_new ("PackageKit Console Program");
g_option_context_set_summary (context, summary) ;
g_option_context_add_main_entries (context, options, NULL);
- g_option_context_add_group (context, egg_debug_get_option_group ());
+ g_option_context_add_group (context, pk_debug_get_option_group ());
g_option_context_parse (context, &argc, &argv, NULL);
/* Save the usage string in case command parsing fails. */
options_help = g_option_context_get_help (context, TRUE, NULL);
@@ -1404,7 +1402,7 @@ main (int argc, char *argv[])
goto out;
}
}
- egg_debug ("filter=%s, filters=%" PK_BITFIELD_FORMAT, filter, filters);
+ g_debug ("filter=%s, filters=%" PK_BITFIELD_FORMAT, filter, filters);
mode = argv[1];
if (argc > 2)
@@ -1494,7 +1492,6 @@ main (int argc, char *argv[])
(PkProgressCallback) pk_console_progress_cb, NULL,
(GAsyncReadyCallback) pk_console_finished_cb, NULL);
-
} else if (strcmp (mode, "install-sig") == 0) {
if (value == NULL || details == NULL || parameter == NULL) {
/* TRANSLATORS: geeky error, 99.9999% of users won't see this */
@@ -1644,7 +1641,6 @@ main (int argc, char *argv[])
(PkProgressCallback) pk_console_progress_cb, NULL,
(GAsyncReadyCallback) pk_console_finished_cb, NULL);
-
} else if (strcmp (mode, "get-update-detail") == 0) {
if (value == NULL) {
/* TRANSLATORS: The user did not provide a package name */
diff --git a/client/pk-generate-pack.c b/client/pk-generate-pack.c
index ae9c18e..a54c94d 100644
--- a/client/pk-generate-pack.c
+++ b/client/pk-generate-pack.c
@@ -33,8 +33,6 @@
#include <packagekit-glib2/packagekit.h>
#include <packagekit-glib2/packagekit-private.h>
-#include "egg-debug.h"
-
static PkProgressBar *progressbar = NULL;
static GCancellable *cancellable = NULL;
@@ -54,7 +52,7 @@ pk_generate_pack_get_filename (const gchar *name, const gchar *directory)
control = pk_control_new ();
ret = pk_control_get_properties (control, NULL, &error);
if (!ret) {
- egg_error ("Failed to contact PackageKit: %s", error->message);
+ g_error ("Failed to contact PackageKit: %s", error->message);
g_error_free (error);
return NULL;
}
@@ -130,7 +128,7 @@ pk_generate_pack_progress_cb (PkProgress *progress, PkProgressType type, gpointe
static void
pk_generate_pack_sigint_cb (int sig)
{
- egg_debug ("Handling SIGINT");
+ g_debug ("Handling SIGINT");
/* restore default */
signal (SIGINT, SIG_DFL);
@@ -139,7 +137,7 @@ pk_generate_pack_sigint_cb (int sig)
g_cancellable_cancel (cancellable);
/* kill ourselves */
- egg_debug ("Retrying SIGINT");
+ g_debug ("Retrying SIGINT");
kill (getpid (), SIGINT);
}
@@ -281,7 +279,7 @@ main (int argc, char *argv[])
context = g_option_context_new ("PackageKit Pack Generator");
g_option_context_add_main_entries (context, options, NULL);
- g_option_context_add_group (context, egg_debug_get_option_group ());
+ g_option_context_add_group (context, pk_debug_get_option_group ());
g_option_context_parse (context, &argc, &argv, NULL);
/* Save the usage string in case command parsing fails. */
options_help = g_option_context_get_help (context, TRUE, NULL);
diff --git a/client/pk-monitor.c b/client/pk-monitor.c
index 6763eef..8be6c3b 100644
--- a/client/pk-monitor.c
+++ b/client/pk-monitor.c
@@ -28,8 +28,6 @@
#include <packagekit-glib2/packagekit.h>
#include <dbus/dbus-glib.h>
-#include "egg-debug.h"
-
static PkClient *client = NULL;
/**
@@ -143,7 +141,7 @@ pk_monitor_adopt_cb (PkClient *_client, GAsyncResult *res, gpointer user_data)
/* get the results */
results = pk_client_generic_finish (client, res, &error);
if (results == NULL) {
- egg_warning ("failed to adopt: %s", error->message);
+ g_warning ("failed to adopt: %s", error->message);
g_error_free (error);
goto out;
}
@@ -309,7 +307,7 @@ static void
pk_monitor_transaction_list_changed_cb (PkControl *control, gchar **transaction_ids, gpointer user_data)
{
/* only print state when verbose */
- if (egg_debug_is_verbose ())
+ if (pk_debug_is_verbose ())
pk_monitor_get_daemon_state (control);
}
@@ -319,7 +317,7 @@ pk_monitor_transaction_list_changed_cb (PkControl *control, gchar **transaction_
static void
pk_monitor_transaction_list_added_cb (PkTransactionList *tlist, const gchar *transaction_id, gpointer user_data)
{
- egg_debug ("added: %s", transaction_id);
+ g_debug ("added: %s", transaction_id);
pk_client_adopt_async (client, transaction_id, NULL,
(PkProgressCallback) pk_monitor_progress_cb, user_data,
(GAsyncReadyCallback) pk_monitor_adopt_cb, user_data);
@@ -332,7 +330,7 @@ pk_monitor_transaction_list_added_cb (PkTransactionList *tlist, const gchar *tra
static void
pk_monitor_transaction_list_removed_cb (PkTransactionList *tlist, const gchar *transaction_id, gpointer data)
{
- egg_debug ("removed: %s", transaction_id);
+ g_debug ("removed: %s", transaction_id);
pk_monitor_list_print (tlist);
}
@@ -388,7 +386,7 @@ main (int argc, char *argv[])
/* TRANSLATORS: this is a program that monitors PackageKit */
g_option_context_set_summary (context, _("PackageKit Monitor"));
g_option_context_add_main_entries (context, options, NULL);
- g_option_context_add_group (context, egg_debug_get_option_group ());
+ g_option_context_add_group (context, pk_debug_get_option_group ());
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
@@ -426,13 +424,13 @@ main (int argc, char *argv[])
/* coldplug, but shouldn't be needed yet */
transaction_ids = pk_transaction_list_get_ids (tlist);
for (i=0; transaction_ids[i] != NULL; i++) {
- egg_warning ("need to coldplug %s", transaction_ids[i]);
+ g_warning ("need to coldplug %s", transaction_ids[i]);
}
g_strfreev (transaction_ids);
pk_monitor_list_print (tlist);
/* only print state when verbose */
- if (egg_debug_is_verbose ())
+ if (pk_debug_is_verbose ())
pk_monitor_get_daemon_state (control);
/* spin */
diff --git a/contrib/command-not-found/Makefile.am b/contrib/command-not-found/Makefile.am
index 5254a8b..da29378 100644
--- a/contrib/command-not-found/Makefile.am
+++ b/contrib/command-not-found/Makefile.am
@@ -6,6 +6,7 @@ INCLUDES = \
$(DBUS_CFLAGS) \
$(SQLITE_CFLAGS) \
-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
+ -DPK_COMPILATION \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-I$(top_srcdir)/lib
@@ -18,8 +19,6 @@ PK_GLIB2_LIBS = \
$(NULL)
pk_command_not_found_SOURCES = \
- egg-debug.c \
- egg-debug.h \
egg-string.c \
egg-string.h \
pk-command-not-found.c \
diff --git a/contrib/command-not-found/egg-debug.c b/contrib/command-not-found/egg-debug.c
deleted file mode 120000
index 98fd102..0000000
--- a/contrib/command-not-found/egg-debug.c
+++ /dev/null
@@ -1 +0,0 @@
-../../src/egg-debug.c
\ No newline at end of file
diff --git a/contrib/command-not-found/egg-debug.h b/contrib/command-not-found/egg-debug.h
deleted file mode 120000
index 13de545..0000000
--- a/contrib/command-not-found/egg-debug.h
+++ /dev/null
@@ -1 +0,0 @@
-../../src/egg-debug.h
\ No newline at end of file
diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index ab68b2f..4d3aab7 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -32,7 +32,6 @@
#include <packagekit-glib2/packagekit.h>
#include <packagekit-glib2/packagekit-private.h>
-#include "egg-debug.h"
#include "egg-string.h"
#define PK_MAX_PATH_LEN 1023
@@ -394,7 +393,7 @@ pk_cnf_progress_cb (PkProgress *progress, PkProgressType type, gpointer data)
static gboolean
pk_cnf_cancel_cb (GCancellable *_cancellable)
{
- egg_warning ("Cancelling request");
+ g_warning ("Cancelling request");
g_cancellable_cancel (cancellable);
return FALSE;
}
@@ -451,7 +450,7 @@ pk_cnf_find_available (const gchar *cmd, guint max_search_time)
error_code = pk_results_get_error_code (results);
if (error_code != NULL) {
if (pk_error_get_code (error_code) == PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
- egg_debug ("The search was cancelled as it was taking too long");
+ g_debug ("The search was cancelled as it was taking too long");
} else {
/* TRANSLATORS: the transaction failed in a way we could not expect */
g_printerr ("%s: %s, %s\n", _("Getting the list of files failed"),
@@ -511,7 +510,7 @@ pk_cnf_get_policy_from_file (GKeyFile *file, const gchar *key)
/* get from file */
policy_text = g_key_file_get_string (file, "CommandNotFound", key, &error);
if (policy_text == NULL) {
- egg_warning ("failed to get key %s: %s", key, error->message);
+ g_warning ("failed to get key %s: %s", key, error->message);
g_error_free (error);
}
@@ -550,7 +549,7 @@ pk_cnf_get_config (void)
path = g_build_filename (SYSCONFDIR, "PackageKit", "CommandNotFound.conf", NULL);
ret = g_key_file_load_from_file (file, path, G_KEY_FILE_NONE, &error);
if (!ret) {
- egg_warning ("failed to open policy: %s", error->message);
+ g_warning ("failed to open policy: %s", error->message);
g_error_free (error);
goto out;
}
@@ -567,11 +566,11 @@ pk_cnf_get_config (void)
/* fallback */
if (config->locations == NULL) {
- egg_warning ("not found SearchLocations, using fallback");
+ g_warning ("not found SearchLocations, using fallback");
config->locations = g_strsplit ("/usr/bin;/usr/sbin", ";", -1);
}
if (config->max_search_time == 0) {
- egg_warning ("not found MaxSearchTime, using fallback");
+ g_warning ("not found MaxSearchTime, using fallback");
config->max_search_time = 2000;
}
out:
@@ -657,7 +656,7 @@ out:
static void
pk_cnf_sigint_handler (int sig)
{
- egg_debug ("Handling SIGINT");
+ g_debug ("Handling SIGINT");
/* restore default ASAP, as the cancel might hang */
signal (SIGINT, SIG_DFL);
@@ -666,7 +665,7 @@ pk_cnf_sigint_handler (int sig)
g_cancellable_cancel (cancellable);
/* kill ourselves */
- egg_debug ("Retrying SIGINT");
+ g_debug ("Retrying SIGINT");
kill (getpid (), SIGINT);
}
@@ -706,7 +705,7 @@ main (int argc, char *argv[])
/* TRANSLATORS: tool that gets called when the command is not found */
g_option_context_set_summary (context, _("PackageKit Command Not Found"));
g_option_context_add_main_entries (context, options, NULL);
- g_option_context_add_group (context, egg_debug_get_option_group ());
+ g_option_context_add_group (context, pk_debug_get_option_group ());
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
diff --git a/contrib/debuginfo-install/Makefile.am b/contrib/debuginfo-install/Makefile.am
index de22734..c4b3a9f 100644
--- a/contrib/debuginfo-install/Makefile.am
+++ b/contrib/debuginfo-install/Makefile.am
@@ -20,6 +20,7 @@ INCLUDES = \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
$(SQLITE_CFLAGS) \
+ -DPK_COMPILATION \
-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
@@ -33,8 +34,6 @@ PK_GLIB2_LIBS = \
$(NULL)
pk_debuginfo_install_SOURCES = \
- egg-debug.c \
- egg-debug.h \
pk-debuginfo-install.c \
$(NULL)
diff --git a/contrib/debuginfo-install/egg-debug.c b/contrib/debuginfo-install/egg-debug.c
deleted file mode 120000
index 98fd102..0000000
--- a/contrib/debuginfo-install/egg-debug.c
+++ /dev/null
@@ -1 +0,0 @@
-../../src/egg-debug.c
\ No newline at end of file
diff --git a/contrib/debuginfo-install/egg-debug.h b/contrib/debuginfo-install/egg-debug.h
deleted file mode 120000
index 13de545..0000000
--- a/contrib/debuginfo-install/egg-debug.h
+++ /dev/null
@@ -1 +0,0 @@
-../../src/egg-debug.h
\ No newline at end of file
diff --git a/contrib/debuginfo-install/pk-debuginfo-install.c b/contrib/debuginfo-install/pk-debuginfo-install.c
index 8e2e41a..bad3d4a 100644
--- a/contrib/debuginfo-install/pk-debuginfo-install.c
+++ b/contrib/debuginfo-install/pk-debuginfo-install.c
@@ -29,8 +29,6 @@
#include <packagekit-glib2/packagekit.h>
#include <packagekit-glib2/packagekit-private.h>
-#include "egg-debug.h"
-
/* Reserved exit codes:
* 1 miscellaneous errors, such as "divide by zero"
* 2 misuse of shell builtins
@@ -146,7 +144,7 @@ pk_debuginfo_install_enable_repos (PkDebuginfoInstallPrivate *priv, GPtrArray *a
goto out;
}
- egg_debug ("setting %s: %i", repo_id, enable);
+ g_debug ("setting %s: %i", repo_id, enable);
g_object_unref (results);
}
out:
@@ -171,7 +169,7 @@ pk_debuginfo_install_progress_cb (PkProgress *progress, PkProgressType type, PkD
}
if (type == PK_PROGRESS_TYPE_PACKAGE_ID) {
g_object_get (progress, "package-id", &package_id, NULL);
- egg_debug ("now downloading %s", package_id);
+ g_debug ("now downloading %s", package_id);
goto out;
}
out:
@@ -402,7 +400,7 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
g_strfreev (split);
/* resolve name */
- egg_debug ("resolving: %s", name_debuginfo);
+ g_debug ("resolving: %s", name_debuginfo);
package_id = pk_debuginfo_install_resolve_name_to_id (priv, name_debuginfo, &error_local);
if (package_id == NULL) {
/* TRANSLATORS: we couldn't find the package name, non-fatal */
@@ -415,7 +413,7 @@ pk_debuginfo_install_add_deps (PkDebuginfoInstallPrivate *priv, GPtrArray *packa
/* add to array to install */
if (package_id != NULL && !g_str_has_suffix (package_id, "installed")) {
- egg_debug ("going to try to install (for deps): %s", package_id);
+ g_debug ("going to try to install (for deps): %s", package_id);
g_ptr_array_add (packages_results, g_strdup (package_id));
}
@@ -541,7 +539,7 @@ main (int argc, char *argv[])
/* TRANSLATORS: tool that gets called when the command is not found */
g_option_context_set_summary (context, _("PackageKit Debuginfo Installer"));
g_option_context_add_main_entries (context, options, NULL);
- g_option_context_add_group (context, egg_debug_get_option_group ());
+ g_option_context_add_group (context, pk_debug_get_option_group ());
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
@@ -634,7 +632,7 @@ main (int argc, char *argv[])
/* is already a -debuginfo */
repo_id = g_ptr_array_index (priv->enabled, i);
if (g_str_has_suffix (repo_id, "-debuginfo")) {
- egg_debug ("already enabled: %s", repo_id);
+ g_debug ("already enabled: %s", repo_id);
continue;
}
@@ -645,7 +643,7 @@ main (int argc, char *argv[])
/* add to list to change back at the end */
g_ptr_array_add (added_repos, g_strdup (repo_id_debuginfo));
} else {
- egg_debug ("no debuginfo repo for %s", repo_id_debuginfo);
+ g_debug ("no debuginfo repo for %s", repo_id_debuginfo);
}
g_free (repo_id_debuginfo);
@@ -720,7 +718,7 @@ main (int argc, char *argv[])
/* add to array to install */
if (package_id != NULL) {
- egg_debug ("going to try to install: %s", package_id);
+ g_debug ("going to try to install: %s", package_id);
g_ptr_array_add (package_ids_recognised, package_id);
} else {
goto not_found;
@@ -728,7 +726,7 @@ main (int argc, char *argv[])
/* convert into basename */
name_debuginfo = pk_debuginfo_install_name_to_debuginfo (name);
- egg_debug ("install %s [%s]", argv[i], name_debuginfo);
+ g_debug ("install %s [%s]", argv[i], name_debuginfo);
/* resolve name */
package_id = pk_debuginfo_install_resolve_name_to_id (priv, name_debuginfo, &error);
@@ -743,7 +741,7 @@ main (int argc, char *argv[])
/* add to array to install */
if (package_id != NULL && !g_str_has_suffix (package_id, "installed")) {
- egg_debug ("going to try to install: %s", package_id);
+ g_debug ("going to try to install: %s", package_id);
g_ptr_array_add (package_ids_to_install, g_strdup (package_id));
}
diff --git a/docs/api/PackageKit-docs.sgml b/docs/api/PackageKit-docs.sgml
index a3e684d..021156e 100644
--- a/docs/api/PackageKit-docs.sgml
+++ b/docs/api/PackageKit-docs.sgml
@@ -96,7 +96,6 @@
This part documents helper funtions in libpackagekit.
</para>
</partintro>
- <xi:include href="xml/egg-debug.xml"/>
<xi:include href="xml/pk-bitfield.xml"/>
<xi:include href="xml/pk-client-sync.xml"/>
<xi:include href="xml/pk-common.xml"/>
diff --git a/lib/packagekit-glib2/Makefile.am b/lib/packagekit-glib2/Makefile.am
index cd48236..e2404c4 100644
--- a/lib/packagekit-glib2/Makefile.am
+++ b/lib/packagekit-glib2/Makefile.am
@@ -17,6 +17,7 @@ INCLUDES = \
-I. \
-DPK_COMPILATION \
-DPK_DB_DIR=\""$(PK_DB_DIR)"\" \
+ -DG_LOG_DOMAIN=\"PackageKit\" \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DTESTDATADIR=\""$(top_srcdir)/data/tests"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
@@ -72,8 +73,6 @@ libpackagekit_glib2_include_HEADERS = \
$(NULL)
libpackagekit_glib2_la_SOURCES = \
- egg-debug.c \
- egg-debug.h \
egg-string.c \
egg-string.h \
packagekit.h \
@@ -93,6 +92,8 @@ libpackagekit_glib2_la_SOURCES = \
pk-control.h \
pk-control-sync.c \
pk-control-sync.h \
+ pk-debug.c \
+ pk-debug.h \
pk-desktop.c \
pk-desktop.h \
pk-details.c \
@@ -169,8 +170,6 @@ libpackagekit_glib2_la_CFLAGS = \
noinst_LIBRARIES = libpackagekitprivate.a
libpackagekitprivate_a_SOURCES = \
- egg-debug.c \
- egg-debug.h \
egg-string.c \
egg-string.h \
packagekit-private.h \
diff --git a/lib/packagekit-glib2/egg-debug.c b/lib/packagekit-glib2/egg-debug.c
deleted file mode 120000
index 98fd102..0000000
--- a/lib/packagekit-glib2/egg-debug.c
+++ /dev/null
@@ -1 +0,0 @@
-../../src/egg-debug.c
\ No newline at end of file
diff --git a/lib/packagekit-glib2/egg-debug.h b/lib/packagekit-glib2/egg-debug.h
deleted file mode 120000
index 13de545..0000000
--- a/lib/packagekit-glib2/egg-debug.h
+++ /dev/null
@@ -1 +0,0 @@
-../../src/egg-debug.h
\ No newline at end of file
diff --git a/lib/packagekit-glib2/packagekit.h b/lib/packagekit-glib2/packagekit.h
index 5d094f4..7548efa 100644
--- a/lib/packagekit-glib2/packagekit.h
+++ b/lib/packagekit-glib2/packagekit.h
@@ -61,6 +61,10 @@
#include <packagekit-glib2/pk-update-detail.h>
#include <packagekit-glib2/pk-version.h>
+#ifdef PK_COMPILATION
+#include <packagekit-glib2/pk-debug.h>
+#endif
+
#undef __PACKAGEKIT_H_INSIDE__
#endif /* __PACKAGEKIT_H__ */
diff --git a/lib/packagekit-glib2/pk-bitfield.c b/lib/packagekit-glib2/pk-bitfield.c
index b769de1..69535ac 100644
--- a/lib/packagekit-glib2/pk-bitfield.c
+++ b/lib/packagekit-glib2/pk-bitfield.c
@@ -32,8 +32,6 @@
#include <packagekit-glib2/pk-enum.h>
#include <packagekit-glib2/pk-bitfield.h>
-#include "egg-debug.h"
-
/**
* pk_bitfield_contain_priority:
* @values: a valid bitfield instance
@@ -131,7 +129,7 @@ pk_role_bitfield_to_string (PkBitfield roles)
}
/* do we have a no bitfield? \n */
if (string->len == 0) {
- egg_warning ("not valid!");
+ g_warning ("not valid!");
g_string_append (string, pk_role_enum_to_string (PK_ROLE_ENUM_UNKNOWN));
} else {
/* remove last \n */
@@ -161,7 +159,7 @@ pk_role_bitfield_from_string (const gchar *roles)
split = g_strsplit (roles, ";", 0);
if (split == NULL) {
- egg_warning ("unable to split");
+ g_warning ("unable to split");
goto out;
}
@@ -203,7 +201,7 @@ pk_group_bitfield_to_string (PkBitfield groups)
}
/* do we have a no bitfield? \n */
if (string->len == 0) {
- egg_warning ("not valid!");
+ g_warning ("not valid!");
g_string_append (string, pk_group_enum_to_string (PK_GROUP_ENUM_UNKNOWN));
} else {
/* remove last \n */
@@ -233,7 +231,7 @@ pk_group_bitfield_from_string (const gchar *groups)
split = g_strsplit (groups, ";", 0);
if (split == NULL) {
- egg_warning ("unable to split");
+ g_warning ("unable to split");
goto out;
}
@@ -279,7 +277,7 @@ pk_filter_bitfield_to_string (PkBitfield filters)
}
/* do we have a 'none' filter? \n */
if (string->len == 0) {
- egg_warning ("not valid!");
+ g_warning ("not valid!");
g_string_append (string, pk_filter_enum_to_string (PK_FILTER_ENUM_NONE));
} else {
/* remove last \n */
@@ -309,7 +307,7 @@ pk_filter_bitfield_from_string (const gchar *filters)
split = g_strsplit (filters, ";", 0);
if (split == NULL) {
- egg_warning ("unable to split");
+ g_warning ("unable to split");
goto out;
}
diff --git a/lib/packagekit-glib2/pk-catalog.c b/lib/packagekit-glib2/pk-catalog.c
index e9c19d9..8793977 100644
--- a/lib/packagekit-glib2/pk-catalog.c
+++ b/lib/packagekit-glib2/pk-catalog.c
@@ -45,7 +45,6 @@
#include <packagekit-glib2/pk-package-ids.h>
#include <packagekit-glib2/pk-control-sync.h>
-#include "egg-debug.h"
#include "egg-string.h"
#define PK_CATALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CATALOG, PkCatalogPrivate))
@@ -275,7 +274,7 @@ pk_catalog_what_provides_ready_cb (GObject *source_object, GAsyncResult *res, Pk
array = pk_results_get_package_array (results);
for (i=0; i<array->len; i++) {
package = g_ptr_array_index (array, i);
- egg_debug ("adding %s", pk_package_get_id (package));
+ g_debug ("adding %s", pk_package_get_id (package));
g_ptr_array_add (state->array, g_object_ref (package));
}
@@ -300,7 +299,7 @@ pk_catalog_do_what_provides (PkCatalogState *state)
gchar *dbg;
data = pk_ptr_array_to_strv (state->array_files);
dbg = g_strjoinv ("&", data);
- egg_debug ("searching for %s", dbg);
+ g_debug ("searching for %s", dbg);
pk_client_what_provides_async (state->catalog->priv->client, pk_bitfield_from_enums (PK_FILTER_ENUM_ARCH, PK_FILTER_ENUM_NEWEST, -1),
PK_PROVIDES_ENUM_ANY, data,
state->cancellable, state->progress_callback, state->progress_user_data,
@@ -344,7 +343,7 @@ pk_catalog_search_file_ready_cb (GObject *source_object, GAsyncResult *res, PkCa
array = pk_results_get_package_array (results);
for (i=0; i<array->len; i++) {
package = g_ptr_array_index (array, i);
- egg_debug ("adding %s", pk_package_get_id (package));
+ g_debug ("adding %s", pk_package_get_id (package));
g_ptr_array_add (state->array, g_object_ref (package));
}
@@ -375,7 +374,7 @@ pk_catalog_do_search_files (PkCatalogState *state)
gchar *dbg;
data = pk_ptr_array_to_strv (state->array_files);
dbg = g_strjoinv ("&", data);
- egg_debug ("searching for %s", dbg);
+ g_debug ("searching for %s", dbg);
pk_client_search_files_async (state->catalog->priv->client, pk_bitfield_from_enums (PK_FILTER_ENUM_ARCH, PK_FILTER_ENUM_NEWEST, -1),
data,
state->cancellable, state->progress_callback, state->progress_user_data,
@@ -419,7 +418,7 @@ pk_catalog_resolve_ready_cb (GObject *source_object, GAsyncResult *res, PkCatalo
array = pk_results_get_package_array (results);
for (i=0; i<array->len; i++) {
package = g_ptr_array_index (array, i);
- egg_debug ("adding %s", pk_package_get_id (package));
+ g_debug ("adding %s", pk_package_get_id (package));
g_ptr_array_add (state->array, g_object_ref (package));
}
@@ -454,7 +453,7 @@ pk_catalog_do_resolve (PkCatalogState *state)
gchar *dbg;
data = pk_ptr_array_to_strv (state->array_packages);
dbg = g_strjoinv ("&", data);
- egg_debug ("searching for %s", dbg);
+ g_debug ("searching for %s", dbg);
pk_client_resolve_async (state->catalog->priv->client,
pk_bitfield_from_enums (PK_FILTER_ENUM_ARCH,
PK_FILTER_ENUM_NOT_INSTALLED,
@@ -509,7 +508,7 @@ pk_catalog_lookup_async (PkCatalog *catalog, const gchar *filename, GCancellable
state->progress_user_data = progress_user_data;
/* load all data */
- egg_debug ("loading from %s", filename);
+ g_debug ("loading from %s", filename);
ret = g_key_file_load_from_file (state->file, filename, G_KEY_FILE_NONE, &error);
if (!ret) {
pk_catalog_lookup_state_finish (state, error);
@@ -518,15 +517,15 @@ pk_catalog_lookup_async (PkCatalog *catalog, const gchar *filename, GCancellable
}
/* parse InstallPackages */
- egg_debug ("processing InstallPackages");
+ g_debug ("processing InstallPackages");
pk_catalog_process_type (state, PK_CATALOG_MODE_PACKAGES);
/* parse InstallFiles */
- egg_debug ("processing InstallFiles");
+ g_debug ("processing InstallFiles");
pk_catalog_process_type (state, PK_CATALOG_MODE_FILES);
/* parse InstallProvides */
- egg_debug ("processing InstallProvides");
+ g_debug ("processing InstallProvides");
pk_catalog_process_type (state, PK_CATALOG_MODE_PROVIDES);
/* resolve, search-file then what-provides */
@@ -621,7 +620,7 @@ pk_catalog_init (PkCatalog *catalog)
control = pk_control_new ();
ret = pk_control_get_properties (control, NULL, &error);
if (!ret) {
- egg_error ("Failed to contact PackageKit: %s", error->message);
+ g_error ("Failed to contact PackageKit: %s", error->message);
g_error_free (error);
return;
}
@@ -632,7 +631,7 @@ pk_catalog_init (PkCatalog *catalog)
NULL);
if (catalog->priv->distro_id == NULL)
- egg_warning ("no distro_id, your distro needs to implement this in pk-engine.c!");
+ g_warning ("no distro_id, your distro needs to implement this in pk-engine.c!");
}
/**
diff --git a/lib/packagekit-glib2/pk-category.c b/lib/packagekit-glib2/pk-category.c
index e71c4c4..26b7690 100644
--- a/lib/packagekit-glib2/pk-category.c
+++ b/lib/packagekit-glib2/pk-category.c
@@ -32,8 +32,6 @@
#include <packagekit-glib2/pk-category.h>
-#include "egg-debug.h"
-
static void pk_category_finalize (GObject *object);
#define PK_CATEGORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CATEGORY, PkCategoryPrivate))
diff --git a/lib/packagekit-glib2/pk-client-sync.c b/lib/packagekit-glib2/pk-client-sync.c
index bdbe48e..907577c 100644
--- a/lib/packagekit-glib2/pk-client-sync.c
+++ b/lib/packagekit-glib2/pk-client-sync.c
@@ -27,8 +27,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-progress.h>
-#include "egg-debug.h"
-
#include "pk-client-sync.h"
/* tiny helper to help us do the async operation */
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 5a60f75..4d55ddd 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -45,8 +45,6 @@
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-package-ids.h>
-#include "egg-debug.h"
-
static void pk_client_finalize (GObject *object);
#define PK_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CLIENT, PkClientPrivate))
@@ -207,7 +205,7 @@ pk_client_fixup_dbus_error (GError *error)
/* old style PolicyKit failure */
if (g_str_has_prefix (error->message, "org.freedesktop.packagekit.")) {
- egg_debug ("fixing up code for Policykit auth failure");
+ g_debug ("fixing up code for Policykit auth failure");
error->code = PK_CLIENT_ERROR_FAILED_AUTH;
g_free (error->message);
error->message = g_strdup ("PolicyKit authorization failure");
@@ -253,7 +251,7 @@ pk_client_fixup_dbus_error (GError *error)
error->code = PK_CLIENT_ERROR_NOT_SUPPORTED;
goto out;
}
- egg_warning ("couldn't parse execption '%s', please report", name);
+ g_warning ("couldn't parse execption '%s', please report", name);
}
out:
@@ -500,7 +498,7 @@ pk_client_get_properties_collect_cb (const char *key, const GValue *value, PkCli
return;
}
- egg_warning ("unhandled property '%s'", key);
+ g_warning ("unhandled property '%s'", key);
}
/**
@@ -517,12 +515,12 @@ pk_client_cancel_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkClientState *sta
G_TYPE_INVALID);
if (!ret) {
/* there's not really a lot we can do here */
- egg_warning ("failed to cancel: %s", error->message);
+ g_warning ("failed to cancel: %s", error->message);
g_error_free (error);
}
/* finished this call */
- egg_debug ("cancelled %s, ended DBus call: %p", state->tid, state->call);
+ g_debug ("cancelled %s, ended DBus call: %p", state->tid, state->call);
state->call = NULL;
}
@@ -534,20 +532,20 @@ pk_client_cancellable_cancel_cb (GCancellable *cancellable, PkClientState *state
{
/* dbus method has not yet fired */
if (state->proxy == NULL) {
- egg_warning ("Cancelled, but no proxy, not sure what to do here");
+ g_warning ("Cancelled, but no proxy, not sure what to do here");
return;
}
/* dbus method is pending now, just cancel */
if (state->call != NULL) {
dbus_g_proxy_cancel_call (state->proxy, state->call);
- egg_debug ("cancelling %s, ended DBus call: %p", state->tid, state->call);
+ g_debug ("cancelling %s, ended DBus call: %p", state->tid, state->call);
state->call = NULL;
return;
}
if (state->call_interface_changed != NULL) {
dbus_g_proxy_cancel_call (state->proxy, state->call_interface_changed);
- egg_debug ("cancelling %s, ended DBus call: %p", state->tid, state->call_interface_changed);
+ g_debug ("cancelling %s, ended DBus call: %p", state->tid, state->call_interface_changed);
state->call_interface_changed = NULL;
}
@@ -556,8 +554,8 @@ pk_client_cancellable_cancel_cb (GCancellable *cancellable, PkClientState *state
(DBusGProxyCallNotify) pk_client_cancel_cb, state,
NULL, G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
- egg_debug ("cancelling %s (%p)", state->tid, state->call);
+ g_error ("failed to setup call, maybe OOM or no connection");
+ g_debug ("cancelling %s (%p)", state->tid, state->call);
}
/**
@@ -568,7 +566,7 @@ pk_client_state_remove (PkClient *client, PkClientState *state)
{
gboolean is_idle;
g_ptr_array_remove (client->priv->calls, state);
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* has the idle state changed? */
is_idle = (client->priv->calls->len == 0);
@@ -587,7 +585,7 @@ pk_client_state_add (PkClient *client, PkClientState *state)
gboolean is_idle;
g_ptr_array_add (client->priv->calls, state);
- egg_debug ("state array add %p", state);
+ g_debug ("state array add %p", state);
/* has the idle state changed? */
is_idle = (client->priv->calls->len == 0);
@@ -675,7 +673,7 @@ pk_client_copy_finished_remove_old_files (PkClientState *state)
/* get the data */
array = pk_results_get_files_array (state->results);
if (array == NULL) {
- egg_warning ("internal error, no files in array");
+ g_warning ("internal error, no files in array");
goto out;
}
@@ -708,7 +706,7 @@ pk_client_copy_downloaded_finished_cb (GFile *file, GAsyncResult *res, PkClientS
/* debug */
path = g_file_get_path (file);
- egg_debug ("finished copy of %s", path);
+ g_debug ("finished copy of %s", path);
/* get the result */
ret = g_file_copy_finish (file, res, &error);
@@ -769,7 +767,7 @@ pk_client_copy_downloaded_file (PkClientState *state, const gchar *package_id, c
path = g_build_filename (state->directory, basename, NULL);
/* copy async */
- egg_debug ("copy %s to %s", source_file, path);
+ g_debug ("copy %s to %s", source_file, path);
source = g_file_new_for_path (source_file);
destination = g_file_new_for_path (path);
g_file_copy_async (source, destination, G_FILE_COPY_OVERWRITE, G_PRIORITY_DEFAULT, state->cancellable,
@@ -818,7 +816,7 @@ pk_client_copy_downloaded (PkClientState *state)
/* get data */
array = pk_results_get_files_array (state->results);
if (array == NULL) {
- egg_warning ("internal error, no files in array");
+ g_warning ("internal error, no files in array");
goto out;
}
@@ -831,7 +829,7 @@ pk_client_copy_downloaded (PkClientState *state)
state->refcount += g_strv_length (files);
g_strfreev (files);
}
- egg_debug ("%i files to copy", state->refcount);
+ g_debug ("%i files to copy", state->refcount);
/* get a cached value, as pk_client_copy_downloaded_file() adds items */
len = array->len;
@@ -868,7 +866,7 @@ pk_client_finished_cb (DBusGProxy *proxy, const gchar *exit_text, guint runtime,
PkExitEnum exit_enum;
PkError *error_code = NULL;
- egg_debug ("exit_text=%s", exit_text);
+ g_debug ("exit_text=%s", exit_text);
/* yay */
exit_enum = pk_exit_enum_from_string (exit_text);
@@ -913,7 +911,7 @@ pk_client_method_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkClientState *sta
GError *error = NULL;
/* finished this call */
- egg_debug ("got reply to request, ended DBus call: %p (%p)", state, state->call);
+ g_debug ("got reply to request, ended DBus call: %p (%p)", state, state->call);
state->call = NULL;
/* get the result */
@@ -985,7 +983,7 @@ pk_client_get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkClientSt
GHashTable *hash;
gboolean ret;
- egg_debug ("got properties, ended DBus call: %p (%p)", state, state->call_interface_changed);
+ g_debug ("got properties, ended DBus call: %p (%p)", state, state->call_interface_changed);
state->call_interface_changed = NULL;
/* get the result */
@@ -993,7 +991,7 @@ pk_client_get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkClientSt
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("failed to get properties: %s", error->message);
+ g_warning ("failed to get properties: %s", error->message);
g_error_free (error);
goto out;
}
@@ -1006,7 +1004,7 @@ pk_client_get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkClientSt
out:
/* finished this call */
- egg_debug ("got property results, ended DBus call: %p (%p)", state, state->call);
+ g_debug ("got property results, ended DBus call: %p (%p)", state, state->call);
state->call = NULL;
}
@@ -1018,7 +1016,7 @@ pk_client_changed_cb (DBusGProxy *proxy, PkClientState *state)
{
/* successive quick Changed events */
if (state->call_interface_changed != NULL) {
- egg_debug ("already processing request %p, so ignoring", state->call_interface_changed);
+ g_debug ("already processing request %p, so ignoring", state->call_interface_changed);
return;
}
@@ -1029,14 +1027,13 @@ pk_client_changed_cb (DBusGProxy *proxy, PkClientState *state)
G_TYPE_STRING, "org.freedesktop.PackageKit.Transaction",
G_TYPE_INVALID);
if (state->call_interface_changed == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
- egg_debug ("changed so checking properties, started DBus call: %p (%p)", state, state->call_interface_changed);
+ g_error ("failed to setup call, maybe OOM or no connection");
+ g_debug ("changed so checking properties, started DBus call: %p (%p)", state, state->call_interface_changed);
/* we've sent this async */
- egg_debug ("interface changed, started DBus call: %p (%p)", state, state->call_interface_changed);
+ g_debug ("interface changed, started DBus call: %p (%p)", state, state->call_interface_changed);
}
-
/**
* pk_client_details_cb:
*/
@@ -1379,7 +1376,7 @@ pk_client_connect_proxy (DBusGProxy *proxy, PkClientState *state)
{
/* sanity check */
if (state->signals_connected) {
- egg_warning ("not connecting as already connected");
+ g_warning ("not connecting as already connected");
return;
}
@@ -1467,7 +1464,7 @@ pk_client_disconnect_proxy (DBusGProxy *proxy, PkClientState *state)
{
/* sanity check */
if (!state->signals_connected) {
- egg_debug ("not disconnecting as never connected");
+ g_debug ("not disconnecting as never connected");
return;
}
@@ -1540,7 +1537,7 @@ pk_client_set_hints_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkClientState *
}
/* finished this call */
- egg_debug ("set hints, ended DBus call: %p (%p)", state, state->call);
+ g_debug ("set hints, ended DBus call: %p (%p)", state, state->call);
state->call = NULL;
/* we'll have results from now on */
@@ -1772,10 +1769,10 @@ pk_client_set_hints_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkClientState *
/* check we called okay */
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* we've sent this async */
- egg_debug ("new method '%s', started DBus call: %p (%p)", pk_role_enum_to_string (state->role), state, state->call);
+ g_debug ("new method '%s', started DBus call: %p (%p)", pk_role_enum_to_string (state->role), state, state->call);
out:
g_free (filters_text);
@@ -1812,14 +1809,14 @@ pk_client_get_tid_cb (GObject *object, GAsyncResult *res, PkClientState *state)
return;
}
- egg_debug ("tid = %s", state->tid);
+ g_debug ("tid = %s", state->tid);
pk_progress_set_transaction_id (state->progress, state->tid);
/* get a connection to the transaction interface */
state->proxy = dbus_g_proxy_new_for_name (state->client->priv->connection,
PK_DBUS_SERVICE, state->tid, PK_DBUS_INTERFACE_TRANSACTION);
if (state->proxy == NULL)
- egg_error ("Cannot connect to PackageKit on %s", state->tid);
+ g_error ("Cannot connect to PackageKit on %s", state->tid);
/* don't timeout, as dbus-glib sets the timeout ~25 seconds */
dbus_g_proxy_set_default_timeout (state->proxy, INT_MAX);
@@ -1829,7 +1826,7 @@ pk_client_get_tid_cb (GObject *object, GAsyncResult *res, PkClientState *state)
PK_DBUS_SERVICE, state->tid,
"org.freedesktop.DBus.Properties");
if (state->proxy_props == NULL)
- egg_error ("Cannot connect to PackageKit on %s", state->tid);
+ g_error ("Cannot connect to PackageKit on %s", state->tid);
/* get hints */
array = g_ptr_array_new_with_free_func (g_free);
@@ -1855,12 +1852,12 @@ pk_client_get_tid_cb (GObject *object, GAsyncResult *res, PkClientState *state)
G_TYPE_STRV, hints,
G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
- egg_debug ("sent locale request, started DBus call: %p (%p)", state, state->call);
+ g_error ("failed to setup call, maybe OOM or no connection");
+ g_debug ("sent locale request, started DBus call: %p (%p)", state, state->call);
/* track state */
g_ptr_array_add (state->client->priv->calls, state);
- egg_debug ("state array add %p", state);
+ g_debug ("state array add %p", state);
/* we've sent this async */
g_ptr_array_unref (array);
@@ -3313,7 +3310,6 @@ out:
g_object_unref (res);
}
-
/**
* pk_client_copy_native_finished_cb:
*/
@@ -3326,7 +3322,7 @@ pk_client_copy_native_finished_cb (GFile *file, GAsyncResult *res, PkClientState
/* debug */
path = g_file_get_path (file);
- egg_debug ("finished copy of %s", path);
+ g_debug ("finished copy of %s", path);
/* get the result */
ret = g_file_copy_finish (file, res, &error);
@@ -3362,7 +3358,7 @@ pk_client_copy_non_native_then_get_tid (PkClientState *state)
/* get a temp dir accessible by the daemon */
user_temp = pk_client_get_user_temp ("native-cache", &error);
- egg_debug ("using temp dir %s", user_temp);
+ g_debug ("using temp dir %s", user_temp);
/* save percentage */
ret = pk_progress_set_percentage (state->progress, -1);
@@ -3372,12 +3368,12 @@ pk_client_copy_non_native_then_get_tid (PkClientState *state)
/* copy each file that is non-native */
for (i=0; state->files[i] != NULL; i++) {
ret = pk_client_is_file_native (state->files[i]);
- egg_debug ("%s native=%i", state->files[i], ret);
+ g_debug ("%s native=%i", state->files[i], ret);
if (!ret) {
/* generate the destination location */
basename = g_path_get_basename (state->files[i]);
path = g_build_filename (user_temp, basename, NULL);
- egg_debug ("copy from %s to %s", state->files[i], path);
+ g_debug ("copy from %s to %s", state->files[i], path);
source = g_file_new_for_path (state->files[i]);
destination = g_file_new_for_path (path);
@@ -4075,7 +4071,7 @@ pk_client_adopt_get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkCl
}
/* finished this call */
- egg_debug ("coldplugged properties, ended DBus call: %p (%p)", state, state->call);
+ g_debug ("coldplugged properties, ended DBus call: %p (%p)", state, state->call);
state->call = NULL;
/* setup the proxies ready for use */
@@ -4159,7 +4155,7 @@ pk_client_adopt_async (PkClient *client, const gchar *transaction_id, GCancellab
state->proxy = dbus_g_proxy_new_for_name (state->client->priv->connection,
PK_DBUS_SERVICE, state->tid, PK_DBUS_INTERFACE_TRANSACTION);
if (state->proxy == NULL)
- egg_error ("Cannot connect to PackageKit on %s", state->tid);
+ g_error ("Cannot connect to PackageKit on %s", state->tid);
/* don't timeout, as dbus-glib sets the timeout ~25 seconds */
dbus_g_proxy_set_default_timeout (state->proxy, INT_MAX);
@@ -4169,7 +4165,7 @@ pk_client_adopt_async (PkClient *client, const gchar *transaction_id, GCancellab
PK_DBUS_SERVICE, state->tid,
"org.freedesktop.DBus.Properties");
if (state->proxy_props == NULL)
- egg_error ("Cannot connect to PackageKit on %s", state->tid);
+ g_error ("Cannot connect to PackageKit on %s", state->tid);
/* call D-Bus get_properties async */
state->call = dbus_g_proxy_begin_call (state->proxy_props, "GetAll",
@@ -4177,8 +4173,8 @@ pk_client_adopt_async (PkClient *client, const gchar *transaction_id, GCancellab
G_TYPE_STRING, "org.freedesktop.PackageKit.Transaction",
G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
- egg_debug ("coldplug adoptee, started DBus call: %p (%p)", state, state->call);
+ g_error ("failed to setup call, maybe OOM or no connection");
+ g_debug ("coldplug adoptee, started DBus call: %p (%p)", state, state->call);
/* we'll have results from now on */
state->results = pk_results_new ();
@@ -4282,7 +4278,7 @@ pk_client_get_progress_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkClientStat
}
/* finished this call */
- egg_debug ("coldplugged properties, ended DBus call: %p (%p)", state, state->call);
+ g_debug ("coldplugged properties, ended DBus call: %p (%p)", state, state->call);
state->call = NULL;
/* process results */
@@ -4346,7 +4342,7 @@ pk_client_get_progress_async (PkClient *client, const gchar *transaction_id, GCa
state->proxy = dbus_g_proxy_new_for_name (state->client->priv->connection,
PK_DBUS_SERVICE, state->tid, PK_DBUS_INTERFACE_TRANSACTION);
if (state->proxy == NULL)
- egg_error ("Cannot connect to PackageKit on %s", state->tid);
+ g_error ("Cannot connect to PackageKit on %s", state->tid);
/* don't timeout, as dbus-glib sets the timeout ~25 seconds */
dbus_g_proxy_set_default_timeout (state->proxy, INT_MAX);
@@ -4356,7 +4352,7 @@ pk_client_get_progress_async (PkClient *client, const gchar *transaction_id, GCa
PK_DBUS_SERVICE, state->tid,
"org.freedesktop.DBus.Properties");
if (state->proxy_props == NULL)
- egg_error ("Cannot connect to PackageKit on %s", state->tid);
+ g_error ("Cannot connect to PackageKit on %s", state->tid);
/* timeout if we fail to get properties */
dbus_g_proxy_set_default_timeout (state->proxy_props, PK_CLIENT_DBUS_METHOD_TIMEOUT);
@@ -4367,8 +4363,8 @@ pk_client_get_progress_async (PkClient *client, const gchar *transaction_id, GCa
G_TYPE_STRING, "org.freedesktop.PackageKit.Transaction",
G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
- egg_debug ("getting progress on %s, started DBus call: %p", state->tid, state->call);
+ g_error ("failed to setup call, maybe OOM or no connection");
+ g_debug ("getting progress on %s, started DBus call: %p", state->tid, state->call);
/* track state */
pk_client_state_add (client, state);
@@ -4394,7 +4390,7 @@ pk_client_cancel_all_dbus_methods (PkClient *client)
state = g_ptr_array_index (array, i);
if (state->call == NULL)
continue;
- egg_debug ("cancel in flight call: %p (%p)", state, state->call);
+ g_debug ("cancel in flight call: %p (%p)", state, state->call);
dbus_g_proxy_cancel_call (state->proxy, state->call);
}
diff --git a/lib/packagekit-glib2/pk-common.c b/lib/packagekit-glib2/pk-common.c
index f360aba..a1be7c5 100644
--- a/lib/packagekit-glib2/pk-common.c
+++ b/lib/packagekit-glib2/pk-common.c
@@ -38,7 +38,6 @@
#include <packagekit-glib2/pk-common.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
#include "egg-string.h"
/**
@@ -118,14 +117,14 @@ pk_iso8601_to_date (const gchar *iso_date)
* time value - try and parse this case */
retval = sscanf (iso_date, "%u-%u-%u", &y, &m, &d);
if (retval != 3) {
- egg_warning ("could not parse date '%s'", iso_date);
+ g_warning ("could not parse date '%s'", iso_date);
goto out;
}
/* check it's valid */
ret = g_date_valid_dmy (d, m, y);
if (!ret) {
- egg_warning ("invalid date %i/%i/%i from '%s'", y, m, d, iso_date);
+ g_warning ("invalid date %i/%i/%i from '%s'", y, m, d, iso_date);
goto out;
}
diff --git a/lib/packagekit-glib2/pk-console-shared.c b/lib/packagekit-glib2/pk-console-shared.c
index 7bc2e43..6fd48c3 100644
--- a/lib/packagekit-glib2/pk-console-shared.c
+++ b/lib/packagekit-glib2/pk-console-shared.c
@@ -32,8 +32,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-package-id.h>
-#include "egg-debug.h"
-
#include "pk-client-sync.h"
#include "pk-console-shared.h"
@@ -80,7 +78,7 @@ pk_console_getchar_unbuffered (void)
/* store old settings */
res = tcgetattr (STDIN_FILENO, &org_opts);
if (res != 0)
- egg_warning ("failed to set terminal");
+ g_warning ("failed to set terminal");
/* set new terminal parms */
memcpy (&new_opts, &org_opts, sizeof(new_opts));
@@ -91,7 +89,7 @@ pk_console_getchar_unbuffered (void)
/* restore old settings */
res = tcsetattr (STDIN_FILENO, TCSANOW, &org_opts);
if (res != 0)
- egg_warning ("failed to set terminal");
+ g_warning ("failed to set terminal");
return c;
}
@@ -226,7 +224,7 @@ pk_console_resolve_packages (PkClient *client, PkBitfield filter, gchar **packag
/* get length */
len = g_strv_length (packages);
- egg_debug ("resolving %i packages", len);
+ g_debug ("resolving %i packages", len);
/* create output array*/
package_ids = g_new0 (gchar *, len+1);
@@ -401,7 +399,7 @@ pk_status_enum_to_localised_text (PkStatusEnum status)
text = _("Copying files");
break;
default:
- egg_warning ("status unrecognised: %s", pk_status_enum_to_string (status));
+ g_warning ("status unrecognised: %s", pk_status_enum_to_string (status));
}
return text;
}
@@ -453,7 +451,7 @@ pk_info_enum_to_localised_text (PkInfoEnum info)
text = _("Available");
break;
default:
- egg_warning ("info unrecognised: %s", pk_info_enum_to_string (info));
+ g_warning ("info unrecognised: %s", pk_info_enum_to_string (info));
}
return text;
}
@@ -691,7 +689,7 @@ pk_role_enum_to_localised_present (PkRoleEnum role)
text = _("Simulating update");
break;
default:
- egg_warning ("role unrecognised: %s", pk_role_enum_to_string (role));
+ g_warning ("role unrecognised: %s", pk_role_enum_to_string (role));
}
return text;
}
diff --git a/lib/packagekit-glib2/pk-control-sync.c b/lib/packagekit-glib2/pk-control-sync.c
index 7bea5d7..b866ea0 100644
--- a/lib/packagekit-glib2/pk-control-sync.c
+++ b/lib/packagekit-glib2/pk-control-sync.c
@@ -27,8 +27,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-control.h>
-#include "egg-debug.h"
-
#include "pk-control-sync.h"
/* tiny helper to help us do the async operation */
diff --git a/lib/packagekit-glib2/pk-control.c b/lib/packagekit-glib2/pk-control.c
index 6e519c6..5396a01 100644
--- a/lib/packagekit-glib2/pk-control.c
+++ b/lib/packagekit-glib2/pk-control.c
@@ -38,8 +38,6 @@
#include <packagekit-glib2/pk-control.h>
#include <packagekit-glib2/pk-version.h>
-#include "egg-debug.h"
-
static void pk_control_finalize (GObject *object);
#define PK_CONTROL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CONTROL, PkControlPrivate))
@@ -172,7 +170,7 @@ pk_control_cancellable_cancel_cb (GCancellable *cancellable, PkControlState *sta
if (state->call != NULL) {
dbus_g_proxy_cancel_call (state->control->priv->proxy, state->call);
dbus_g_proxy_cancel_call (state->control->priv->proxy_props, state->call);
- egg_debug ("cancelling, ended DBus call: %p (%p)", state, state->call);
+ g_debug ("cancelling, ended DBus call: %p (%p)", state, state->call);
state->call = NULL;
}
}
@@ -195,9 +193,9 @@ pk_control_get_tid_state_finish (PkControlState *state, const GError *error)
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -233,7 +231,7 @@ pk_control_get_tid_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkControlState *
if (!ret) {
/* fix up the D-Bus error */
pk_control_fixup_dbus_error (error);
- egg_warning ("failed: %s", error->message);
+ g_warning ("failed: %s", error->message);
pk_control_get_tid_state_finish (state, error);
g_error_free (error);
goto out;
@@ -255,7 +253,7 @@ static void
pk_control_call_destroy_cb (PkControlState *state)
{
if (state->call != NULL)
- egg_warning ("%p was destroyed before it was cleared", state->call);
+ g_warning ("%p was destroyed before it was cleared", state->call);
}
/**
@@ -303,11 +301,11 @@ pk_control_get_tid_async (PkControl *control, GCancellable *cancellable, GAsyncR
(DBusGProxyCallNotify) pk_control_get_tid_cb, state,
(GDestroyNotify) pk_control_call_destroy_cb, G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -363,9 +361,9 @@ pk_control_suggest_daemon_quit_state_finish (PkControlState *state, const GError
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -397,7 +395,7 @@ pk_control_suggest_daemon_quit_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkCo
ret = dbus_g_proxy_end_call (proxy, call, &error,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("failed to suggest quit: %s", error->message);
+ g_warning ("failed to suggest quit: %s", error->message);
pk_control_suggest_daemon_quit_state_finish (state, error);
g_error_free (error);
goto out;
@@ -457,11 +455,11 @@ pk_control_suggest_daemon_quit_async (PkControl *control, GCancellable *cancella
(DBusGProxyCallNotify) pk_control_suggest_daemon_quit_cb, state,
NULL, G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -517,9 +515,9 @@ pk_control_get_daemon_state_state_finish (PkControlState *state, const GError *e
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -555,7 +553,7 @@ pk_control_get_daemon_state_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkContr
if (!ret) {
/* fix up the D-Bus error */
pk_control_fixup_dbus_error (error);
- egg_warning ("failed: %s", error->message);
+ g_warning ("failed: %s", error->message);
pk_control_get_daemon_state_state_finish (state, error);
g_error_free (error);
goto out;
@@ -615,11 +613,11 @@ pk_control_get_daemon_state_async (PkControl *control, GCancellable *cancellable
(DBusGProxyCallNotify) pk_control_get_daemon_state_cb, state,
NULL, G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -675,9 +673,9 @@ pk_control_set_proxy_state_finish (PkControlState *state, const GError *error)
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -709,7 +707,7 @@ pk_control_set_proxy_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkControlState
ret = dbus_g_proxy_end_call (proxy, call, &error,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("failed to set proxy: %s", error->message);
+ g_warning ("failed to set proxy: %s", error->message);
pk_control_set_proxy_state_finish (state, error);
g_error_free (error);
goto out;
@@ -774,11 +772,11 @@ pk_control_set_proxy_async (PkControl *control, const gchar *proxy_http, const g
G_TYPE_STRING, proxy_ftp,
G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -834,9 +832,9 @@ pk_control_set_root_state_finish (PkControlState *state, const GError *error)
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -868,7 +866,7 @@ pk_control_set_root_cb (DBusGProxy *root, DBusGProxyCall *call, PkControlState *
ret = dbus_g_proxy_end_call (root, call, &error,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("failed to set root: %s", error->message);
+ g_warning ("failed to set root: %s", error->message);
pk_control_set_root_state_finish (state, error);
g_error_free (error);
goto out;
@@ -931,11 +929,11 @@ pk_control_set_root_async (PkControl *control, const gchar *root, GCancellable *
G_TYPE_STRING, root,
G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -991,9 +989,9 @@ pk_control_get_transaction_list_state_finish (PkControlState *state, const GErro
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -1029,7 +1027,7 @@ pk_control_get_transaction_list_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkC
if (!ret) {
/* fix up the D-Bus error */
pk_control_fixup_dbus_error (error);
- egg_warning ("failed: %s", error->message);
+ g_warning ("failed: %s", error->message);
pk_control_get_transaction_list_state_finish (state, error);
g_error_free (error);
goto out;
@@ -1089,11 +1087,11 @@ pk_control_get_transaction_list_async (PkControl *control, GCancellable *cancell
(DBusGProxyCallNotify) pk_control_get_transaction_list_cb, state,
NULL, G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -1149,9 +1147,9 @@ pk_control_get_time_since_action_state_finish (PkControlState *state, const GErr
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -1186,7 +1184,7 @@ pk_control_get_time_since_action_cb (DBusGProxy *proxy, DBusGProxyCall *call, Pk
if (!ret) {
/* fix up the D-Bus error */
pk_control_fixup_dbus_error (error);
- egg_warning ("failed: %s", error->message);
+ g_warning ("failed: %s", error->message);
pk_control_get_time_since_action_state_finish (state, error);
g_error_free (error);
goto out;
@@ -1257,11 +1255,11 @@ pk_control_get_time_since_action_async (PkControl *control, PkRoleEnum role, GCa
G_TYPE_STRING, role_text,
G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -1317,9 +1315,9 @@ pk_control_can_authorize_state_finish (PkControlState *state, const GError *erro
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -1354,7 +1352,7 @@ pk_control_can_authorize_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkControlS
if (!ret) {
/* fix up the D-Bus error */
pk_control_fixup_dbus_error (error);
- egg_warning ("failed: %s", error->message);
+ g_warning ("failed: %s", error->message);
pk_control_can_authorize_state_finish (state, error);
g_error_free (error);
goto out;
@@ -1425,11 +1423,11 @@ pk_control_can_authorize_async (PkControl *control, const gchar *action_id, GCan
G_TYPE_STRING, action_id,
G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -1484,9 +1482,9 @@ pk_control_get_properties_state_finish (PkControlState *state, const GError *err
/* remove from list */
g_ptr_array_remove (state->control->priv->calls, state);
if (state->call != NULL)
- egg_warning ("state array remove %p (%p)", state, state->call);
+ g_warning ("state array remove %p (%p)", state, state->call);
else
- egg_debug ("state array remove %p", state);
+ g_debug ("state array remove %p", state);
/* complete */
g_simple_async_result_complete_in_idle (state->res);
@@ -1513,7 +1511,7 @@ pk_control_set_version_major (PkControl *control, guint version_major)
control->priv->version_major = version_major;
/* notify we're changed */
- egg_debug ("notify::version-major");
+ g_debug ("notify::version-major");
g_object_notify (G_OBJECT(control), "version-major");
}
@@ -1529,7 +1527,7 @@ pk_control_set_version_minor (PkControl *control, guint version_minor)
control->priv->version_minor = version_minor;
/* notify we're changed */
- egg_debug ("notify::version-minor");
+ g_debug ("notify::version-minor");
g_object_notify (G_OBJECT(control), "version-minor");
}
@@ -1545,7 +1543,7 @@ pk_control_set_version_micro (PkControl *control, guint version_micro)
control->priv->version_micro = version_micro;
/* notify we're changed */
- egg_debug ("notify::version-micro");
+ g_debug ("notify::version-micro");
g_object_notify (G_OBJECT(control), "version-micro");
}
@@ -1561,7 +1559,7 @@ pk_control_set_locked (PkControl *control, gboolean locked)
control->priv->locked = locked;
/* notify we're changed */
- egg_debug ("notify::locked");
+ g_debug ("notify::locked");
g_object_notify (G_OBJECT(control), "locked");
}
@@ -1578,7 +1576,7 @@ pk_control_set_backend_name (PkControl *control, const gchar *backend_name)
control->priv->backend_name = g_strdup (backend_name);
/* notify we're changed */
- egg_debug ("notify::backend-name");
+ g_debug ("notify::backend-name");
g_object_notify (G_OBJECT(control), "backend-name");
}
@@ -1595,7 +1593,7 @@ pk_control_set_backend_author (PkControl *control, const gchar *backend_author)
control->priv->backend_author = g_strdup (backend_author);
/* notify we're changed */
- egg_debug ("notify::backend-author");
+ g_debug ("notify::backend-author");
g_object_notify (G_OBJECT(control), "backend-author");
}
@@ -1612,7 +1610,7 @@ pk_control_set_backend_description (PkControl *control, const gchar *backend_des
control->priv->backend_description = g_strdup (backend_description);
/* notify we're changed */
- egg_debug ("notify::backend-description");
+ g_debug ("notify::backend-description");
g_object_notify (G_OBJECT(control), "backend-description");
}
@@ -1629,7 +1627,7 @@ pk_control_set_mime_types (PkControl *control, const gchar *mime_types)
control->priv->mime_types = g_strdup (mime_types);
/* notify we're changed */
- egg_debug ("notify::mime-types");
+ g_debug ("notify::mime-types");
g_object_notify (G_OBJECT(control), "mime-types");
}
@@ -1645,7 +1643,7 @@ pk_control_set_roles (PkControl *control, PkBitfield roles)
control->priv->roles = roles;
/* notify we're changed */
- egg_debug ("notify::roles");
+ g_debug ("notify::roles");
g_object_notify (G_OBJECT(control), "roles");
}
@@ -1661,7 +1659,7 @@ pk_control_set_groups (PkControl *control, PkBitfield groups)
control->priv->groups = groups;
/* notify we're changed */
- egg_debug ("notify::groups");
+ g_debug ("notify::groups");
g_object_notify (G_OBJECT(control), "groups");
}
@@ -1677,7 +1675,7 @@ pk_control_set_filters (PkControl *control, PkBitfield filters)
control->priv->filters = filters;
/* notify we're changed */
- egg_debug ("notify::filters");
+ g_debug ("notify::filters");
g_object_notify (G_OBJECT(control), "filters");
}
@@ -1693,7 +1691,7 @@ pk_control_set_network_state (PkControl *control, PkNetworkEnum network_state)
control->priv->network_state = network_state;
/* notify we're changed */
- egg_debug ("notify::network-state");
+ g_debug ("notify::network-state");
g_object_notify (G_OBJECT(control), "network-state");
}
@@ -1710,7 +1708,7 @@ pk_control_set_distro_id (PkControl *control, const gchar *distro_id)
control->priv->distro_id = g_strdup (distro_id);
/* notify we're changed */
- egg_debug ("notify::distro-id");
+ g_debug ("notify::distro-id");
g_object_notify (G_OBJECT(control), "distro-id");
}
@@ -1747,7 +1745,7 @@ pk_control_get_properties_collect_cb (const char *key, const GValue *value, PkCo
} else if (g_strcmp0 (key, "DistroId") == 0) {
pk_control_set_distro_id (control, g_value_get_string (value));
} else {
- egg_warning ("unhandled property '%s'", key);
+ g_warning ("unhandled property '%s'", key);
}
}
@@ -1769,7 +1767,7 @@ pk_control_get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, PkControl
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("failed to get properties: %s", error->message);
+ g_warning ("failed to get properties: %s", error->message);
pk_control_get_properties_state_finish (state, error);
g_error_free (error);
goto out;
@@ -1839,11 +1837,11 @@ pk_control_get_properties_async (PkControl *control, GCancellable *cancellable,
G_TYPE_STRING, "org.freedesktop.PackageKit",
G_TYPE_INVALID);
if (state->call == NULL)
- egg_error ("failed to setup call, maybe OOM or no connection");
+ g_error ("failed to setup call, maybe OOM or no connection");
/* track state */
g_ptr_array_add (control->priv->calls, state);
- egg_debug ("state array add %p (%p)", state, state->call);
+ g_debug ("state array add %p (%p)", state, state->call);
out:
g_object_unref (res);
}
@@ -1905,7 +1903,7 @@ pk_control_idle_signal_store_free (PkIdleSignalStore *store)
static gboolean
pk_control_transaction_list_changed_idle_cb (PkIdleSignalStore *store)
{
- egg_debug ("emit transaction-list-changed");
+ g_debug ("emit transaction-list-changed");
g_signal_emit (store->control, signals[SIGNAL_TRANSACTION_LIST_CHANGED], 0, store->transaction_ids);
store->control->priv->transaction_list_changed_id = 0;
pk_control_idle_signal_store_free (store);
@@ -1924,7 +1922,7 @@ pk_control_transaction_list_changed_cb (DBusGProxy *proxy, gchar **transaction_i
/* already pending */
if (control->priv->transaction_list_changed_id != 0) {
- egg_debug ("already pending, so ignoring");
+ g_debug ("already pending, so ignoring");
return;
}
@@ -1934,7 +1932,7 @@ pk_control_transaction_list_changed_cb (DBusGProxy *proxy, gchar **transaction_i
store->transaction_ids = g_strdupv (transaction_ids);
/* we have to do this idle as the transaction list will change when not yet finished */
- egg_debug ("emit transaction-list-changed (when idle)");
+ g_debug ("emit transaction-list-changed (when idle)");
control->priv->transaction_list_changed_id =
g_idle_add ((GSourceFunc) pk_control_transaction_list_changed_idle_cb, store);
#if GLIB_CHECK_VERSION(2,25,8)
@@ -1949,7 +1947,7 @@ pk_control_transaction_list_changed_cb (DBusGProxy *proxy, gchar **transaction_i
static gboolean
pk_control_restart_schedule_idle_cb (PkIdleSignalStore *store)
{
- egg_debug ("emit transaction-list-changed");
+ g_debug ("emit transaction-list-changed");
g_signal_emit (store->control, signals[SIGNAL_RESTART_SCHEDULE], 0);
store->control->priv->restart_schedule_id = 0;
pk_control_idle_signal_store_free (store);
@@ -1968,7 +1966,7 @@ pk_control_restart_schedule_cb (DBusGProxy *proxy, PkControl *control)
/* already pending */
if (control->priv->restart_schedule_id != 0) {
- egg_debug ("already pending, so ignoring");
+ g_debug ("already pending, so ignoring");
return;
}
@@ -1977,7 +1975,7 @@ pk_control_restart_schedule_cb (DBusGProxy *proxy, PkControl *control)
store->control = g_object_ref (control);
/* we have to do this idle as the transaction list will change when not yet finished */
- egg_debug ("emit restart-schedule (when idle)");
+ g_debug ("emit restart-schedule (when idle)");
store->control->priv->restart_schedule_id =
g_idle_add ((GSourceFunc) pk_control_restart_schedule_idle_cb, store);
#if GLIB_CHECK_VERSION(2,25,8)
@@ -1992,7 +1990,7 @@ pk_control_restart_schedule_cb (DBusGProxy *proxy, PkControl *control)
static gboolean
pk_control_updates_changed_idle_cb (PkIdleSignalStore *store)
{
- egg_debug ("emit transaction-list-changed");
+ g_debug ("emit transaction-list-changed");
g_signal_emit (store->control, signals[SIGNAL_UPDATES_CHANGED], 0);
store->control->priv->updates_changed_id = 0;
pk_control_idle_signal_store_free (store);
@@ -2011,7 +2009,7 @@ pk_control_updates_changed_cb (DBusGProxy *proxy, PkControl *control)
/* already pending */
if (control->priv->updates_changed_id != 0) {
- egg_debug ("already pending, so ignoring");
+ g_debug ("already pending, so ignoring");
return;
}
@@ -2020,7 +2018,7 @@ pk_control_updates_changed_cb (DBusGProxy *proxy, PkControl *control)
store->control = g_object_ref (control);
/* we have to do this idle as the transaction list will change when not yet finished */
- egg_debug ("emit updates-changed (when idle)");
+ g_debug ("emit updates-changed (when idle)");
control->priv->updates_changed_id =
g_idle_add ((GSourceFunc) pk_control_updates_changed_idle_cb, store);
#if GLIB_CHECK_VERSION(2,25,8)
@@ -2035,7 +2033,7 @@ pk_control_updates_changed_cb (DBusGProxy *proxy, PkControl *control)
static gboolean
pk_control_repo_list_changed_idle_cb (PkIdleSignalStore *store)
{
- egg_debug ("emit transaction-list-changed");
+ g_debug ("emit transaction-list-changed");
g_signal_emit (store->control, signals[SIGNAL_REPO_LIST_CHANGED], 0);
store->control->priv->repo_list_changed_id = 0;
pk_control_idle_signal_store_free (store);
@@ -2054,7 +2052,7 @@ pk_control_repo_list_changed_cb (DBusGProxy *proxy, PkControl *control)
/* already pending */
if (control->priv->repo_list_changed_id != 0) {
- egg_debug ("already pending, so ignoring");
+ g_debug ("already pending, so ignoring");
return;
}
@@ -2063,7 +2061,7 @@ pk_control_repo_list_changed_cb (DBusGProxy *proxy, PkControl *control)
store->control = g_object_ref (control);
/* we have to do this idle as the transaction list will change when not yet finished */
- egg_debug ("emit repo-list-changed (when idle)");
+ g_debug ("emit repo-list-changed (when idle)");
control->priv->repo_list_changed_id =
g_idle_add ((GSourceFunc) pk_control_repo_list_changed_idle_cb, store);
#if GLIB_CHECK_VERSION(2,25,8)
@@ -2090,7 +2088,7 @@ pk_control_changed_get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, P
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("failed to get properties: %s", error->message);
+ g_warning ("failed to get properties: %s", error->message);
goto out;
}
@@ -2113,12 +2111,12 @@ pk_control_changed_cb (DBusGProxy *proxy, PkControl *control)
{
/* already getting properties */
if (control->priv->call_get_properties != NULL) {
- egg_warning ("already getting properties, will ignore");
+ g_warning ("already getting properties, will ignore");
return;
}
/* call D-Bus get_properties async */
- egg_debug ("properties changed, so getting new list");
+ g_debug ("properties changed, so getting new list");
/* TODO: idle? */
control->priv->call_get_properties =
@@ -2144,7 +2142,7 @@ pk_control_cancel_all_dbus_methods (PkControl *control)
state = g_ptr_array_index (array, i);
if (state->call == NULL)
continue;
- egg_debug ("cancel in flight call: %p (%p)", state, state->call);
+ g_debug ("cancel in flight call: %p (%p)", state, state->call);
dbus_g_proxy_cancel_call (control->priv->proxy, state->call);
}
@@ -2177,7 +2175,7 @@ pk_control_name_owner_changed_cb (DBusGProxy *proxy, const gchar *name, const gc
/* something --> nothing */
if (prev_len != 0 && new_len == 0) {
control->priv->connected = FALSE;
- egg_debug ("notify::connected");
+ g_debug ("notify::connected");
g_object_notify (G_OBJECT(control), "connected");
return;
}
@@ -2185,7 +2183,7 @@ pk_control_name_owner_changed_cb (DBusGProxy *proxy, const gchar *name, const gc
/* nothing --> something */
if (prev_len == 0 && new_len != 0) {
control->priv->connected = TRUE;
- egg_debug ("notify::connected");
+ g_debug ("notify::connected");
g_object_notify (G_OBJECT(control), "connected");
return;
}
@@ -2501,7 +2499,7 @@ pk_control_init (PkControl *control)
/* check dbus connections, exit if not valid */
control->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (error != NULL) {
- egg_warning ("%s", error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
g_error ("This program cannot start until you start the dbus system service.");
}
@@ -2516,21 +2514,21 @@ pk_control_init (PkControl *control)
PK_DBUS_SERVICE, PK_DBUS_PATH,
PK_DBUS_INTERFACE);
if (control->priv->proxy == NULL)
- egg_error ("Cannot connect to PackageKit.");
+ g_error ("Cannot connect to PackageKit.");
/* get a connection to collect properties */
control->priv->proxy_props = dbus_g_proxy_new_for_name (control->priv->connection,
PK_DBUS_SERVICE, PK_DBUS_PATH,
"org.freedesktop.DBus.Properties");
if (control->priv->proxy_props == NULL)
- egg_error ("Cannot connect to PackageKit.");
+ g_error ("Cannot connect to PackageKit.");
/* get a connection to watch NameOwnerChanged */
control->priv->proxy_dbus = dbus_g_proxy_new_for_name_owner (control->priv->connection,
DBUS_SERVICE_DBUS, DBUS_PATH_DBUS,
DBUS_INTERFACE_DBUS, &error);
if (control->priv->proxy_dbus == NULL) {
- egg_error ("Cannot connect to DBUS: %s", error->message);
+ g_error ("Cannot connect to DBUS: %s", error->message);
g_error_free (error);
}
diff --git a/lib/packagekit-glib2/pk-debug.c b/lib/packagekit-glib2/pk-debug.c
new file mode 100644
index 0000000..c5a3be8
--- /dev/null
+++ b/lib/packagekit-glib2/pk-debug.c
@@ -0,0 +1,167 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2010 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <glib/gi18n.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#include <pk-debug.h>
+
+#include "config.h"
+
+static gboolean _verbose = FALSE;
+static gboolean _console = FALSE;
+
+/**
+ * pk_debug_is_verbose:
+ *
+ * Returns: TRUE if we have debugging enabled
+ **/
+gboolean
+pk_debug_is_verbose (void)
+{
+ /* local first */
+ if (_verbose)
+ return TRUE;
+
+ /* fall back to env variable */
+ if (g_getenv ("VERBOSE") != NULL)
+ return TRUE;
+ return FALSE;
+}
+
+
+/**
+ * pk_debug_ignore_cb:
+ **/
+static void
+pk_debug_ignore_cb (const gchar *log_domain, GLogLevelFlags log_level,
+ const gchar *message, gpointer user_data)
+{
+}
+
+/**
+ * pk_debug_handler_cb:
+ **/
+static void
+pk_debug_handler_cb (const gchar *log_domain, GLogLevelFlags log_level,
+ const gchar *message, gpointer user_data)
+{
+ gchar str_time[255];
+ time_t the_time;
+
+ /* time header */
+ time (&the_time);
+ strftime (str_time, 254, "%H:%M:%S", localtime (&the_time));
+
+ /* no color please, we're British */
+ if (!_console) {
+ if (log_level == G_LOG_LEVEL_DEBUG) {
+ g_print ("%s\t%s\n", str_time, message);
+ } else {
+ g_print ("***\n%s\t%s\n***\n", str_time, message);
+ }
+ return;
+ }
+
+ /* critical is also in red */
+ if (log_level == G_LOG_LEVEL_CRITICAL ||
+ log_level == G_LOG_LEVEL_ERROR) {
+ g_print ("%c[%dm%s\t", 0x1B, 32, str_time);
+ g_print ("%c[%dm%s\n%c[%dm", 0x1B, 31, message, 0x1B, 0);
+ } else {
+ /* debug in blue */
+ g_print ("%c[%dm%s\t", 0x1B, 32, str_time);
+ g_print ("%c[%dm%s\n%c[%dm", 0x1B, 34, message, 0x1B, 0);
+ }
+}
+
+/**
+ * pk_debug_pre_parse_hook:
+ */
+static gboolean
+pk_debug_pre_parse_hook (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error)
+{
+ const GOptionEntry main_entries[] = {
+ { "verbose", 'v', 0, G_OPTION_ARG_NONE, &_verbose,
+ /* TRANSLATORS: turn on all debugging */
+ N_("Show debugging information for all files"), NULL },
+ { NULL}
+ };
+
+ /* add main entry */
+ g_option_context_add_main_entries (context, main_entries, NULL);
+ return TRUE;
+}
+
+/**
+ * pk_debug_setup:
+ */
+void
+pk_debug_setup (gboolean enabled)
+{
+ if (enabled) {
+ g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
+ g_log_set_handler (G_LOG_DOMAIN,
+ G_LOG_LEVEL_ERROR |
+ G_LOG_LEVEL_CRITICAL |
+ G_LOG_LEVEL_DEBUG |
+ G_LOG_LEVEL_WARNING,
+ pk_debug_handler_cb, NULL);
+ } else {
+ /* hide all debugging */
+ g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
+ pk_debug_ignore_cb, NULL);
+ }
+}
+
+/**
+ * pk_debug_post_parse_hook:
+ */
+static gboolean
+pk_debug_post_parse_hook (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error)
+{
+ /* verbose? */
+ pk_debug_setup (_verbose);
+ _console = (isatty (fileno (stdout)) == 1);
+ g_debug ("Verbose debugging %s (on console %i)", _verbose ? "enabled" : "disabled", _console);
+ return TRUE;
+}
+
+/**
+ * pk_debug_get_option_group:
+ *
+ * Returns a #GOptionGroup for the commandline arguments recognized
+ * by debugging. You should add this group to your #GOptionContext
+ * with g_option_context_add_group(), if you are using
+ * g_option_context_parse() to parse your commandline arguments.
+ *
+ * Returns: a #GOptionGroup for the commandline arguments
+ */
+GOptionGroup *
+pk_debug_get_option_group (void)
+{
+ GOptionGroup *group;
+ group = g_option_group_new ("debug", _("Debugging Options"), _("Show debugging options"), NULL, NULL);
+ g_option_group_set_parse_hooks (group, pk_debug_pre_parse_hook, pk_debug_post_parse_hook);
+ return group;
+}
+
diff --git a/lib/packagekit-glib2/pk-debug.h b/lib/packagekit-glib2/pk-debug.h
new file mode 100644
index 0000000..d00d044
--- /dev/null
+++ b/lib/packagekit-glib2/pk-debug.h
@@ -0,0 +1,35 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2010 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#if !defined (PK_COMPILATION)
+#error "Can only include this internally!"
+#endif
+
+#ifndef __PK_DEBUG_H__
+#define __PK_DEBUG_H__
+
+#include <glib.h>
+
+gboolean pk_debug_is_verbose (void);
+GOptionGroup *pk_debug_get_option_group (void);
+void pk_debug_setup (gboolean enabled);
+
+#endif /* __PK_DEBUG_H__ */
diff --git a/lib/packagekit-glib2/pk-desktop.c b/lib/packagekit-glib2/pk-desktop.c
index cd14c1c..d94acbb 100644
--- a/lib/packagekit-glib2/pk-desktop.c
+++ b/lib/packagekit-glib2/pk-desktop.c
@@ -33,7 +33,6 @@
#include <sqlite3.h>
#include <packagekit-glib2/pk-desktop.h>
-#include "egg-debug.h"
#include "egg-string.h"
static void pk_desktop_finalize (GObject *object);
@@ -129,7 +128,7 @@ pk_desktop_get_files_for_package (PkDesktop *desktop, const gchar *package, GErr
rc = sqlite3_exec (desktop->priv->db, statement, pk_desktop_sqlite_filename_cb, array, &error_msg);
g_free (statement);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
}
out:
@@ -172,7 +171,7 @@ pk_desktop_get_shown_for_package (PkDesktop *desktop, const gchar *package, GErr
rc = sqlite3_exec (desktop->priv->db, statement, pk_desktop_sqlite_filename_cb, array, &error_msg);
g_free (statement);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
}
out:
@@ -213,7 +212,7 @@ pk_desktop_get_package_for_file (PkDesktop *desktop, const gchar *filename, GErr
rc = sqlite3_exec (desktop->priv->db, statement, pk_desktop_sqlite_package_cb, &package, &error_msg);
g_free (statement);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
}
@@ -253,10 +252,10 @@ pk_desktop_open_database (PkDesktop *desktop, GError **error)
return FALSE;
}
- egg_debug ("trying to open database '%s'", PK_DESKTOP_DEFAULT_DATABASE);
+ g_debug ("trying to open database '%s'", PK_DESKTOP_DEFAULT_DATABASE);
rc = sqlite3_open (PK_DESKTOP_DEFAULT_DATABASE, &desktop->priv->db);
if (rc != 0) {
- egg_warning ("Can't open database: %s\n", sqlite3_errmsg (desktop->priv->db));
+ g_warning ("Can't open database: %s\n", sqlite3_errmsg (desktop->priv->db));
g_set_error (error, 1, 0, "can't open database: %s", sqlite3_errmsg (desktop->priv->db));
sqlite3_close (desktop->priv->db);
desktop->priv->db = NULL;
diff --git a/lib/packagekit-glib2/pk-details.c b/lib/packagekit-glib2/pk-details.c
index 2a38db5..a107dbe 100644
--- a/lib/packagekit-glib2/pk-details.c
+++ b/lib/packagekit-glib2/pk-details.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-details.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_details_finalize (GObject *object);
#define PK_DETAILS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_DETAILS, PkDetailsPrivate))
diff --git a/lib/packagekit-glib2/pk-distro-upgrade.c b/lib/packagekit-glib2/pk-distro-upgrade.c
index 4aff032..ad641ed 100644
--- a/lib/packagekit-glib2/pk-distro-upgrade.c
+++ b/lib/packagekit-glib2/pk-distro-upgrade.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-distro-upgrade.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_distro_upgrade_finalize (GObject *object);
#define PK_DISTRO_UPGRADE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_DISTRO_UPGRADE, PkDistroUpgradePrivate))
diff --git a/lib/packagekit-glib2/pk-enum.c b/lib/packagekit-glib2/pk-enum.c
index c1bcb60..42983f6 100644
--- a/lib/packagekit-glib2/pk-enum.c
+++ b/lib/packagekit-glib2/pk-enum.c
@@ -31,7 +31,6 @@
#include <string.h>
#include <glib.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include <packagekit-glib2/pk-common.h>
diff --git a/lib/packagekit-glib2/pk-error.c b/lib/packagekit-glib2/pk-error.c
index 284a7e9..bd4301f 100644
--- a/lib/packagekit-glib2/pk-error.c
+++ b/lib/packagekit-glib2/pk-error.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-error.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_error_finalize (GObject *object);
#define PK_ERROR_CODE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_ERROR_CODE, PkErrorPrivate))
diff --git a/lib/packagekit-glib2/pk-eula-required.c b/lib/packagekit-glib2/pk-eula-required.c
index 8adb764..0c636b3 100644
--- a/lib/packagekit-glib2/pk-eula-required.c
+++ b/lib/packagekit-glib2/pk-eula-required.c
@@ -34,8 +34,6 @@
#include <packagekit-glib2/pk-eula-required.h>
-#include "egg-debug.h"
-
static void pk_eula_required_finalize (GObject *object);
#define PK_EULA_REQUIRED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_EULA_REQUIRED, PkEulaRequiredPrivate))
diff --git a/lib/packagekit-glib2/pk-files.c b/lib/packagekit-glib2/pk-files.c
index 3061990..1edb4dc 100644
--- a/lib/packagekit-glib2/pk-files.c
+++ b/lib/packagekit-glib2/pk-files.c
@@ -34,8 +34,6 @@
#include <packagekit-glib2/pk-files.h>
-#include "egg-debug.h"
-
static void pk_files_finalize (GObject *object);
#define PK_FILES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_FILES, PkFilesPrivate))
diff --git a/lib/packagekit-glib2/pk-media-change-required.c b/lib/packagekit-glib2/pk-media-change-required.c
index 8a694f7..f816264 100644
--- a/lib/packagekit-glib2/pk-media-change-required.c
+++ b/lib/packagekit-glib2/pk-media-change-required.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-media-change-required.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_media_change_required_finalize (GObject *object);
#define PK_MEDIA_CHANGE_REQUIRED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_MEDIA_CHANGE_REQUIRED, PkMediaChangeRequiredPrivate))
diff --git a/lib/packagekit-glib2/pk-message.c b/lib/packagekit-glib2/pk-message.c
index e3286f1..17d1a4f 100644
--- a/lib/packagekit-glib2/pk-message.c
+++ b/lib/packagekit-glib2/pk-message.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-message.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_message_finalize (GObject *object);
#define PK_MESSAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_MESSAGE, PkMessagePrivate))
diff --git a/lib/packagekit-glib2/pk-package-id.c b/lib/packagekit-glib2/pk-package-id.c
index adebac5..7ffc10a 100644
--- a/lib/packagekit-glib2/pk-package-id.c
+++ b/lib/packagekit-glib2/pk-package-id.c
@@ -26,8 +26,6 @@
#include "config.h"
-#include "egg-debug.h"
-
#include <glib.h>
#include <packagekit-glib2/pk-package-id.h>
@@ -85,7 +83,7 @@ pk_package_id_check (const gchar *package_id)
/* UTF8 */
ret = g_utf8_validate (package_id, -1, NULL);
if (!ret) {
- egg_warning ("invalid UTF8!");
+ g_warning ("invalid UTF8!");
return FALSE;
}
diff --git a/lib/packagekit-glib2/pk-package-ids.c b/lib/packagekit-glib2/pk-package-ids.c
index 4ca3a7f..9234267 100644
--- a/lib/packagekit-glib2/pk-package-ids.c
+++ b/lib/packagekit-glib2/pk-package-ids.c
@@ -32,8 +32,6 @@
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-package-ids.h>
-#include "egg-debug.h"
-
/**
* pk_package_ids_from_id:
* @package_id: A single package_id
diff --git a/lib/packagekit-glib2/pk-package-sack-sync.c b/lib/packagekit-glib2/pk-package-sack-sync.c
index 5e42876..3fd9c94 100644
--- a/lib/packagekit-glib2/pk-package-sack-sync.c
+++ b/lib/packagekit-glib2/pk-package-sack-sync.c
@@ -27,8 +27,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-package-sack.h>
-#include "egg-debug.h"
-
#include "pk-package-sack-sync.h"
/* tiny helper to help us do the async operation */
diff --git a/lib/packagekit-glib2/pk-package-sack.c b/lib/packagekit-glib2/pk-package-sack.c
index 9b9d837..3288544 100644
--- a/lib/packagekit-glib2/pk-package-sack.c
+++ b/lib/packagekit-glib2/pk-package-sack.c
@@ -40,8 +40,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-package-id.h>
-#include "egg-debug.h"
-
static void pk_package_sack_finalize (GObject *object);
#define PK_PACKAGE_SACK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_PACKAGE_SACK, PkPackageSackPrivate))
@@ -610,7 +608,7 @@ pk_package_sack_resolve_cb (GObject *source_object, GAsyncResult *res, PkPackage
/* get the results */
results = pk_client_generic_finish (client, res, &error);
if (results == NULL) {
- egg_warning ("failed to resolve: %s", error->message);
+ g_warning ("failed to resolve: %s", error->message);
pk_package_sack_merge_bool_state_finish (state, error);
g_error_free (error);
goto out;
@@ -619,7 +617,7 @@ pk_package_sack_resolve_cb (GObject *source_object, GAsyncResult *res, PkPackage
/* get the packages */
packages = pk_results_get_package_array (results);
if (packages->len == 0) {
- egg_warning ("%i", state->ret);
+ g_warning ("%i", state->ret);
error = g_error_new (1, 0, "no packages found!");
pk_package_sack_merge_bool_state_finish (state, error);
g_error_free (error);
@@ -638,7 +636,7 @@ pk_package_sack_resolve_cb (GObject *source_object, GAsyncResult *res, PkPackage
/* get package, and set data */
package = pk_package_sack_find_by_id (state->sack, package_id);
if (package == NULL) {
- egg_warning ("failed to find %s", package_id);
+ g_warning ("failed to find %s", package_id);
goto skip;
}
@@ -764,7 +762,7 @@ pk_package_sack_get_details_cb (GObject *source_object, GAsyncResult *res, PkPac
/* get the results */
results = pk_client_generic_finish (client, res, &error);
if (results == NULL) {
- egg_warning ("failed to details: %s", error->message);
+ g_warning ("failed to details: %s", error->message);
pk_package_sack_merge_bool_state_finish (state, error);
g_error_free (error);
goto out;
@@ -795,7 +793,7 @@ pk_package_sack_get_details_cb (GObject *source_object, GAsyncResult *res, PkPac
/* get package, and set data */
package = pk_package_sack_find_by_id (state->sack, package_id);
if (package == NULL) {
- egg_warning ("failed to find %s", package_id);
+ g_warning ("failed to find %s", package_id);
goto skip;
}
@@ -902,7 +900,7 @@ pk_package_sack_get_update_detail_cb (GObject *source_object, GAsyncResult *res,
/* get the results */
results = pk_client_generic_finish (client, res, &error);
if (results == NULL) {
- egg_warning ("failed to update_detail: %s", error->message);
+ g_warning ("failed to update_detail: %s", error->message);
pk_package_sack_merge_bool_state_finish (state, error);
g_error_free (error);
goto out;
@@ -938,7 +936,7 @@ pk_package_sack_get_update_detail_cb (GObject *source_object, GAsyncResult *res,
/* get package, and set data */
package = pk_package_sack_find_by_id (state->sack, package_id);
if (package == NULL) {
- egg_warning ("failed to find %s", package_id);
+ g_warning ("failed to find %s", package_id);
goto skip;
}
diff --git a/lib/packagekit-glib2/pk-package.c b/lib/packagekit-glib2/pk-package.c
index d2d9341..f797bc8 100644
--- a/lib/packagekit-glib2/pk-package.c
+++ b/lib/packagekit-glib2/pk-package.c
@@ -37,8 +37,6 @@
#include <packagekit-glib2/pk-enum.h>
#include <packagekit-glib2/pk-package-id.h>
-#include "egg-debug.h"
-
static void pk_package_finalize (GObject *object);
#define PK_PACKAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_PACKAGE, PkPackagePrivate))
diff --git a/lib/packagekit-glib2/pk-progress-bar.c b/lib/packagekit-glib2/pk-progress-bar.c
index 2124fcc..c1c9aeb 100644
--- a/lib/packagekit-glib2/pk-progress-bar.c
+++ b/lib/packagekit-glib2/pk-progress-bar.c
@@ -24,8 +24,6 @@
#include "pk-progress-bar.h"
-#include "egg-debug.h"
-
#define PK_PROGRESS_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_PROGRESS_BAR, PkProgressBarPrivate))
typedef struct {
@@ -174,7 +172,7 @@ pk_progress_bar_set_percentage (PkProgressBar *self, gint percentage)
/* check for old percentage */
if (percentage == self->priv->percentage) {
- egg_debug ("skipping as the same");
+ g_debug ("skipping as the same");
goto out;
}
diff --git a/lib/packagekit-glib2/pk-progress.c b/lib/packagekit-glib2/pk-progress.c
index 532c94b..282cb38 100644
--- a/lib/packagekit-glib2/pk-progress.c
+++ b/lib/packagekit-glib2/pk-progress.c
@@ -33,8 +33,6 @@
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-progress.h>
-#include "egg-debug.h"
-
static void pk_progress_finalize (GObject *object);
#define PK_PROGRESS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_PROGRESS, PkProgressPrivate))
@@ -152,14 +150,14 @@ pk_progress_set_package_id (PkProgress *progress, const gchar *package_id)
/* valid? */
if (!pk_package_id_check (package_id)) {
- egg_warning ("invalid package_id %s", package_id);
+ g_warning ("invalid package_id %s", package_id);
return FALSE;
}
/* new value */
g_free (progress->priv->package_id);
progress->priv->package_id = g_strdup (package_id);
- egg_debug ("package_id now %s", package_id);
+ g_debug ("package_id now %s", package_id);
g_object_notify (G_OBJECT(progress), "package-id");
return TRUE;
@@ -183,7 +181,7 @@ pk_progress_set_transaction_id (PkProgress *progress, const gchar *transaction_i
/* new value */
g_free (progress->priv->transaction_id);
progress->priv->transaction_id = g_strdup (transaction_id);
- egg_debug ("transaction_id now %s", transaction_id);
+ g_debug ("transaction_id now %s", transaction_id);
g_object_notify (G_OBJECT(progress), "transaction-id");
return TRUE;
@@ -205,7 +203,7 @@ pk_progress_set_percentage (PkProgress *progress, gint percentage)
/* new value */
progress->priv->percentage = percentage;
- egg_debug ("percentage now %i", percentage);
+ g_debug ("percentage now %i", percentage);
g_object_notify (G_OBJECT(progress), "percentage");
return TRUE;
@@ -227,7 +225,7 @@ pk_progress_set_subpercentage (PkProgress *progress, gint subpercentage)
/* new value */
progress->priv->subpercentage = subpercentage;
- egg_debug ("subpercentage now %i", subpercentage);
+ g_debug ("subpercentage now %i", subpercentage);
g_object_notify (G_OBJECT(progress), "subpercentage");
return TRUE;
@@ -249,7 +247,7 @@ pk_progress_set_status (PkProgress *progress, PkStatusEnum status)
/* new value */
progress->priv->status = status;
- egg_debug ("status now %s", pk_status_enum_to_string (status));
+ g_debug ("status now %s", pk_status_enum_to_string (status));
g_object_notify (G_OBJECT(progress), "status");
return TRUE;
@@ -271,7 +269,7 @@ pk_progress_set_role (PkProgress *progress, PkRoleEnum role)
/* new value */
progress->priv->role = role;
- egg_debug ("role now %s", pk_role_enum_to_string (role));
+ g_debug ("role now %s", pk_role_enum_to_string (role));
g_object_notify (G_OBJECT(progress), "role");
return TRUE;
@@ -293,7 +291,7 @@ pk_progress_set_allow_cancel (PkProgress *progress, gboolean allow_cancel)
/* new value */
progress->priv->allow_cancel = allow_cancel;
- egg_debug ("allow-cancel now %i", allow_cancel);
+ g_debug ("allow-cancel now %i", allow_cancel);
g_object_notify (G_OBJECT(progress), "allow-cancel");
return TRUE;
@@ -315,7 +313,7 @@ pk_progress_set_caller_active (PkProgress *progress, gboolean caller_active)
/* new value */
progress->priv->caller_active = caller_active;
- egg_debug ("caller-active now %i", caller_active);
+ g_debug ("caller-active now %i", caller_active);
g_object_notify (G_OBJECT(progress), "caller-active");
return TRUE;
@@ -337,7 +335,7 @@ pk_progress_set_elapsed_time (PkProgress *progress, guint elapsed_time)
/* new value */
progress->priv->elapsed_time = elapsed_time;
- egg_debug ("elapsed time now %i", elapsed_time);
+ g_debug ("elapsed time now %i", elapsed_time);
g_object_notify (G_OBJECT(progress), "elapsed-time");
return TRUE;
@@ -359,7 +357,7 @@ pk_progress_set_remaining_time (PkProgress *progress, guint remaining_time)
/* new value */
progress->priv->remaining_time = remaining_time;
- egg_debug ("remaining time now %i", remaining_time);
+ g_debug ("remaining time now %i", remaining_time);
g_object_notify (G_OBJECT(progress), "remaining-time");
return TRUE;
@@ -381,7 +379,7 @@ pk_progress_set_speed (PkProgress *progress, guint speed)
/* new value */
progress->priv->speed = speed;
- egg_debug ("speed now %i", speed);
+ g_debug ("speed now %i", speed);
g_object_notify (G_OBJECT(progress), "speed");
return TRUE;
@@ -403,7 +401,7 @@ pk_progress_set_uid (PkProgress *progress, guint uid)
/* new value */
progress->priv->uid = uid;
- egg_debug ("uid now %i", uid);
+ g_debug ("uid now %i", uid);
g_object_notify (G_OBJECT(progress), "uid");
return TRUE;
@@ -427,7 +425,7 @@ pk_progress_set_package (PkProgress *progress, PkPackage *package)
if (progress->priv->package != NULL)
g_object_unref (progress->priv->package);
progress->priv->package = g_object_ref (package);
- egg_debug ("package now %p", package);
+ g_debug ("package now %p", package);
g_object_notify (G_OBJECT(progress), "package");
return TRUE;
diff --git a/lib/packagekit-glib2/pk-repo-detail.c b/lib/packagekit-glib2/pk-repo-detail.c
index af22127..71c2f84 100644
--- a/lib/packagekit-glib2/pk-repo-detail.c
+++ b/lib/packagekit-glib2/pk-repo-detail.c
@@ -34,8 +34,6 @@
#include <packagekit-glib2/pk-repo-detail.h>
-#include "egg-debug.h"
-
static void pk_repo_detail_finalize (GObject *object);
#define PK_REPO_DETAIL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_REPO_DETAIL, PkRepoDetailPrivate))
diff --git a/lib/packagekit-glib2/pk-repo-signature-required.c b/lib/packagekit-glib2/pk-repo-signature-required.c
index 2518923..b88dc6a 100644
--- a/lib/packagekit-glib2/pk-repo-signature-required.c
+++ b/lib/packagekit-glib2/pk-repo-signature-required.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-repo-signature-required.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_repo_signature_required_finalize (GObject *object);
#define PK_REPO_SIGNATURE_REQUIRED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_REPO_SIGNATURE_REQUIRED, PkRepoSignatureRequiredPrivate))
diff --git a/lib/packagekit-glib2/pk-require-restart.c b/lib/packagekit-glib2/pk-require-restart.c
index 8acbd23..f3f47e4 100644
--- a/lib/packagekit-glib2/pk-require-restart.c
+++ b/lib/packagekit-glib2/pk-require-restart.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-require-restart.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_require_restart_finalize (GObject *object);
#define PK_REQUIRE_RESTART_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_REQUIRE_RESTART, PkRequireRestartPrivate))
diff --git a/lib/packagekit-glib2/pk-results.c b/lib/packagekit-glib2/pk-results.c
index d9c2549..a4cb38d 100644
--- a/lib/packagekit-glib2/pk-results.c
+++ b/lib/packagekit-glib2/pk-results.c
@@ -36,8 +36,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_results_finalize (GObject *object);
#define PK_RESULTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_RESULTS, PkResultsPrivate))
@@ -178,7 +176,7 @@ pk_results_add_package (PkResults *results, PkPackage *item)
"info", &info,
NULL);
if (info == PK_INFO_ENUM_FINISHED) {
- egg_warning ("internal error: finished packages cannot be added to a PkResults object");
+ g_warning ("internal error: finished packages cannot be added to a PkResults object");
return FALSE;
}
@@ -525,7 +523,7 @@ pk_results_get_error_code (PkResults *results)
/* failed, but no exit code? */
if (results->priv->error_code == NULL && results->priv->exit_enum != PK_EXIT_ENUM_SUCCESS)
- egg_warning ("internal error: failed, but no exit code: %s", pk_exit_enum_to_string (results->priv->exit_enum));
+ g_warning ("internal error: failed, but no exit code: %s", pk_exit_enum_to_string (results->priv->exit_enum));
if (results->priv->error_code == NULL)
return NULL;
diff --git a/lib/packagekit-glib2/pk-self-test.c b/lib/packagekit-glib2/pk-self-test.c
index 08fd7f3..4605e76 100644
--- a/lib/packagekit-glib2/pk-self-test.c
+++ b/lib/packagekit-glib2/pk-self-test.c
@@ -23,7 +23,6 @@
#include <glib-object.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-catalog.h"
@@ -258,7 +257,7 @@ pk_test_catalog_lookup_cb (GObject *object, GAsyncResult *res, gpointer user_dat
/* list for shits and giggles */
for (i=0; i<array->len; i++) {
package = g_ptr_array_index (array, i);
- egg_debug ("%i\t%s", i, pk_package_get_id (package));
+ g_debug ("%i\t%s", i, pk_package_get_id (package));
}
g_ptr_array_unref (array);
_g_test_loop_quit ();
@@ -272,7 +271,7 @@ pk_test_catalog_progress_cb (PkProgress *progress, PkProgressType type, gpointer
g_object_get (progress,
"status", &status,
NULL);
- egg_debug ("now %s", pk_status_enum_to_string (status));
+ g_debug ("now %s", pk_status_enum_to_string (status));
}
}
@@ -289,7 +288,7 @@ pk_test_catalog_func (void)
(PkProgressCallback) pk_test_catalog_progress_cb, NULL,
(GAsyncReadyCallback) pk_test_catalog_lookup_cb, NULL);
_g_test_loop_run_with_timeout (150000);
- egg_debug ("resolvd, searched, etc. in %f", g_test_timer_elapsed ());
+ g_debug ("resolvd, searched, etc. in %f", g_test_timer_elapsed ());
g_object_unref (catalog);
}
@@ -322,7 +321,7 @@ pk_test_client_resolve_cb (GObject *object, GAsyncResult *res, gpointer user_dat
g_ptr_array_unref (packages);
- egg_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
+ g_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
g_object_unref (results);
_g_test_loop_quit ();
@@ -351,7 +350,7 @@ pk_test_client_get_details_cb (GObject *object, GAsyncResult *res, gpointer user
g_ptr_array_unref (details);
- egg_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
+ g_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
g_object_unref (results);
_g_test_loop_quit ();
@@ -384,7 +383,7 @@ pk_test_client_get_updates_cb (GObject *object, GAsyncResult *res, gpointer user
g_object_unref (sack);
- egg_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
+ g_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
g_object_unref (results);
_g_test_loop_quit ();
@@ -463,7 +462,7 @@ pk_test_client_progress_cb (PkProgress *progress, PkProgressType type, gpointer
static gboolean
pk_test_client_cancel_cb (GCancellable *cancellable)
{
- egg_warning ("cancelling method");
+ g_warning ("cancelling method");
g_cancellable_cancel (cancellable);
return FALSE;
}
@@ -525,7 +524,7 @@ pk_test_client_notify_idle_cb (PkClient *client, GParamSpec *pspec, gpointer use
{
gboolean idle;
g_object_get (client, "idle", &idle, NULL);
- egg_debug ("idle=%i", idle);
+ g_debug ("idle=%i", idle);
}
static void
@@ -591,7 +590,7 @@ pk_test_client_func (void)
(GAsyncReadyCallback) pk_test_client_resolve_cb, NULL);
g_strfreev (package_ids);
_g_test_loop_run_with_timeout (15000);
- egg_debug ("resolved in %f", g_test_timer_elapsed ());
+ g_debug ("resolved in %f", g_test_timer_elapsed ());
/* check idle */
g_object_get (client, "idle", &ret, NULL);
@@ -607,7 +606,7 @@ pk_test_client_func (void)
g_assert_cmpstr (tid, ==, _tid);
g_assert_cmpint (role, ==, PK_ROLE_ENUM_RESOLVE);
g_assert_cmpint (status, ==, PK_STATUS_ENUM_FINISHED);
- egg_debug ("got progress in %f", g_test_timer_elapsed ());
+ g_debug ("got progress in %f", g_test_timer_elapsed ());
g_object_unref (progress);
g_free (tid);
g_free (_tid);
@@ -628,7 +627,7 @@ pk_test_client_func (void)
(GAsyncReadyCallback) pk_test_client_get_details_cb, NULL);
g_strfreev (package_ids);
_g_test_loop_run_with_timeout (15000);
- egg_debug ("resolved in %f", g_test_timer_elapsed ());
+ g_debug ("resolved in %f", g_test_timer_elapsed ());
/* got updates */
g_assert_cmpint (_progress_cb, >, 0);
@@ -644,7 +643,7 @@ pk_test_client_func (void)
(PkProgressCallback) pk_test_client_progress_cb, NULL,
(GAsyncReadyCallback) pk_test_client_get_updates_cb, NULL);
_g_test_loop_run_with_timeout (15000);
- egg_debug ("got updates in %f", g_test_timer_elapsed ());
+ g_debug ("got updates in %f", g_test_timer_elapsed ());
/* it takes more than 50ms to get the progress of the transaction, and if
* getting updates from internal cache, then it'll take a shed load less
@@ -662,7 +661,7 @@ pk_test_client_func (void)
(GAsyncReadyCallback) pk_test_client_search_name_cb, NULL);
g_timeout_add (1000, (GSourceFunc) pk_test_client_cancel_cb, cancellable);
_g_test_loop_run_with_timeout (15000);
- egg_debug ("cancelled in %f", g_test_timer_elapsed ());
+ g_debug ("cancelled in %f", g_test_timer_elapsed ());
/* ensure we abort with error if we cancel */
pk_client_search_names_async (client, pk_bitfield_value (PK_FILTER_ENUM_NONE), values, cancellable,
@@ -682,7 +681,7 @@ pk_test_client_func (void)
(GAsyncReadyCallback) pk_test_client_download_cb, NULL);
g_strfreev (package_ids);
_g_test_loop_run_with_timeout (15000);
- egg_debug ("downloaded and copied in %f", g_test_timer_elapsed ());
+ g_debug ("downloaded and copied in %f", g_test_timer_elapsed ());
/* test recursive signal handling */
#if 0
@@ -772,7 +771,7 @@ pk_test_control_get_tid_cb (GObject *object, GAsyncResult *res, gpointer user_da
g_assert_no_error (error);
g_assert (tid != NULL);
- egg_debug ("tid = %s", tid);
+ g_debug ("tid = %s", tid);
g_free (tid);
if (--_refcount == 0)
_g_test_loop_quit ();
@@ -824,7 +823,7 @@ pk_test_control_get_properties_cb (GObject *object, GAsyncResult *res, gpointer
/* check groups */
text = pk_group_bitfield_to_string (groups);
g_assert_cmpstr (text, ==, "accessibility;games;system");
- egg_debug ("groups = %s", text);
+ g_debug ("groups = %s", text);
g_free (text);
@@ -882,51 +881,51 @@ pk_test_control_func (void)
_refcount = 1;
pk_control_get_tid_async (control, NULL, (GAsyncReadyCallback) pk_test_control_get_tid_cb, NULL);
_g_test_loop_run_with_timeout (5000);
- egg_debug ("got tid in %f", g_test_timer_elapsed ());
+ g_debug ("got tid in %f", g_test_timer_elapsed ());
/* get multiple TIDs async */
_refcount = LOOP_SIZE;
for (i=0; i<_refcount; i++) {
- egg_debug ("getting #%i", i+1);
+ g_debug ("getting #%i", i+1);
pk_control_get_tid_async (control, NULL, (GAsyncReadyCallback) pk_test_control_get_tid_cb, NULL);
}
_g_test_loop_run_with_timeout (5000);
- egg_debug ("got %i tids in %f", LOOP_SIZE, g_test_timer_elapsed ());
+ g_debug ("got %i tids in %f", LOOP_SIZE, g_test_timer_elapsed ());
/* get properties async */
_refcount = 1;
pk_control_get_properties_async (control, NULL, (GAsyncReadyCallback) pk_test_control_get_properties_cb, NULL);
_g_test_loop_run_with_timeout (5000);
- egg_debug ("got properties types in %f", g_test_timer_elapsed ());
+ g_debug ("got properties types in %f", g_test_timer_elapsed ());
/* get properties async (again, to test caching) */
_refcount = 1;
pk_control_get_properties_async (control, NULL, (GAsyncReadyCallback) pk_test_control_get_properties_cb, NULL);
_g_test_loop_run_with_timeout (5000);
- egg_debug ("got properties in %f", g_test_timer_elapsed ());
+ g_debug ("got properties in %f", g_test_timer_elapsed ());
/* do multiple requests async */
_refcount = LOOP_SIZE * 4;
for (i=0; i<_refcount; i++) {
- egg_debug ("getting #%i", i+1);
+ g_debug ("getting #%i", i+1);
pk_control_get_tid_async (control, NULL, (GAsyncReadyCallback) pk_test_control_get_tid_cb, NULL);
pk_control_get_properties_async (control, NULL, (GAsyncReadyCallback) pk_test_control_get_properties_cb, NULL);
pk_control_get_tid_async (control, NULL, (GAsyncReadyCallback) pk_test_control_get_tid_cb, NULL);
pk_control_get_properties_async (control, NULL, (GAsyncReadyCallback) pk_test_control_get_properties_cb, NULL);
}
_g_test_loop_run_with_timeout (5000);
- egg_debug ("got %i 2*properties and 2*tids in %f", LOOP_SIZE, g_test_timer_elapsed ());
+ g_debug ("got %i 2*properties and 2*tids in %f", LOOP_SIZE, g_test_timer_elapsed ());
/* get time since async */
pk_control_get_time_since_action_async (control, PK_ROLE_ENUM_GET_UPDATES, NULL, (GAsyncReadyCallback) pk_test_control_get_time_since_action_cb, NULL);
_g_test_loop_run_with_timeout (5000);
- egg_debug ("got get time since in %f", g_test_timer_elapsed ());
+ g_debug ("got get time since in %f", g_test_timer_elapsed ());
/* get auth state async */
pk_control_can_authorize_async (control, "org.freedesktop.packagekit.system-update", NULL,
(GAsyncReadyCallback) pk_test_control_can_authorize_cb, NULL);
_g_test_loop_run_with_timeout (5000);
- egg_debug ("get auth state in %f", g_test_timer_elapsed ());
+ g_debug ("get auth state in %f", g_test_timer_elapsed ());
/* version major */
g_object_get (control, "version-major", &version, NULL);
@@ -982,7 +981,7 @@ pk_test_desktop_func (void)
/* file does not exist */
ret = g_file_test (PK_DESKTOP_DEFAULT_DATABASE, G_FILE_TEST_EXISTS);
if (!ret) {
- egg_warning ("skipping checks as database does not exist");
+ g_warning ("skipping checks as database does not exist");
goto out;
}
@@ -996,7 +995,7 @@ pk_test_desktop_func (void)
/* dummy, not yum */
if (g_strcmp0 (package, "vips-doc") == 0); {
- egg_debug ("created db with dummy, skipping remaining tests");
+ g_debug ("created db with dummy, skipping remaining tests");
goto out;
}
g_assert_cmpstr (package, ==, "gnome-packagekit");
@@ -1350,7 +1349,7 @@ pk_test_package_sack_func (void)
/* merge resolve results */
pk_package_sack_resolve_async (sack, NULL, NULL, NULL, (GAsyncReadyCallback) pk_test_package_sack_resolve_cb, NULL);
_g_test_loop_run_with_timeout (5000);
- egg_debug ("resolved in %f", g_test_timer_elapsed ());
+ g_debug ("resolved in %f", g_test_timer_elapsed ());
/* find package which is present */
package = pk_package_sack_find_by_id (sack, "powertop;1.8-1.fc8;i386;fedora");
@@ -1372,7 +1371,7 @@ pk_test_package_sack_func (void)
/* merge details results */
pk_package_sack_get_details_async (sack, NULL, NULL, NULL, (GAsyncReadyCallback) pk_test_package_sack_details_cb, NULL);
_g_test_loop_run_with_timeout (5000);
- egg_debug ("got details in %f", g_test_timer_elapsed ());
+ g_debug ("got details in %f", g_test_timer_elapsed ());
/* find package which is present */
package = pk_package_sack_find_by_id (sack, "powertop;1.8-1.fc8;i386;fedora");
@@ -1389,7 +1388,7 @@ pk_test_package_sack_func (void)
/* merge update detail results */
pk_package_sack_get_update_detail_async (sack, NULL, NULL, NULL, (GAsyncReadyCallback) pk_test_package_sack_update_detail_cb, NULL);
_g_test_loop_run_with_timeout (5000);
- egg_debug ("got update detail in %f", g_test_timer_elapsed ());
+ g_debug ("got update detail in %f", g_test_timer_elapsed ());
/* find package which is present */
package = pk_package_sack_find_by_id (sack, "powertop;1.8-1.fc8;i386;fedora");
@@ -1557,7 +1556,7 @@ pk_test_service_pack_progress_cb (PkProgress *progress, PkProgressType type, gpo
g_object_get (progress,
"status", &status,
NULL);
- egg_debug ("now %s", pk_status_enum_to_string (status));
+ g_debug ("now %s", pk_status_enum_to_string (status));
}
}
@@ -1577,7 +1576,7 @@ pk_test_service_pack_func (void)
(GAsyncReadyCallback) pk_test_service_pack_create_cb, NULL);
g_strfreev (package_ids);
_g_test_loop_run_with_timeout (150000);
- egg_debug ("installed in %f", g_test_timer_elapsed ());
+ g_debug ("installed in %f", g_test_timer_elapsed ());
g_object_unref (pack);
}
@@ -1608,7 +1607,7 @@ pk_test_task_progress_cb (PkProgress *progress, PkProgressType type, gpointer us
g_object_get (progress,
"status", &status,
NULL);
- egg_debug ("now %s", pk_status_enum_to_string (status));
+ g_debug ("now %s", pk_status_enum_to_string (status));
}
}
@@ -1628,7 +1627,7 @@ pk_test_task_func (void)
(GAsyncReadyCallback) pk_test_task_install_packages_cb, NULL);
g_strfreev (package_ids);
_g_test_loop_run_with_timeout (150000);
- egg_debug ("installed in %f", g_test_timer_elapsed ());
+ g_debug ("installed in %f", g_test_timer_elapsed ());
g_object_unref (task);
}
@@ -1656,7 +1655,7 @@ pk_test_task_text_install_packages_cb (GObject *object, GAsyncResult *res, gpoin
g_ptr_array_unref (packages);
- egg_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
+ g_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
if (results != NULL)
g_object_unref (results);
@@ -1671,7 +1670,7 @@ pk_test_task_text_progress_cb (PkProgress *progress, PkProgressType type, gpoint
g_object_get (progress,
"status", &status,
NULL);
- egg_debug ("now %s", pk_status_enum_to_string (status));
+ g_debug ("now %s", pk_status_enum_to_string (status));
}
}
@@ -1697,7 +1696,7 @@ pk_test_task_text_func (void)
(GAsyncReadyCallback) pk_test_task_text_install_packages_cb, NULL);
g_strfreev (package_ids);
_g_test_loop_run_with_timeout (150000);
- egg_debug ("installed in %f", g_test_timer_elapsed ());
+ g_debug ("installed in %f", g_test_timer_elapsed ());
g_object_unref (task);
}
@@ -1725,7 +1724,7 @@ pk_test_task_wrapper_install_packages_cb (GObject *object, GAsyncResult *res, gp
g_ptr_array_unref (packages);
- egg_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
+ g_debug ("results exit enum = %s", pk_exit_enum_to_string (exit_enum));
if (results != NULL)
g_object_unref (results);
@@ -1740,7 +1739,7 @@ pk_test_task_wrapper_progress_cb (PkProgress *progress, PkProgressType type, gpo
g_object_get (progress,
"status", &status,
NULL);
- egg_debug ("now %s", pk_status_enum_to_string (status));
+ g_debug ("now %s", pk_status_enum_to_string (status));
}
}
@@ -1760,7 +1759,7 @@ pk_test_task_wrapper_func (void)
(GAsyncReadyCallback) pk_test_task_wrapper_install_packages_cb, NULL);
g_strfreev (package_ids);
_g_test_loop_run_with_timeout (150000);
- egg_debug ("installed in %f", g_test_timer_elapsed ());
+ g_debug ("installed in %f", g_test_timer_elapsed ());
g_object_unref (task);
}
@@ -1794,14 +1793,14 @@ pk_test_transaction_list_resolve_cb (GObject *object, GAsyncResult *res, gpointe
static void
pk_test_transaction_list_added_cb (PkTransactionList *tlist, const gchar *tid, gpointer user_data)
{
- egg_debug ("added %s", tid);
+ g_debug ("added %s", tid);
_added++;
}
static void
pk_test_transaction_list_removed_cb (PkTransactionList *tlist, const gchar *tid, gpointer user_data)
{
- egg_debug ("removed %s", tid);
+ g_debug ("removed %s", tid);
_removed++;
}
@@ -1840,12 +1839,12 @@ pk_test_transaction_list_func (void)
(GAsyncReadyCallback) pk_test_transaction_list_resolve_cb, NULL);
g_strfreev (package_ids);
_g_test_loop_run_with_timeout (15000);
- egg_debug ("resolved in %f", g_test_timer_elapsed ());
+ g_debug ("resolved in %f", g_test_timer_elapsed ());
/* wait for remove */
g_timeout_add (100, (GSourceFunc) pk_transaction_list_delay_cb, NULL);
_g_test_loop_run_with_timeout (15000);
- egg_debug ("resolved in %f", g_test_timer_elapsed ());
+ g_debug ("resolved in %f", g_test_timer_elapsed ());
/* correct number of added signals */
g_assert_cmpint (_added, ==, 2);
@@ -1911,7 +1910,7 @@ main (int argc, char **argv)
{
g_type_init ();
- egg_debug_init (&argc, &argv);
+ g_debug_init (&argc, &argv);
g_test_init (&argc, &argv, NULL);
/* tests go here */
diff --git a/lib/packagekit-glib2/pk-service-pack.c b/lib/packagekit-glib2/pk-service-pack.c
index e09c2fa..4d4a626 100644
--- a/lib/packagekit-glib2/pk-service-pack.c
+++ b/lib/packagekit-glib2/pk-service-pack.c
@@ -50,7 +50,6 @@
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-package-ids.h>
-#include "egg-debug.h"
#include "egg-string.h"
#define PK_SERVICE_PACK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_SERVICE_PACK, PkServicePackPrivate))
@@ -274,7 +273,7 @@ out:
/* switch back to PWD */
retval = chdir (buf);
if (retval != 0)
- egg_warning ("cannot chdir back!");
+ g_warning ("cannot chdir back!");
return ret;
}
@@ -475,7 +474,7 @@ pk_service_pack_create_metadata_file (PkServicePackState *state, const gchar *fi
/* convert to text */
data = g_key_file_to_data (file, NULL, &error);
if (data == NULL) {
- egg_warning ("failed to convert to text: %s", error->message);
+ g_warning ("failed to convert to text: %s", error->message);
g_error_free (error);
goto out;
}
@@ -483,7 +482,7 @@ pk_service_pack_create_metadata_file (PkServicePackState *state, const gchar *fi
/* save contents */
ret = g_file_set_contents (filename, data, -1, &error);
if (!ret) {
- egg_warning ("failed to save file: %s", error->message);
+ g_warning ("failed to save file: %s", error->message);
g_error_free (error);
goto out;
}
@@ -518,7 +517,7 @@ pk_service_pack_archive_add_file (struct archive *arch, const gchar *filename, G
"file not found %s", filename);
goto out;
}
- egg_debug ("stat(%s), size=%lu bytes\n", filename, (glong) st.st_size);
+ g_debug ("stat(%s), size=%lu bytes\n", filename, (glong) st.st_size);
/* create new entry */
entry = archive_entry_new ();
@@ -552,7 +551,7 @@ pk_service_pack_archive_add_file (struct archive *arch, const gchar *filename, G
while (len > 0) {
wrote = archive_write_data (arch, buff, len);
if (wrote != len)
- egg_warning("wrote %i instead of %i\n", wrote, len);
+ g_warning("wrote %i instead of %i\n", wrote, len);
/* ITS4: ignore, buffer statically preallocated */
len = read (fd, buff, sizeof (buff));
}
@@ -674,7 +673,7 @@ pk_service_pack_get_files_from_array (const GPtrArray *array)
/* internal error */
if (array == NULL) {
- egg_warning ("internal error");
+ g_warning ("internal error");
goto out;
}
diff --git a/lib/packagekit-glib2/pk-source.c b/lib/packagekit-glib2/pk-source.c
index 603500d..73830eb 100644
--- a/lib/packagekit-glib2/pk-source.c
+++ b/lib/packagekit-glib2/pk-source.c
@@ -34,8 +34,6 @@
#include <packagekit-glib2/pk-source.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_source_finalize (GObject *object);
#define PK_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_SOURCE, PkSourcePrivate))
diff --git a/lib/packagekit-glib2/pk-task-sync.c b/lib/packagekit-glib2/pk-task-sync.c
index 331b975..d235164 100644
--- a/lib/packagekit-glib2/pk-task-sync.c
+++ b/lib/packagekit-glib2/pk-task-sync.c
@@ -28,8 +28,6 @@
#include <packagekit-glib2/pk-task.h>
#include <packagekit-glib2/pk-progress.h>
-#include "egg-debug.h"
-
#include "pk-task-sync.h"
/* tiny helper to help us do the async operation */
diff --git a/lib/packagekit-glib2/pk-task-text.c b/lib/packagekit-glib2/pk-task-text.c
index 4fbec23..ae91094 100644
--- a/lib/packagekit-glib2/pk-task-text.c
+++ b/lib/packagekit-glib2/pk-task-text.c
@@ -29,8 +29,6 @@
#include <packagekit-glib2/pk-repo-signature-required.h>
#include <packagekit-glib2/pk-task.h>
-#include "egg-debug.h"
-
#include "pk-task-text.h"
#include "pk-console-shared.h"
@@ -366,7 +364,7 @@ pk_task_text_simulate_question (PkTask *task, guint request, PkResults *results)
title = pk_task_text_simulate_question_type_to_string (info);
if (title == NULL) {
title = pk_info_enum_to_string (info);
- egg_warning ("cannot translate '%s', please report!", title);
+ g_warning ("cannot translate '%s', please report!", title);
}
g_print ("%s\n", title);
info_last = info;
diff --git a/lib/packagekit-glib2/pk-task-wrapper.c b/lib/packagekit-glib2/pk-task-wrapper.c
index 91bbb60..ebfb7c6 100644
--- a/lib/packagekit-glib2/pk-task-wrapper.c
+++ b/lib/packagekit-glib2/pk-task-wrapper.c
@@ -25,8 +25,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-package-id.h>
-#include "egg-debug.h"
-
#include "pk-task-wrapper.h"
static void pk_task_wrapper_finalize (GObject *object);
diff --git a/lib/packagekit-glib2/pk-task.c b/lib/packagekit-glib2/pk-task.c
index 099bef4..696c1c5 100644
--- a/lib/packagekit-glib2/pk-task.c
+++ b/lib/packagekit-glib2/pk-task.c
@@ -34,8 +34,6 @@
#include <packagekit-glib2/pk-enum.h>
#include <packagekit-glib2/pk-results.h>
-#include "egg-debug.h"
-
static void pk_task_finalize (GObject *object);
#define PK_TASK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TASK, PkTaskPrivate))
@@ -148,7 +146,7 @@ pk_task_generic_state_finish (PkTaskState *state, const GError *error)
g_simple_async_result_complete_in_idle (state->res);
/* remove from list */
- egg_debug ("remove state %p", state);
+ g_debug ("remove state %p", state);
g_ptr_array_remove (state->task->priv->array, state);
/* deallocate */
@@ -360,7 +358,7 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
"type", &message_type,
NULL);
if (message_type == PK_MESSAGE_ENUM_UNTRUSTED_PACKAGE) {
- egg_debug ("we got an untrusted message, so skipping only-trusted");
+ g_debug ("we got an untrusted message, so skipping only-trusted");
state->only_trusted = FALSE;
break;
}
@@ -393,7 +391,7 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
/* remove all the cleanup and finished packages */
if (info == PK_INFO_ENUM_CLEANUP ||
info == PK_INFO_ENUM_FINISHED) {
- egg_debug ("removing %s", package_id);
+ g_debug ("removing %s", package_id);
g_ptr_array_remove (array, item);
continue;
}
@@ -403,7 +401,7 @@ pk_task_simulate_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskStat
length = g_strv_length (state->package_ids);
for (i=0; i<length; i++) {
if (g_strcmp0 (package_id, state->package_ids[i]) == 0) {
- egg_debug ("removing %s", package_id);
+ g_debug ("removing %s", package_id);
g_ptr_array_remove (array, item);
ret = TRUE;
break;
@@ -452,25 +450,25 @@ pk_task_do_async_simulate_action (PkTaskState *state)
/* do the correct action */
if (state->role == PK_ROLE_ENUM_INSTALL_PACKAGES) {
/* simulate install async */
- egg_debug ("doing install");
+ g_debug ("doing install");
pk_client_simulate_install_packages_async (PK_CLIENT(state->task), state->package_ids,
state->cancellable, state->progress_callback, state->progress_user_data,
(GAsyncReadyCallback) pk_task_simulate_ready_cb, state);
} else if (state->role == PK_ROLE_ENUM_UPDATE_PACKAGES) {
/* simulate update async */
- egg_debug ("doing update");
+ g_debug ("doing update");
pk_client_simulate_update_packages_async (PK_CLIENT(state->task), state->package_ids,
state->cancellable, state->progress_callback, state->progress_user_data,
(GAsyncReadyCallback) pk_task_simulate_ready_cb, state);
} else if (state->role == PK_ROLE_ENUM_REMOVE_PACKAGES) {
/* simulate remove async */
- egg_debug ("doing remove");
+ g_debug ("doing remove");
pk_client_simulate_remove_packages_async (PK_CLIENT(state->task), state->package_ids, state->autoremove,
state->cancellable, state->progress_callback, state->progress_user_data,
(GAsyncReadyCallback) pk_task_simulate_ready_cb, state);
} else if (state->role == PK_ROLE_ENUM_INSTALL_FILES) {
/* simulate install async */
- egg_debug ("doing install files");
+ g_debug ("doing install files");
pk_client_simulate_install_files_async (PK_CLIENT(state->task), state->files,
state->cancellable, state->progress_callback, state->progress_user_data,
(GAsyncReadyCallback) pk_task_simulate_ready_cb, state);
@@ -678,20 +676,20 @@ pk_task_user_accepted_idle_cb (PkTaskState *state)
{
/* this needs another step in the dance */
if (state->exit_enum == PK_EXIT_ENUM_KEY_REQUIRED) {
- egg_debug ("need to do install-sig");
+ g_debug ("need to do install-sig");
pk_task_install_signatures (state);
goto out;
}
/* this needs another step in the dance */
if (state->exit_enum == PK_EXIT_ENUM_EULA_REQUIRED) {
- egg_debug ("need to do accept-eula");
+ g_debug ("need to do accept-eula");
pk_task_accept_eulas (state);
goto out;
}
/* doing task */
- egg_debug ("continuing with request %i", state->request);
+ g_debug ("continuing with request %i", state->request);
pk_task_do_async_action (state);
out:
@@ -713,7 +711,7 @@ pk_task_user_accepted (PkTask *task, guint request)
/* get the not-yet-completed request */
state = pk_task_find_by_request (task, request);
if (state == NULL) {
- egg_warning ("request %i not found", request);
+ g_warning ("request %i not found", request);
return FALSE;
}
@@ -741,7 +739,7 @@ pk_task_user_declined_idle_cb (PkTaskState *state)
}
/* doing task */
- egg_debug ("declined request %i", state->request);
+ g_debug ("declined request %i", state->request);
error = g_error_new (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, "user declined interaction");
pk_task_generic_state_finish (state, error);
g_error_free (error);
@@ -765,7 +763,7 @@ pk_task_user_declined (PkTask *task, guint request)
/* get the not-yet-completed request */
state = pk_task_find_by_request (task, request);
if (state == NULL) {
- egg_warning ("request %i not found", request);
+ g_warning ("request %i not found", request);
return FALSE;
}
@@ -811,7 +809,7 @@ pk_task_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskState *state)
/* running non-interactive */
if (!state->task->priv->interactive) {
- egg_debug ("working non-interactive, so calling accept");
+ g_debug ("working non-interactive, so calling accept");
pk_task_user_accepted (state->task, state->request);
goto out;
}
@@ -835,7 +833,7 @@ pk_task_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskState *state)
/* running non-interactive */
if (!state->task->priv->interactive) {
- egg_debug ("working non-interactive, so calling accept");
+ g_debug ("working non-interactive, so calling accept");
pk_task_user_accepted (state->task, state->request);
goto out;
}
@@ -859,7 +857,7 @@ pk_task_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskState *state)
/* running non-interactive */
if (!state->task->priv->interactive) {
- egg_debug ("working non-interactive, so calling accept");
+ g_debug ("working non-interactive, so calling accept");
pk_task_user_accepted (state->task, state->request);
goto out;
}
@@ -883,7 +881,7 @@ pk_task_ready_cb (GObject *source_object, GAsyncResult *res, PkTaskState *state)
/* running non-interactive */
if (!state->task->priv->interactive) {
- egg_debug ("working non-interactive, so calling accept");
+ g_debug ("working non-interactive, so calling accept");
pk_task_user_accepted (state->task, state->request);
goto out;
}
@@ -956,7 +954,7 @@ pk_task_install_packages_async (PkTask *task, gchar **package_ids, GCancellable
state->package_ids = g_strdupv (package_ids);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* start trusted install async */
@@ -1010,7 +1008,7 @@ pk_task_update_packages_async (PkTask *task, gchar **package_ids, GCancellable *
state->progress_user_data = progress_user_data;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* start trusted install async */
@@ -1069,7 +1067,7 @@ pk_task_remove_packages_async (PkTask *task, gchar **package_ids, gboolean allow
state->progress_user_data = progress_user_data;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* start trusted install async */
@@ -1124,7 +1122,7 @@ pk_task_install_files_async (PkTask *task, gchar **files, GCancellable *cancella
state->progress_user_data = progress_user_data;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* start trusted install async */
@@ -1180,7 +1178,7 @@ pk_task_update_system_async (PkTask *task, GCancellable *cancellable,
state->progress_user_data = progress_user_data;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* start trusted install async */
@@ -1233,7 +1231,7 @@ pk_task_resolve_async (PkTask *task, PkBitfield filters, gchar **packages, GCanc
state->packages = g_strdupv (packages);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1286,7 +1284,7 @@ pk_task_search_names_async (PkTask *task, PkBitfield filters, gchar **values, GC
state->values = g_strdupv (values);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1339,7 +1337,7 @@ pk_task_search_details_async (PkTask *task, PkBitfield filters, gchar **values,
state->values = g_strdupv (values);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1392,7 +1390,7 @@ pk_task_search_groups_async (PkTask *task, PkBitfield filters, gchar **values, G
state->values = g_strdupv (values);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1445,7 +1443,7 @@ pk_task_search_files_async (PkTask *task, PkBitfield filters, gchar **values, GC
state->values = g_strdupv (values);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1496,7 +1494,7 @@ pk_task_get_details_async (PkTask *task, gchar **package_ids, GCancellable *canc
state->package_ids = g_strdupv (package_ids);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1547,7 +1545,7 @@ pk_task_get_update_detail_async (PkTask *task, gchar **package_ids, GCancellable
state->package_ids = g_strdupv (package_ids);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1600,7 +1598,7 @@ pk_task_download_packages_async (PkTask *task, gchar **package_ids, const gchar
state->directory = g_strdup (directory);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1651,7 +1649,7 @@ pk_task_get_updates_async (PkTask *task, PkBitfield filters, GCancellable *cance
state->filters = filters;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1706,7 +1704,7 @@ pk_task_get_depends_async (PkTask *task, PkBitfield filters, gchar **package_ids
state->recursive = recursive;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1757,7 +1755,7 @@ pk_task_get_packages_async (PkTask *task, PkBitfield filters, GCancellable *canc
state->filters = filters;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1812,7 +1810,7 @@ pk_task_get_requires_async (PkTask *task, PkBitfield filters, gchar **package_id
state->recursive = recursive;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1867,7 +1865,7 @@ pk_task_what_provides_async (PkTask *task, PkBitfield filters, PkProvidesEnum pr
state->values = g_strdupv (values);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1918,7 +1916,7 @@ pk_task_get_files_async (PkTask *task, gchar **package_ids, GCancellable *cancel
state->package_ids = g_strdupv (package_ids);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -1967,7 +1965,7 @@ pk_task_get_categories_async (PkTask *task, GCancellable *cancellable,
state->only_trusted = TRUE;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -2018,7 +2016,7 @@ pk_task_refresh_cache_async (PkTask *task, gboolean force, GCancellable *cancell
state->force = force;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -2069,7 +2067,7 @@ pk_task_rollback_async (PkTask *task, const gchar *transaction_id, GCancellable
state->transaction_id = g_strdup (transaction_id);
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -2120,7 +2118,7 @@ pk_task_get_repo_list_async (PkTask *task, PkBitfield filters, GCancellable *can
state->filters = filters;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -2173,7 +2171,7 @@ pk_task_repo_enable_async (PkTask *task, const gchar *repo_id, gboolean enabled,
state->enabled = enabled;
state->request = pk_task_generate_request_id ();
- egg_debug ("adding state %p", state);
+ g_debug ("adding state %p", state);
g_ptr_array_add (task->priv->array, state);
/* run task with callbacks */
@@ -2211,7 +2209,6 @@ pk_task_generic_finish (PkTask *task, GAsyncResult *res, GError **error)
return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple));
}
-
/**
* pk_task_get_property:
**/
diff --git a/lib/packagekit-glib2/pk-transaction-list.c b/lib/packagekit-glib2/pk-transaction-list.c
index bb5ee3d..7addecb 100644
--- a/lib/packagekit-glib2/pk-transaction-list.c
+++ b/lib/packagekit-glib2/pk-transaction-list.c
@@ -32,8 +32,6 @@
#include <glib-object.h>
#include <gio/gio.h>
-#include "egg-debug.h"
-
#include <packagekit-glib2/pk-transaction-list.h>
#include <packagekit-glib2/pk-control.h>
#include <packagekit-glib2/pk-common.h>
@@ -79,10 +77,10 @@ pk_transaction_list_process_transaction_list (PkTransactionList *tlist, gchar **
/* debug */
for (i=0; i<array->len; i++) {
tid = g_ptr_array_index (array, i);
- egg_debug ("last:\t%s", tid);
+ g_debug ("last:\t%s", tid);
}
for (i=0; transaction_ids[i] != NULL; i++)
- egg_debug ("current:\t%s", transaction_ids[i]);
+ g_debug ("current:\t%s", transaction_ids[i]);
/* remove old entries */
for (i=0; i<array->len; i++) {
@@ -100,7 +98,7 @@ pk_transaction_list_process_transaction_list (PkTransactionList *tlist, gchar **
if (!ret) {
tid_tmp = g_strdup (tid);
g_ptr_array_remove_index (array, i);
- egg_debug ("emit removed: %s", tid_tmp);
+ g_debug ("emit removed: %s", tid_tmp);
g_signal_emit (tlist, signals[SIGNAL_REMOVED], 0, tid_tmp);
g_free (tid_tmp);
}
@@ -121,7 +119,7 @@ pk_transaction_list_process_transaction_list (PkTransactionList *tlist, gchar **
/* no, so add to array */
if (!ret) {
g_ptr_array_add (array, g_strdup (transaction_ids[i]));
- egg_debug ("emit added: %s", transaction_ids[i]);
+ g_debug ("emit added: %s", transaction_ids[i]);
g_signal_emit (tlist, signals[SIGNAL_ADDED], 0, transaction_ids[i]);
}
}
@@ -139,7 +137,7 @@ pk_transaction_list_get_transaction_list_cb (PkControl *control, GAsyncResult *r
/* get the result */
transaction_ids = pk_control_get_transaction_list_finish (control, res, &error);
if (transaction_ids == NULL) {
- egg_warning ("Failed to get transaction list: %s", error->message);
+ g_warning ("Failed to get transaction list: %s", error->message);
g_error_free (error);
goto out;
}
@@ -156,7 +154,7 @@ out:
static void
pk_transaction_list_get_transaction_list (PkTransactionList *tlist)
{
- egg_debug ("refreshing task list");
+ g_debug ("refreshing task list");
pk_control_get_transaction_list_async (tlist->priv->control, tlist->priv->cancellable,
(GAsyncReadyCallback) pk_transaction_list_get_transaction_list_cb, tlist);
}
diff --git a/lib/packagekit-glib2/pk-transaction-past.c b/lib/packagekit-glib2/pk-transaction-past.c
index 9b19eef..13c2cb4 100644
--- a/lib/packagekit-glib2/pk-transaction-past.c
+++ b/lib/packagekit-glib2/pk-transaction-past.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-transaction-past.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_transaction_past_finalize (GObject *object);
#define PK_TRANSACTION_PAST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_TRANSACTION_PAST, PkTransactionPastPrivate))
diff --git a/lib/packagekit-glib2/pk-update-detail.c b/lib/packagekit-glib2/pk-update-detail.c
index 9fa66fd..9dfbbcf 100644
--- a/lib/packagekit-glib2/pk-update-detail.c
+++ b/lib/packagekit-glib2/pk-update-detail.c
@@ -35,8 +35,6 @@
#include <packagekit-glib2/pk-update-detail.h>
#include <packagekit-glib2/pk-enum.h>
-#include "egg-debug.h"
-
static void pk_update_detail_finalize (GObject *object);
#define PK_UPDATE_DETAIL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_UPDATE_DETAIL, PkUpdateDetailPrivate))
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b57deaa..45efaa0 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -12,9 +12,8 @@ data/packagekit-catalog.xml.in
data/packagekit-package-list.xml.in
data/packagekit-servicepack.xml.in
lib/packagekit-glib2/pk-console-shared.c
+lib/packagekit-glib2/pk-debug.c
lib/packagekit-glib2/pk-task-text.c
policy/org.freedesktop.packagekit.policy.in
src/pk-main.c
src/pk-polkit-action-lookup.c
-src/egg-debug.c
-
diff --git a/src/Makefile.am b/src/Makefile.am
index d81e175..be686dc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,6 +31,7 @@ INCLUDES = \
-DTESTDATADIR=\""$(top_srcdir)/data/tests"\" \
-DPK_COMPILATION \
-DPOLKIT_LOCAL_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
+ -DG_LOG_DOMAIN=\"PackageKit\" \
-I$(top_srcdir)/lib \
$(NULL)
@@ -42,8 +43,6 @@ pkbackendinclude_HEADERS = \
$(NULL)
shared_SOURCES = \
- egg-debug.c \
- egg-debug.h \
egg-string.c \
egg-string.h \
egg-dbus-monitor.c \
@@ -185,7 +184,6 @@ libpackagekit_action_lookup_la_SOURCES = \
libpackagekit_action_lookup_la_CFLAGS = \
-DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
- -DG_LOG_DOMAIN=\"PackageKit-Action-Lookup\" \
$(POLKIT_BACKEND_1_CFLAGS) \
$(WARNINGFLAGS_C) \
$(NULL)
diff --git a/src/egg-dbus-monitor.c b/src/egg-dbus-monitor.c
index 02f3774..bca665e 100644
--- a/src/egg-dbus-monitor.c
+++ b/src/egg-dbus-monitor.c
@@ -29,7 +29,6 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus.h>
-#include "egg-debug.h"
#include "egg-dbus-monitor.h"
static void egg_dbus_monitor_finalize (GObject *object);
@@ -121,7 +120,7 @@ egg_dbus_monitor_assign (EggDbusMonitor *monitor, EggDbusMonitorType bus_type, c
g_return_val_if_fail (service != NULL, FALSE);
if (monitor->priv->proxy != NULL) {
- egg_warning ("already assigned!");
+ g_warning ("already assigned!");
return FALSE;
}
@@ -134,7 +133,7 @@ egg_dbus_monitor_assign (EggDbusMonitor *monitor, EggDbusMonitorType bus_type, c
else
monitor->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (error != NULL) {
- egg_warning ("Cannot connect to bus: %s", error->message);
+ g_warning ("Cannot connect to bus: %s", error->message);
g_error_free (error);
return FALSE;
}
@@ -144,7 +143,7 @@ egg_dbus_monitor_assign (EggDbusMonitor *monitor, EggDbusMonitorType bus_type, c
DBUS_INTERFACE_DBUS,
&error);
if (error != NULL) {
- egg_warning ("Cannot connect to DBUS: %s", error->message);
+ g_warning ("Cannot connect to DBUS: %s", error->message);
g_error_free (error);
return FALSE;
}
@@ -183,7 +182,7 @@ egg_dbus_monitor_is_connected (EggDbusMonitor *monitor)
dbus_error_init (&error);
ret = dbus_bus_name_has_owner (conn, monitor->priv->service, &error);
if (dbus_error_is_set (&error)) {
- egg_debug ("error: %s", error.message);
+ g_debug ("error: %s", error.message);
dbus_error_free (&error);
}
@@ -200,7 +199,7 @@ egg_dbus_monitor_reset (EggDbusMonitor *monitor)
{
g_return_val_if_fail (EGG_IS_DBUS_MONITOR (monitor), FALSE);
if (monitor->priv->proxy != NULL) {
- egg_debug ("not already assigned!");
+ g_debug ("not already assigned!");
return FALSE;
}
if (monitor->priv->proxy != NULL) {
diff --git a/src/egg-debug.c b/src/egg-debug.c
deleted file mode 100644
index 340ccd0..0000000
--- a/src/egg-debug.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2007-2009 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/**
- * SECTION:egg-debug
- * @short_description: Debugging functions
- *
- * This file contains functions that can be used for debugging.
- */
-
-#include "config.h"
-
-#include <glib.h>
-#include <glib/gi18n.h>
-#include <glib/gprintf.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <time.h>
-
-#ifdef HAVE_EXECINFO_H
-#include <execinfo.h>
-#endif
-
-#include "egg-debug.h"
-
-#define CONSOLE_RESET 0
-#define CONSOLE_BLACK 30
-#define CONSOLE_RED 31
-#define CONSOLE_GREEN 32
-#define CONSOLE_YELLOW 33
-#define CONSOLE_BLUE 34
-#define CONSOLE_MAGENTA 35
-#define CONSOLE_CYAN 36
-#define CONSOLE_WHITE 37
-
-static gint _fd = -1;
-static gboolean _verbose = FALSE;
-static gboolean _console = FALSE;
-static gchar *_log_filename = NULL;
-static gboolean _initialized = FALSE;
-static GPtrArray *_modules_array = NULL;
-static GPtrArray *_functions_array = NULL;
-static gchar **_modules = NULL;
-static gchar **_functions = NULL;
-
-/**
- * egg_debug_filter_module:
- **/
-static gboolean
-egg_debug_filter_module (const gchar *filename)
-{
- gchar *module;
- const gchar *module_tmp;
- guint i;
- gboolean ret = FALSE;
-
- /* nothing filtering */
- if (_modules_array == NULL)
- return FALSE;
-
- /* are we in the filter list */
- module = g_strdup (filename);
- g_strdelimit (module, ".", '\0');
- for (i=0; i<_modules_array->len; i++) {
- module_tmp = g_ptr_array_index (_modules_array, i);
- if (g_strcmp0 (module_tmp, module) == 0) {
- ret = TRUE;
- break;
- }
- }
- return ret;
-}
-
-/**
- * egg_debug_filter_function:
- **/
-static gboolean
-egg_debug_filter_function (const gchar *function)
-{
- guint i;
- const gchar *function_tmp;
- gboolean ret = FALSE;
-
- /* nothing filtering */
- if (_functions_array == NULL)
- return FALSE;
-
- /* are we in the filter list */
- for (i=0; i<_functions_array->len; i++) {
- function_tmp = g_ptr_array_index (_functions_array, i);
- if (g_str_has_prefix (function, function_tmp)) {
- ret = TRUE;
- break;
- }
- }
- return ret;
-}
-
-/**
- * egg_debug_is_console:
- *
- * Returns: TRUE if we are on a console
- **/
-static gboolean
-egg_debug_is_console (void)
-{
- /* local first */
- if (_console)
- return TRUE;
-
- /* fall back to env variable */
- if (g_getenv ("CONSOLE") != NULL)
- return TRUE;
- return FALSE;
-}
-
-/**
- * egg_debug_set_console_mode:
- **/
-static void
-egg_debug_set_console_mode (guint console_code)
-{
- gchar command[13];
-
- /* don't put extra commands into logs */
- if (!egg_debug_is_console ())
- return;
-
- /* Command is the control command to the terminal */
- g_snprintf (command, 13, "%c[%dm", 0x1B, console_code);
- printf ("%s", command);
-}
-
-/**
- * egg_debug_backtrace:
- **/
-void
-egg_debug_backtrace (void)
-{
-#ifdef HAVE_EXECINFO_H
- void *call_stack[512];
- int call_stack_size;
- char **symbols;
- int i = 1;
-
- call_stack_size = backtrace (call_stack, G_N_ELEMENTS (call_stack));
- symbols = backtrace_symbols (call_stack, call_stack_size);
- if (symbols != NULL) {
- egg_debug_set_console_mode (CONSOLE_RED);
- g_print ("Traceback:\n");
- while (i < call_stack_size) {
- g_print ("\t%s\n", symbols[i]);
- i++;
- }
- egg_debug_set_console_mode (CONSOLE_RESET);
- free (symbols);
- }
-#endif
-}
-
-/**
- * egg_debug_log_line:
- **/
-static void
-egg_debug_log_line (const gchar *buffer)
-{
- ssize_t count;
-
- /* open a file */
- if (_fd == -1) {
- /* ITS4: ignore, /var/log/foo is owned by root, and this is just debug text */
- _fd = open (_log_filename, O_WRONLY|O_APPEND|O_CREAT, 0777);
- if (_fd == -1)
- g_error ("could not open log: '%s'", _log_filename);
- }
-
- /* ITS4: ignore, debug text always NULL terminated */
- count = write (_fd, buffer, strlen (buffer));
- if (count == -1)
- g_warning ("could not write %s", buffer);
-
- /* newline */
- count = write (_fd, "\n", 1);
- if (count == -1)
- g_warning ("could not write newline");
-}
-
-/**
- * egg_debug_print_line:
- **/
-static void
-egg_debug_print_line (const gchar *func, const gchar *file, const int line, const gchar *buffer, guint color)
-{
- gchar *str_time;
- gchar *header;
- time_t the_time;
-
- time (&the_time);
- str_time = g_new0 (gchar, 255);
- strftime (str_time, 254, "%H:%M:%S", localtime (&the_time));
-
- /* generate header text */
- header = g_strdup_printf ("TI:%s\tFI:%s\tFN:%s,%d", str_time, file, func, line);
- g_free (str_time);
-
- /* always in light green */
- egg_debug_set_console_mode (CONSOLE_GREEN);
- printf ("%s\n", header);
-
- /* different colors according to the severity */
- egg_debug_set_console_mode (color);
- printf (" - %s\n", buffer);
- egg_debug_set_console_mode (CONSOLE_RESET);
-
- /* log to a file */
- if (_log_filename != NULL) {
- egg_debug_log_line (header);
- egg_debug_log_line (buffer);
- }
-
- /* flush this output, as we need to debug */
- fflush (stdout);
-
- g_free (header);
-}
-
-/**
- * egg_debug_is_verbose:
- *
- * Returns: TRUE if we have debugging enabled
- **/
-gboolean
-egg_debug_is_verbose (void)
-{
- /* local first */
- if (_verbose)
- return TRUE;
-
- /* fall back to env variable */
- if (g_getenv ("VERBOSE") != NULL)
- return TRUE;
- return FALSE;
-}
-
-/**
- * egg_debug_real:
- **/
-void
-egg_debug_real (const gchar *func, const gchar *file, const int line, const gchar *format, ...)
-{
- va_list args;
- gchar *buffer = NULL;
-
- if (!egg_debug_is_verbose () && !egg_debug_filter_module (file) && !egg_debug_filter_function (func))
- return;
-
- va_start (args, format);
- g_vasprintf (&buffer, format, args);
- va_end (args);
-
- egg_debug_print_line (func, file, line, buffer, CONSOLE_BLUE);
-
- g_free (buffer);
-}
-
-/**
- * egg_warning_real:
- **/
-void
-egg_warning_real (const gchar *func, const gchar *file, const int line, const gchar *format, ...)
-{
- va_list args;
- gchar *buffer = NULL;
-
- if (!egg_debug_is_verbose () && !egg_debug_filter_module (file) && !egg_debug_filter_function (func))
- return;
-
- va_start (args, format);
- g_vasprintf (&buffer, format, args);
- va_end (args);
-
- /* do extra stuff for a warning */
- if (!egg_debug_is_console ())
- printf ("*** WARNING ***\n");
- egg_debug_print_line (func, file, line, buffer, CONSOLE_RED);
-
- g_free (buffer);
-}
-
-/**
- * egg_error_real:
- **/
-void
-egg_error_real (const gchar *func, const gchar *file, const int line, const gchar *format, ...)
-{
- va_list args;
- gchar *buffer = NULL;
-
- va_start (args, format);
- g_vasprintf (&buffer, format, args);
- va_end (args);
-
- /* do extra stuff for a warning */
- if (!egg_debug_is_console ())
- printf ("*** ERROR ***\n");
- egg_debug_print_line (func, file, line, buffer, CONSOLE_RED);
- g_free (buffer);
-
- /* we want to fix this! */
- egg_debug_backtrace ();
-
- exit (1);
-}
-
-/**
- * egg_debug_set_log_filename:
- **/
-void
-egg_debug_set_log_filename (const gchar *filename)
-{
- g_free (_log_filename);
- _log_filename = g_strdup (filename);
-}
-
-/**
- * egg_debug_strv_split_to_ptr_array:
- **/
-static GPtrArray *
-egg_debug_strv_split_to_ptr_array (gchar **modules)
-{
- GPtrArray *array = NULL;
- guint i, j;
- gchar **split;
-
- /* nothing */
- if (modules == NULL)
- goto out;
-
- /* create array of strings */
- array = g_ptr_array_new_with_free_func (g_free);
-
- /* parse each --debug-foo option */
- for (i=0; modules[i] != NULL; i++) {
- /* use a comma to delimit multiple entries */
- split = g_strsplit (modules[i], ",", -1);
- for (j=0; split[j] != NULL; j++)
- g_ptr_array_add (array, g_strdup (split[j]));
- g_strfreev (split);
- }
-out:
- return array;
-}
-
-/**
- * egg_debug_pre_parse_hook:
- */
-static gboolean
-egg_debug_pre_parse_hook (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error)
-{
- const GOptionEntry main_entries[] = {
- { "verbose", 'v', 0, G_OPTION_ARG_NONE, &_verbose,
- /* TRANSLATORS: turn on all debugging */
- N_("Show debugging information for all files"), NULL },
- { NULL}
- };
-
- /* add main entry */
- g_option_context_add_main_entries (context, main_entries, NULL);
-
- return TRUE;
-}
-
-/**
- * egg_debug_free:
- **/
-static void
-egg_debug_free (void)
-{
- if (!_initialized)
- return;
-
- /* close file */
- if (_fd != -1)
- close (_fd);
-
- /* free memory */
- g_free (_log_filename);
- if (_modules_array != NULL)
- g_ptr_array_unref (_modules_array);
- if (_functions_array != NULL)
- g_ptr_array_unref (_functions_array);
- g_strfreev (_modules);
- g_strfreev (_functions);
-
- /* can not re-init */
- _initialized = FALSE;
-}
-
-/**
- * egg_debug_post_parse_hook:
- */
-static gboolean
-egg_debug_post_parse_hook (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error)
-{
- _initialized = TRUE;
- _modules_array = egg_debug_strv_split_to_ptr_array (_modules);
- _functions_array = egg_debug_strv_split_to_ptr_array (_functions);
- _console = (isatty (fileno (stdout)) == 1);
-
- /* run this function on cleanup */
- atexit (egg_debug_free);
-
- return TRUE;
-}
-
-/**
- * egg_debug_get_option_group:
- *
- * Returns a #GOptionGroup for the commandline arguments recognized
- * by debugging. You should add this group to your #GOptionContext
- * with g_option_context_add_group(), if you are using
- * g_option_context_parse() to parse your commandline arguments.
- *
- * Returns: a #GOptionGroup for the commandline arguments
- */
-GOptionGroup *
-egg_debug_get_option_group (void)
-{
- GOptionGroup *group;
- const GOptionEntry debug_entries[] = {
- { "debug-modules", '\0', 0, G_OPTION_ARG_STRING_ARRAY, &_modules,
- /* TRANSLATORS: a list of modules to debug */
- N_("Debug these specific modules"), NULL },
- { "debug-functions", '\0', 0, G_OPTION_ARG_STRING_ARRAY, &_functions,
- /* TRANSLATORS: a list of functions to debug */
- N_("Debug these specific functions"), NULL },
- { "debug-log-filename", '\0', 0, G_OPTION_ARG_STRING, &_log_filename,
- /* TRANSLATORS: save to a log */
- N_("Log debugging data to a file"), NULL },
- { NULL}
- };
-
- group = g_option_group_new ("debug", _("Debugging Options"), _("Show debugging options"), NULL, NULL);
- g_option_group_set_parse_hooks (group, egg_debug_pre_parse_hook, egg_debug_post_parse_hook);
- g_option_group_add_entries (group, debug_entries);
- return group;
-}
-
-/**
- * egg_debug_init:
- * @argc: a pointer to the number of command line arguments.
- * @argv: a pointer to the array of command line arguments.
- *
- * Parses command line arguments.
- *
- * Return value: %TRUE if initialization succeeded, otherwise %FALSE.
- **/
-gboolean
-egg_debug_init (gint *argc, gchar ***argv)
-{
- GOptionContext *context;
-
- /* already initialized */
- if (_initialized)
- return TRUE;
-
- context = g_option_context_new (NULL);
- g_option_context_set_ignore_unknown_options (context, TRUE);
- g_option_context_add_group (context, egg_debug_get_option_group ());
- g_option_context_parse (context, argc, argv, NULL);
- g_option_context_free (context);
-
- return TRUE;
-}
-
diff --git a/src/egg-debug.h b/src/egg-debug.h
deleted file mode 100644
index dcafaca..0000000
--- a/src/egg-debug.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2007-2009 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __EGG_DEBUG_H
-#define __EGG_DEBUG_H
-
-#include <stdarg.h>
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-/**
- * egg_debug:
- *
- * Non critical debugging
- */
-#define egg_debug(...) egg_debug_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
-
-/**
- * egg_warning:
- *
- * Important debugging
- */
-#define egg_warning(...) egg_warning_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
-
-/**
- * egg_error:
- *
- * Critical debugging, with exit
- */
-#define egg_error(...) egg_error_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
-
-#elif defined(__GNUC__) && __GNUC__ >= 3
-#define egg_debug(...) egg_debug_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
-#define egg_warning(...) egg_warning_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
-#define egg_error(...) egg_error_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
-#else
-#define egg_debug(...)
-#define egg_warning(...)
-#define egg_error(...)
-#endif
-
-gboolean egg_debug_init (gint *argc,
- gchar ***argv);
-GOptionGroup *egg_debug_get_option_group (void);
-gboolean egg_debug_is_verbose (void);
-void egg_debug_backtrace (void);
-void egg_debug_set_log_filename (const gchar *filename);
-void egg_debug_real (const gchar *func,
- const gchar *file,
- gint line,
- const gchar *format, ...) __attribute__((format (printf,4,5)));
-void egg_warning_real (const gchar *func,
- const gchar *file,
- gint line,
- const gchar *format, ...) __attribute__((format (printf,4,5)));
-void egg_error_real (const gchar *func,
- const gchar *file,
- gint line,
- const gchar *format, ...) G_GNUC_NORETURN __attribute__((format (printf,4,5)));
-
-G_END_DECLS
-
-#endif /* __EGG_DEBUG_H */
diff --git a/src/egg-string.c b/src/egg-string.c
index 73eb1f8..fc493ed 100644
--- a/src/egg-string.c
+++ b/src/egg-string.c
@@ -42,7 +42,6 @@
#include <glib.h>
-#include "egg-debug.h"
#include "egg-string.h"
/**
@@ -183,7 +182,7 @@ egg_strvequal (gchar **id1, gchar **id2)
return TRUE;
if (id1 == NULL || id2 == NULL) {
- egg_debug ("GStrv compare invalid '%p' and '%p'", id1, id2);
+ g_debug ("GStrv compare invalid '%p' and '%p'", id1, id2);
return FALSE;
}
diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c
index f70db0e..f069120 100644
--- a/src/pk-backend-spawn.c
+++ b/src/pk-backend-spawn.c
@@ -42,7 +42,6 @@
#include <packagekit-glib2/pk-common.h>
#include <packagekit-glib2/pk-package-id.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-backend.h"
@@ -117,7 +116,7 @@ pk_backend_spawn_exit_timeout_cb (PkBackendSpawn *backend_spawn)
/* only try to close if running */
ret = pk_spawn_is_running (backend_spawn->priv->spawn);
if (ret) {
- egg_debug ("closing dispatcher as running and is idle");
+ g_debug ("closing dispatcher as running and is idle");
pk_spawn_exit (backend_spawn->priv->spawn);
}
return FALSE;
@@ -134,7 +133,7 @@ pk_backend_spawn_start_kill_timer (PkBackendSpawn *backend_spawn)
/* we finished okay, so we don't need to emulate Finished() for a crashing script */
priv->finished = TRUE;
- egg_debug ("backend marked as finished, so starting kill timer");
+ g_debug ("backend marked as finished, so starting kill timer");
if (priv->kill_id > 0)
g_source_remove (priv->kill_id);
@@ -142,7 +141,7 @@ pk_backend_spawn_start_kill_timer (PkBackendSpawn *backend_spawn)
/* get policy timeout */
timeout = pk_conf_get_int (priv->conf, "BackendShutdownTimeout");
if (timeout == PK_CONF_VALUE_INT_MISSING) {
- egg_warning ("using built in default value");
+ g_warning ("using built in default value");
timeout = 5;
}
@@ -194,12 +193,12 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
if (g_strcmp0 (command, "package") == 0) {
if (size != 4) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
if (pk_package_id_check (sections[2]) == FALSE) {
- egg_warning ("invalid package_id");
+ g_warning ("invalid package_id");
ret = FALSE;
goto out;
}
@@ -213,7 +212,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
pk_backend_package (priv->backend, info, sections[2], sections[3]);
} else if (g_strcmp0 (command, "details") == 0) {
if (size != 7) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -222,7 +221,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
/* ITS4: ignore, checked for overflow */
package_size = atol (sections[6]);
if (package_size > 1073741824) {
- egg_warning ("package size cannot be larger than one Gb");
+ g_warning ("package size cannot be larger than one Gb");
ret = FALSE;
goto out;
}
@@ -234,7 +233,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
g_free (text);
} else if (g_strcmp0 (command, "finished") == 0) {
if (size != 1) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -245,14 +244,14 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
} else if (g_strcmp0 (command, "files") == 0) {
if (size != 3) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
pk_backend_files (priv->backend, sections[1], sections[2]);
} else if (g_strcmp0 (command, "repo-detail") == 0) {
if (size != 4) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -261,13 +260,13 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
} else if (g_strcmp0 (sections[3], "false") == 0) {
pk_backend_repo_detail (priv->backend, sections[1], sections[2], FALSE);
} else {
- egg_warning ("invalid qualifier '%s'", sections[3]);
+ g_warning ("invalid qualifier '%s'", sections[3]);
ret = FALSE;
goto out;
}
} else if (g_strcmp0 (command, "updatedetail") == 0) {
if (size != 13) {
- egg_warning ("invalid command '%s', size %i", command, size);
+ g_warning ("invalid command '%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -289,37 +288,37 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
sections[11], sections[12]);
} else if (g_strcmp0 (command, "percentage") == 0) {
if (size != 2) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
ret = egg_strtoint (sections[1], &percentage);
if (!ret) {
- egg_warning ("invalid percentage value %s", sections[1]);
+ g_warning ("invalid percentage value %s", sections[1]);
} else if (percentage < 0 || percentage > 100) {
- egg_warning ("invalid percentage value %i", percentage);
+ g_warning ("invalid percentage value %i", percentage);
ret = FALSE;
} else {
pk_backend_set_percentage (priv->backend, percentage);
}
} else if (g_strcmp0 (command, "subpercentage") == 0) {
if (size != 2) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
ret = egg_strtoint (sections[1], &percentage);
if (!ret) {
- egg_warning ("invalid subpercentage value %s", sections[1]);
+ g_warning ("invalid subpercentage value %s", sections[1]);
} else if (percentage < 0 || percentage > 100) {
- egg_warning ("invalid subpercentage value %i", percentage);
+ g_warning ("invalid subpercentage value %i", percentage);
ret = FALSE;
} else {
pk_backend_set_sub_percentage (priv->backend, percentage);
}
} else if (g_strcmp0 (command, "error") == 0) {
if (size != 3) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -343,7 +342,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
g_free (text);
} else if (g_strcmp0 (command, "requirerestart") == 0) {
if (size != 3) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -355,14 +354,14 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
goto out;
}
if (!pk_package_id_check (sections[2])) {
- egg_warning ("invalid package_id");
+ g_warning ("invalid package_id");
ret = FALSE;
goto out;
}
pk_backend_require_restart (priv->backend, restart_enum, sections[2]);
} else if (g_strcmp0 (command, "message") == 0) {
if (size != 3) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -380,14 +379,14 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
g_free (text);
} else if (g_strcmp0 (command, "change-transaction-data") == 0) {
if (size != 2) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
pk_backend_set_transaction_data (priv->backend, sections[1]);
} else if (g_strcmp0 (command, "status") == 0) {
if (size != 2) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -401,7 +400,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
pk_backend_set_status (priv->backend, status_enum);
} else if (g_strcmp0 (command, "allow-cancel") == 0) {
if (size != 2) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -410,13 +409,13 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
} else if (g_strcmp0 (sections[1], "false") == 0) {
pk_backend_set_allow_cancel (priv->backend, FALSE);
} else {
- egg_warning ("invalid section '%s'", sections[1]);
+ g_warning ("invalid section '%s'", sections[1]);
ret = FALSE;
goto out;
}
} else if (g_strcmp0 (command, "no-percentage-updates") == 0) {
if (size != 1) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -424,7 +423,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
} else if (g_strcmp0 (command, "repo-signature-required") == 0) {
if (size != 9) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -458,7 +457,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
} else if (g_strcmp0 (command, "eula-required") == 0) {
if (size != 5) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -490,7 +489,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
} else if (g_strcmp0 (command, "media-change-required") == 0) {
if (size != 4) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -508,7 +507,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
} else if (g_strcmp0 (command, "distro-upgrade") == 0) {
if (size != 4) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -526,7 +525,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
} else if (g_strcmp0 (command, "category") == 0) {
if (size != 6) {
- egg_warning ("invalid command'%s', size %i", command, size);
+ g_warning ("invalid command'%s', size %i", command, size);
ret = FALSE;
goto out;
}
@@ -558,7 +557,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
ret = pk_backend_category (priv->backend, sections[1], sections[2], sections[3], sections[4], sections[5]);
goto out;
} else {
- egg_warning ("invalid command '%s'", command);
+ g_warning ("invalid command '%s'", command);
}
out:
g_strfreev (sections);
@@ -583,13 +582,13 @@ pk_backend_spawn_exit_cb (PkSpawn *spawn, PkSpawnExitType exit_enum, PkBackendSp
if (exit_enum == PK_SPAWN_EXIT_TYPE_DISPATCHER_EXIT ||
exit_enum == PK_SPAWN_EXIT_TYPE_DISPATCHER_CHANGED) {
- egg_debug ("dispatcher exited, nothing to see here");
+ g_debug ("dispatcher exited, nothing to see here");
return;
}
/* only emit if not finished */
if (!backend_spawn->priv->finished) {
- egg_debug ("script exited without doing finished, tidying up");
+ g_debug ("script exited without doing finished, tidying up");
ret = pk_backend_has_set_error_code (backend_spawn->priv->backend);
if (!ret) {
pk_backend_error_code (backend_spawn->priv->backend,
@@ -629,7 +628,7 @@ pk_backend_spawn_stdout_cb (PkBackendSpawn *spawn, const gchar *line, PkBackendS
gboolean ret;
ret = pk_backend_spawn_inject_data (backend_spawn, line);
if (!ret)
- egg_debug ("failed to parse: %s", line);
+ g_debug ("failed to parse: %s", line);
}
/**
@@ -649,7 +648,7 @@ pk_backend_spawn_stderr_cb (PkBackendSpawn *spawn, const gchar *line, PkBackendS
}
/* send warning up to session, this is never going to be pretty... */
- egg_warning ("STDERR: %s", line);
+ g_warning ("STDERR: %s", line);
pk_backend_message (backend_spawn->priv->backend, PK_MESSAGE_ENUM_BACKEND_ERROR, "%s", line);
}
@@ -775,7 +774,7 @@ pk_backend_spawn_get_envp (PkBackendSpawn *backend_spawn)
for (i=0; i<array->len; i++) {
line = g_ptr_array_index (array, i);
g_strdelimit (line, "\\;{}[]()*?%\n\r\t", '_');
- egg_debug ("setting evp '%s'", line);
+ g_debug ("setting evp '%s'", line);
}
envp = pk_ptr_array_to_strv (array);
@@ -852,7 +851,7 @@ pk_backend_spawn_helper_va_list (PkBackendSpawn *backend_spawn, const gchar *exe
/* convert to a argv */
argv = pk_backend_spawn_va_list_to_argv (executable, args);
if (argv == NULL) {
- egg_warning ("argv NULL");
+ g_warning ("argv NULL");
return FALSE;
}
@@ -864,19 +863,19 @@ pk_backend_spawn_helper_va_list (PkBackendSpawn *backend_spawn, const gchar *exe
filename = g_build_filename ("..", "backends", directory, "helpers", argv[0], NULL);
if (g_file_test (filename, G_FILE_TEST_EXISTS) == FALSE) {
- egg_debug ("local helper not found '%s'", filename);
+ g_debug ("local helper not found '%s'", filename);
g_free (filename);
filename = g_build_filename ("..", "backends", directory, argv[0], NULL);
}
if (g_file_test (filename, G_FILE_TEST_EXISTS) == FALSE) {
- egg_debug ("local helper not found '%s'", filename);
+ g_debug ("local helper not found '%s'", filename);
g_free (filename);
filename = g_build_filename (DATADIR, "PackageKit", "helpers", priv->name, argv[0], NULL);
}
#else
filename = g_build_filename (DATADIR, "PackageKit", "helpers", priv->name, argv[0], NULL);
#endif
- egg_debug ("using spawn filename %s", filename);
+ g_debug ("using spawn filename %s", filename);
/* replace the filename with the full path */
g_free (argv[0]);
@@ -999,7 +998,7 @@ pk_backend_spawn_set_allow_sigkill (PkBackendSpawn *backend_spawn, gboolean allo
/* have we banned this in the config ile */
if (!backend_spawn->priv->allow_sigkill && allow_sigkill) {
- egg_warning ("cannot set allow_cancel TRUE as BackendSpawnAllowSIGKILL is set to FALSE in PackageKit.conf");
+ g_warning ("cannot set allow_cancel TRUE as BackendSpawnAllowSIGKILL is set to FALSE in PackageKit.conf");
ret = FALSE;
goto out;
}
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 2c3a870..7ba77cf 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -35,7 +35,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-common.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-conf.h"
@@ -78,7 +77,6 @@
*/
#define PK_BACKEND_FINISHED_TIMEOUT_GRACE 10 /* ms */
-
/**
* PK_BACKEND_CANCEL_ACTION_TIMEOUT:
*
@@ -479,7 +477,7 @@ pk_backend_build_library_path (PkBackend *backend, const gchar *name)
/* prefer the local version */
path = g_build_filename ("..", "backends", directory, ".libs", filename, NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS) == FALSE) {
- egg_debug ("local backend not found '%s'", path);
+ g_debug ("local backend not found '%s'", path);
g_free (path);
path = g_build_filename (LIBDIR, "packagekit-backend", filename, NULL);
}
@@ -487,7 +485,7 @@ pk_backend_build_library_path (PkBackend *backend, const gchar *name)
path = g_build_filename (LIBDIR, "packagekit-backend", filename, NULL);
#endif
g_free (filename);
- egg_debug ("dlopening '%s'", path);
+ g_debug ("dlopening '%s'", path);
return path;
}
@@ -508,17 +506,17 @@ pk_backend_set_name (PkBackend *backend, const gchar *backend_name)
/* have we already been set? */
if (backend->priv->name != NULL) {
- egg_warning ("pk_backend_set_name called multiple times");
+ g_warning ("pk_backend_set_name called multiple times");
ret = FALSE;
goto out;
}
/* can we load it? */
- egg_debug ("Trying to load : %s", backend_name);
+ g_debug ("Trying to load : %s", backend_name);
path = pk_backend_build_library_path (backend, backend_name);
handle = g_module_open (path, 0);
if (handle == NULL) {
- egg_warning ("opening module %s failed : %s", backend_name, g_module_error ());
+ g_warning ("opening module %s failed : %s", backend_name, g_module_error ());
ret = FALSE;
goto out;
}
@@ -526,7 +524,7 @@ pk_backend_set_name (PkBackend *backend, const gchar *backend_name)
/* first check for the table of vfuncs */
ret = g_module_symbol (handle, "pk_backend_desc", (gpointer) &func);
if (ret) {
- egg_warning ("using table-of-vfuncs compatibility mode");
+ g_warning ("using table-of-vfuncs compatibility mode");
backend->priv->desc = func;
} else {
/* then check for the new style exported functions */
@@ -590,7 +588,7 @@ pk_backend_set_name (PkBackend *backend, const gchar *backend_name)
}
if (!ret) {
g_module_close (handle);
- egg_warning ("could not find description in plugin %s, not loading", backend_name);
+ g_warning ("could not find description in plugin %s, not loading", backend_name);
ret = FALSE;
goto out;
}
@@ -656,7 +654,7 @@ pk_backend_set_root (PkBackend *backend, const gchar *root)
g_free (backend->priv->root);
backend->priv->root = g_strdup (root);
- egg_debug ("install root now %s", backend->priv->root);
+ g_debug ("install root now %s", backend->priv->root);
return TRUE;
}
@@ -689,7 +687,7 @@ pk_backend_lock (PkBackend *backend)
g_return_val_if_fail (backend->priv->desc != NULL, FALSE);
if (backend->priv->locked) {
- egg_warning ("already locked");
+ g_warning ("already locked");
/* we don't return FALSE here, as the action didn't fail */
return TRUE;
}
@@ -717,12 +715,12 @@ pk_backend_unlock (PkBackend *backend)
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
if (backend->priv->locked == FALSE) {
- egg_warning ("already unlocked");
+ g_warning ("already unlocked");
/* we don't return FALSE here, as the action didn't fail */
return TRUE;
}
if (backend->priv->desc == NULL) {
- egg_warning ("not yet loaded backend, try pk_backend_lock()");
+ g_warning ("not yet loaded backend, try pk_backend_lock()");
return FALSE;
}
if (backend->priv->desc->destroy != NULL)
@@ -772,13 +770,13 @@ pk_backend_set_percentage (PkBackend *backend, guint percentage)
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: percentage %i", percentage);
+ g_warning ("already set error, cannot process: percentage %i", percentage);
return FALSE;
}
/* set the same twice? */
if (backend->priv->last_percentage == percentage) {
- egg_debug ("duplicate set of %i", percentage);
+ g_debug ("duplicate set of %i", percentage);
return FALSE;
}
@@ -809,7 +807,7 @@ pk_backend_set_percentage (PkBackend *backend, guint percentage)
/* lets try this and print as debug */
remaining = pk_time_get_remaining (backend->priv->time);
- egg_debug ("this will now take ~%i seconds", remaining);
+ g_debug ("this will now take ~%i seconds", remaining);
/* value cached from config file */
if (backend->priv->use_time)
@@ -832,13 +830,13 @@ pk_backend_set_speed (PkBackend *backend, guint speed)
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: speed %i", speed);
+ g_warning ("already set error, cannot process: speed %i", speed);
return FALSE;
}
/* set the same twice? */
if (backend->priv->speed == speed) {
- egg_debug ("duplicate set of %i", speed);
+ g_debug ("duplicate set of %i", speed);
return FALSE;
}
@@ -872,19 +870,19 @@ pk_backend_set_sub_percentage (PkBackend *backend, guint percentage)
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: sub-percentage %i", percentage);
+ g_warning ("already set error, cannot process: sub-percentage %i", percentage);
return FALSE;
}
/* set the same twice? */
if (backend->priv->last_subpercentage == percentage) {
- egg_debug ("duplicate set of %i", percentage);
+ g_debug ("duplicate set of %i", percentage);
return FALSE;
}
/* invalid number? */
if (percentage > 100 && percentage != PK_BACKEND_PERCENTAGE_INVALID) {
- egg_debug ("invalid number %i", percentage);
+ g_debug ("invalid number %i", percentage);
return FALSE;
}
@@ -907,19 +905,19 @@ pk_backend_set_status (PkBackend *backend, PkStatusEnum status)
/* already this? */
if (backend->priv->status == status) {
- egg_debug ("already set same status");
+ g_debug ("already set same status");
return TRUE;
}
/* have we already set an error? */
if (backend->priv->set_error && status != PK_STATUS_ENUM_FINISHED) {
- egg_warning ("already set error, cannot process: status %s", pk_status_enum_to_string (status));
+ g_warning ("already set error, cannot process: status %s", pk_status_enum_to_string (status));
return FALSE;
}
/* backends don't do this */
if (status == PK_STATUS_ENUM_WAIT) {
- egg_warning ("backend tried to WAIT, only the runner should set this value");
+ g_warning ("backend tried to WAIT, only the runner should set this value");
pk_backend_message (backend, PK_MESSAGE_ENUM_BACKEND_ERROR,
"%s shouldn't use STATUS_WAIT", pk_role_enum_to_string (backend->priv->role));
return FALSE;
@@ -927,7 +925,7 @@ pk_backend_set_status (PkBackend *backend, PkStatusEnum status)
/* sanity check */
if (status == PK_STATUS_ENUM_SETUP && backend->priv->status != PK_STATUS_ENUM_WAIT) {
- egg_warning ("backend tried to SETUP, but should be in WAIT");
+ g_warning ("backend tried to SETUP, but should be in WAIT");
pk_backend_message (backend, PK_MESSAGE_ENUM_BACKEND_ERROR,
"%s to SETUP when not in WAIT", pk_role_enum_to_string (backend->priv->role));
return FALSE;
@@ -969,7 +967,6 @@ pk_backend_package_emulate_finished (PkBackend *backend)
if (item == NULL)
goto out;
-
/* get data */
g_object_get (item,
"info", &info,
@@ -1009,19 +1006,19 @@ pk_backend_package_emulate_finished_for_package (PkBackend *backend, PkPackage *
/* simultaneous handles this on it's own */
if (backend->priv->simultaneous) {
- egg_debug ("backend handling finished");
+ g_debug ("backend handling finished");
goto out;
}
/* first package in transaction */
if (backend->priv->last_package == NULL) {
- egg_debug ("first package, so no finished");
+ g_debug ("first package, so no finished");
goto out;
}
/* same package, just info change */
if (pk_package_equal_id (backend->priv->last_package, item)) {
- egg_debug ("same package_id, ignoring");
+ g_debug ("same package_id, ignoring");
goto out;
}
@@ -1054,7 +1051,7 @@ pk_backend_strsafe (const gchar *text)
/* is valid UTF8? */
ret = g_utf8_validate (text, -1, NULL);
if (!ret) {
- egg_warning ("text '%s' was not valid UTF8!", text);
+ g_warning ("text '%s' was not valid UTF8!", text);
return NULL;
}
@@ -1082,7 +1079,7 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
/* check we are valid */
ret = pk_package_id_check (package_id);
if (!ret) {
- egg_warning ("package_id invalid and cannot be processed: %s", package_id);
+ g_warning ("package_id invalid and cannot be processed: %s", package_id);
goto out;
}
@@ -1111,7 +1108,7 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
/* is it the same? */
ret = (backend->priv->last_package != NULL && pk_package_equal (backend->priv->last_package, item));
if (ret) {
- egg_debug ("skipping duplicate %s", package_id);
+ g_debug ("skipping duplicate %s", package_id);
ret = FALSE;
goto out;
}
@@ -1127,7 +1124,7 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: package %s", package_id);
+ g_warning ("already set error, cannot process: package %s", package_id);
ret = FALSE;
goto out;
}
@@ -1135,7 +1132,7 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
/* we automatically set the transaction status for some PkInfoEnums if running
* in non-simultaneous transaction mode */
if (!backend->priv->simultaneous) {
- egg_debug ("auto-setting status based on info %s", pk_info_enum_to_string (info));
+ g_debug ("auto-setting status based on info %s", pk_info_enum_to_string (info));
if (info == PK_INFO_ENUM_DOWNLOADING)
pk_backend_set_status (backend, PK_STATUS_ENUM_DOWNLOAD);
else if (info == PK_INFO_ENUM_UPDATING)
@@ -1189,7 +1186,7 @@ pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: update_detail %s", package_id);
+ g_warning ("already set error, cannot process: update_detail %s", package_id);
goto out;
}
@@ -1203,12 +1200,12 @@ pk_backend_update_detail (PkBackend *backend, const gchar *package_id,
if (issued_text != NULL) {
ret = g_time_val_from_iso8601 (issued_text, &timeval);
if (!ret)
- egg_warning ("failed to parse issued '%s'", issued_text);
+ g_warning ("failed to parse issued '%s'", issued_text);
}
if (updated_text != NULL) {
ret = g_time_val_from_iso8601 (updated_text, &timeval);
if (!ret)
- egg_warning ("failed to parse updated '%s'", updated_text);
+ g_warning ("failed to parse updated '%s'", updated_text);
}
/* replace unsafe chars */
@@ -1280,14 +1277,14 @@ pk_backend_require_restart (PkBackend *backend, PkRestartEnum restart, const gch
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: require-restart %s", pk_restart_enum_to_string (restart));
+ g_warning ("already set error, cannot process: require-restart %s", pk_restart_enum_to_string (restart));
goto out;
}
/* check we are valid */
ret = pk_package_id_check (package_id);
if (!ret) {
- egg_warning ("package_id invalid and cannot be processed: %s", package_id);
+ g_warning ("package_id invalid and cannot be processed: %s", package_id);
goto out;
}
@@ -1326,7 +1323,7 @@ pk_backend_message (PkBackend *backend, PkMessageEnum message, const gchar *form
/* have we already set an error? */
if (backend->priv->set_error && message != PK_MESSAGE_ENUM_BACKEND_ERROR) {
- egg_warning ("already set error, cannot process: message %s", pk_message_enum_to_string (message));
+ g_warning ("already set error, cannot process: message %s", pk_message_enum_to_string (message));
goto out;
}
@@ -1365,7 +1362,7 @@ pk_backend_set_transaction_data (PkBackend *backend, const gchar *data)
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process");
+ g_warning ("already set error, cannot process");
return FALSE;
}
@@ -1385,7 +1382,7 @@ pk_backend_set_simultaneous_mode (PkBackend *backend, gboolean simultaneous)
backend->priv->simultaneous = simultaneous;
if (simultaneous)
- egg_warning ("simultaneous mode is not well tested, use with caution");
+ g_warning ("simultaneous mode is not well tested, use with caution");
return TRUE;
}
@@ -1411,7 +1408,7 @@ pk_backend_set_locale (PkBackend *backend, const gchar *code)
g_return_val_if_fail (code != NULL, FALSE);
g_return_val_if_fail (backend->priv->locked != FALSE, FALSE);
- egg_debug ("locale changed to %s", code);
+ g_debug ("locale changed to %s", code);
g_free (backend->priv->locale);
backend->priv->locale = g_strdup (code);
@@ -1439,7 +1436,7 @@ pk_backend_set_frontend_socket (PkBackend *backend, const gchar *frontend_socket
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
g_return_val_if_fail (backend->priv->locked != FALSE, FALSE);
- egg_debug ("frontend_socket changed to %s", frontend_socket);
+ g_debug ("frontend_socket changed to %s", frontend_socket);
g_free (backend->priv->frontend_socket);
backend->priv->frontend_socket = g_strdup (frontend_socket);
@@ -1464,7 +1461,7 @@ pk_backend_details (PkBackend *backend, const gchar *package_id,
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: details %s", package_id);
+ g_warning ("already set error, cannot process: details %s", package_id);
goto out;
}
@@ -1513,14 +1510,14 @@ pk_backend_files (PkBackend *backend, const gchar *package_id, const gchar *file
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: files %s", package_id);
+ g_warning ("already set error, cannot process: files %s", package_id);
return FALSE;
}
/* check we are valid */
ret = pk_package_id_check (package_id);
if (!ret) {
- egg_warning ("package_id invalid and cannot be processed: %s", package_id);
+ g_warning ("package_id invalid and cannot be processed: %s", package_id);
goto out;
}
@@ -1565,7 +1562,7 @@ pk_backend_distro_upgrade (PkBackend *backend, PkDistroUpgradeEnum state, const
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: distro-upgrade");
+ g_warning ("already set error, cannot process: distro-upgrade");
goto out;
}
@@ -1613,13 +1610,13 @@ pk_backend_repo_signature_required (PkBackend *backend, const gchar *package_id,
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: repo-sig-reqd");
+ g_warning ("already set error, cannot process: repo-sig-reqd");
goto out;
}
/* check we don't do this more than once */
if (backend->priv->set_signature) {
- egg_warning ("already asked for a signature, cannot process");
+ g_warning ("already asked for a signature, cannot process");
goto out;
}
@@ -1668,13 +1665,13 @@ pk_backend_eula_required (PkBackend *backend, const gchar *eula_id, const gchar
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: eula required");
+ g_warning ("already set error, cannot process: eula required");
goto out;
}
/* check we don't do this more than once */
if (backend->priv->set_eula) {
- egg_warning ("already asked for a signature, cannot process");
+ g_warning ("already asked for a signature, cannot process");
goto out;
}
@@ -1719,7 +1716,7 @@ pk_backend_media_change_required (PkBackend *backend,
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: media change required");
+ g_warning ("already set error, cannot process: media change required");
goto out;
}
@@ -1760,7 +1757,7 @@ pk_backend_repo_detail (PkBackend *backend, const gchar *repo_id,
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: repo-detail %s", repo_id);
+ g_warning ("already set error, cannot process: repo-detail %s", repo_id);
goto out;
}
@@ -1804,7 +1801,7 @@ pk_backend_category (PkBackend *backend, const gchar *parent_id, const gchar *ca
/* have we already set an error? */
if (backend->priv->set_error) {
- egg_warning ("already set error, cannot process: category %s", cat_id);
+ g_warning ("already set error, cannot process: category %s", cat_id);
goto out;
}
@@ -1883,8 +1880,7 @@ pk_backend_error_timeout_delay_cb (gpointer data)
/* check we have not already finished */
if (backend->priv->finished) {
- egg_warning ("consistency error");
- egg_debug_backtrace ();
+ g_warning ("consistency error");
goto out;
}
@@ -1952,14 +1948,14 @@ pk_backend_error_code (PkBackend *backend, PkErrorEnum error_code, const gchar *
/* check we are not doing Init() */
if (backend->priv->during_initialize) {
- egg_warning ("set during init: %s", buffer);
+ g_warning ("set during init: %s", buffer);
ret = FALSE;
goto out;
}
/* did we set a duplicate error? */
if (backend->priv->set_error) {
- egg_warning ("More than one error emitted! You tried to set '%s'", buffer);
+ g_warning ("More than one error emitted! You tried to set '%s'", buffer);
ret = FALSE;
goto out;
}
@@ -2020,13 +2016,13 @@ pk_backend_set_allow_cancel (PkBackend *backend, gboolean allow_cancel)
/* have we already set an error? */
if (backend->priv->set_error && allow_cancel) {
- egg_warning ("already set error, cannot process: allow-cancel %i", allow_cancel);
+ g_warning ("already set error, cannot process: allow-cancel %i", allow_cancel);
return FALSE;
}
/* same as last state? */
if (backend->priv->allow_cancel == (PkHintEnum) allow_cancel) {
- egg_debug ("ignoring same allow-cancel state");
+ g_debug ("ignoring same allow-cancel state");
return FALSE;
}
@@ -2062,7 +2058,7 @@ pk_backend_set_role_internal (PkBackend *backend, PkRoleEnum role)
{
/* Should only be called once... */
if (backend->priv->role != PK_ROLE_ENUM_UNKNOWN) {
- egg_warning ("cannot set role to %s, already %s",
+ g_warning ("cannot set role to %s, already %s",
pk_role_enum_to_string (role),
pk_role_enum_to_string (backend->priv->role));
return FALSE;
@@ -2071,7 +2067,7 @@ pk_backend_set_role_internal (PkBackend *backend, PkRoleEnum role)
/* reset the timer */
pk_time_reset (backend->priv->time);
- egg_debug ("setting role to %s", pk_role_enum_to_string (role));
+ g_debug ("setting role to %s", pk_role_enum_to_string (role));
backend->priv->role = role;
backend->priv->status = PK_STATUS_ENUM_WAIT;
g_signal_emit (backend, signals[SIGNAL_STATUS_CHANGED], 0, backend->priv->status);
@@ -2090,7 +2086,7 @@ pk_backend_set_role (PkBackend *backend, PkRoleEnum role)
/* the role of the transaction can be different to the role of the backend if:
* - we reuse the backend for instance searching for files before UpdatePackages
* - we are simulating the SimulateInstallPackages with a GetDepends call */
- egg_debug ("setting transaction role to %s", pk_role_enum_to_string (role));
+ g_debug ("setting transaction role to %s", pk_role_enum_to_string (role));
backend->priv->transaction_role = role;
return pk_backend_set_role_internal (backend, role);
}
@@ -2107,7 +2103,7 @@ pk_backend_set_exit_code (PkBackend *backend, PkExitEnum exit_enum)
g_return_val_if_fail (backend->priv->locked != FALSE, FALSE);
if (backend->priv->exit != PK_EXIT_ENUM_UNKNOWN) {
- egg_warning ("already set exit status: old=%s, new=%s",
+ g_warning ("already set exit status: old=%s, new=%s",
pk_exit_enum_to_string (backend->priv->exit),
pk_exit_enum_to_string (exit_enum));
return FALSE;
@@ -2158,7 +2154,7 @@ pk_backend_transaction_start (PkBackend *backend)
/* no transaction setup is perfectly fine */
if (backend->priv->desc->transaction_start == NULL) {
- egg_debug ("no transaction start vfunc");
+ g_debug ("no transaction start vfunc");
return;
}
@@ -2182,7 +2178,7 @@ pk_backend_transaction_stop (PkBackend *backend)
/* no transaction setup is perfectly fine */
if (backend->priv->desc->transaction_stop == NULL) {
- egg_debug ("no transaction stop vfunc");
+ g_debug ("no transaction stop vfunc");
goto out;
}
@@ -2224,7 +2220,7 @@ pk_backend_finished (PkBackend *backend)
/* check we are not doing Init() */
if (backend->priv->during_initialize) {
- egg_warning ("finished during init");
+ g_warning ("finished during init");
return FALSE;
}
@@ -2239,7 +2235,7 @@ pk_backend_finished (PkBackend *backend)
/* find out what we just did */
role_text = pk_role_enum_to_string (backend->priv->role);
- egg_debug ("finished role %s", role_text);
+ g_debug ("finished role %s", role_text);
/* are we trying to finish in init? */
if (backend->priv->during_initialize) {
@@ -2250,7 +2246,7 @@ pk_backend_finished (PkBackend *backend)
/* check we have not already finished */
if (backend->priv->finished) {
- egg_warning ("already finished");
+ g_warning ("already finished");
return FALSE;
}
@@ -2287,7 +2283,7 @@ pk_backend_finished (PkBackend *backend)
backend->priv->status == PK_STATUS_ENUM_SETUP) {
pk_backend_message (backend, PK_MESSAGE_ENUM_BACKEND_ERROR,
"Backends should send status <value> signals for %s!", role_text);
- egg_warning ("GUI will remain unchanged!");
+ g_warning ("GUI will remain unchanged!");
}
/* emulate the last finished package if not done already */
@@ -2304,7 +2300,7 @@ pk_backend_finished (PkBackend *backend)
/* we have to run this idle as the command may finish before the transaction
* has been sent to the client. I love async... */
- egg_debug ("adding finished %p to timeout loop", backend);
+ g_debug ("adding finished %p to timeout loop", backend);
backend->priv->signal_finished = g_timeout_add (PK_BACKEND_FINISHED_TIMEOUT_GRACE,
pk_backend_finished_delay, backend);
#if GLIB_CHECK_VERSION(2,25,8)
@@ -2359,7 +2355,7 @@ pk_backend_not_implemented_yet (PkBackend *backend, const gchar *method)
/* this function is only valid when we have a running transaction */
if (backend->priv->transaction_id != NULL)
- egg_warning ("only valid when we have a running transaction");
+ g_warning ("only valid when we have a running transaction");
pk_backend_error_code (backend, PK_ERROR_ENUM_NOT_SUPPORTED, "the method '%s' is not implemented yet", method);
/* don't wait, do this now */
pk_backend_finished_delay (backend);
@@ -2434,7 +2430,7 @@ pk_backend_thread_setup (gpointer thread_data)
/* run original function */
ret = helper->func (helper->backend);
if (!ret) {
- egg_warning ("transaction setup failed, going straight to finished");
+ g_warning ("transaction setup failed, going straight to finished");
pk_backend_transaction_stop (helper->backend);
}
@@ -2459,13 +2455,13 @@ pk_backend_thread_create (PkBackend *backend, PkBackendThreadFunc func)
g_return_val_if_fail (func != NULL, FALSE);
if (backend->priv->thread != NULL) {
- egg_warning ("already has thread");
+ g_warning ("already has thread");
return FALSE;
}
/* DBus-Glib isn't threadsafe */
if (!backend->priv->use_threads) {
- egg_warning ("not using threads, so daemon will block");
+ g_warning ("not using threads, so daemon will block");
ret = func (backend);
goto out;
}
@@ -2478,7 +2474,7 @@ pk_backend_thread_create (PkBackend *backend, PkBackendThreadFunc func)
/* create a thread */
backend->priv->thread = g_thread_create (pk_backend_thread_setup, helper, FALSE, NULL);
if (backend->priv->thread == NULL) {
- egg_warning ("failed to create thread");
+ g_warning ("failed to create thread");
ret = FALSE;
goto out;
}
@@ -2532,10 +2528,10 @@ pk_backend_accept_eula (PkBackend *backend, const gchar *eula_id)
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
g_return_val_if_fail (eula_id != NULL, FALSE);
- egg_debug ("eula_id %s", eula_id);
+ g_debug ("eula_id %s", eula_id);
present = g_hash_table_lookup (backend->priv->eulas, eula_id);
if (present != NULL) {
- egg_debug ("already added %s to accepted list", eula_id);
+ g_debug ("already added %s to accepted list", eula_id);
return FALSE;
}
g_hash_table_insert (backend->priv->eulas, g_strdup (eula_id), GINT_TO_POINTER (1));
@@ -2603,7 +2599,7 @@ pk_backend_watch_file (PkBackend *backend, const gchar *filename, PkBackendFileC
g_return_val_if_fail (func != NULL, FALSE);
if (backend->priv->file_changed_func != NULL) {
- egg_warning ("already set");
+ g_warning ("already set");
return FALSE;
}
ret = pk_file_monitor_set_file (backend->priv->file_monitor, filename);;
@@ -2623,7 +2619,7 @@ static void
pk_backend_file_monitor_changed_cb (PkFileMonitor *file_monitor, PkBackend *backend)
{
g_return_if_fail (PK_IS_BACKEND (backend));
- egg_debug ("config file changed");
+ g_debug ("config file changed");
backend->priv->file_changed_func (backend, backend->priv->file_changed_data);
}
@@ -2686,7 +2682,7 @@ pk_backend_set_property (GObject *object, guint prop_id, const GValue *value, GP
case PROP_TRANSACTION_ID:
g_free (priv->transaction_id);
priv->transaction_id = g_value_dup_string (value);
- egg_debug ("setting backend tid as %s", priv->transaction_id);
+ g_debug ("setting backend tid as %s", priv->transaction_id);
break;
case PROP_SPEED:
priv->speed = g_value_get_uint (value);
@@ -2727,7 +2723,7 @@ pk_backend_finalize (GObject *object)
if (backend->priv->handle != NULL)
g_module_close (backend->priv->handle);
- egg_debug ("parent_class->finalize");
+ g_debug ("parent_class->finalize");
G_OBJECT_CLASS (pk_backend_parent_class)->finalize (object);
}
@@ -2897,14 +2893,14 @@ pk_backend_reset (PkBackend *backend)
/* we can't reset when we are running */
if (backend->priv->status == PK_STATUS_ENUM_RUNNING) {
- egg_warning ("cannot reset %s when running", backend->priv->transaction_id);
+ g_warning ("cannot reset %s when running", backend->priv->transaction_id);
return FALSE;
}
/* do finish now, as we might be unreffing quickly */
if (backend->priv->signal_finished != 0) {
g_source_remove (backend->priv->signal_finished);
- egg_debug ("doing unref quickly delay");
+ g_debug ("doing unref quickly delay");
pk_backend_finished_delay (backend);
}
@@ -2954,7 +2950,7 @@ pk_backend_cancel_cb (PkBackend *backend)
{
/* set an error if the backend didn't do it for us */
if (!backend->priv->set_error) {
- egg_warning ("backend failed to exit in %ims, cancelling ourselves", PK_BACKEND_CANCEL_ACTION_TIMEOUT);
+ g_warning ("backend failed to exit in %ims, cancelling ourselves", PK_BACKEND_CANCEL_ACTION_TIMEOUT);
pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_CANCELLED, "transaction was cancelled");
pk_backend_finished (backend);
}
diff --git a/src/pk-backend.h b/src/pk-backend.h
index 7c939b0..c88420b 100644
--- a/src/pk-backend.h
+++ b/src/pk-backend.h
@@ -37,7 +37,6 @@
#include "pk-store.h"
#include "pk-backend.h"
-#include "egg-debug.h"
#include "egg-string.h"
G_BEGIN_DECLS
diff --git a/src/pk-cache.c b/src/pk-cache.c
index 18c694c..571e7f1 100644
--- a/src/pk-cache.c
+++ b/src/pk-cache.c
@@ -28,7 +28,6 @@
#include <glib/gi18n.h>
#include <glib.h>
-#include "egg-debug.h"
#include "pk-cache.h"
#include "pk-conf.h"
@@ -54,13 +53,13 @@ pk_cache_get_results (PkCache *cache, PkRoleEnum role)
/* do not use */
if (!cache->priv->use_cache) {
- egg_debug ("not using cache");
+ g_debug ("not using cache");
return NULL;
}
/* only support GetUpdates */
if (role != PK_ROLE_ENUM_GET_UPDATES) {
- egg_debug ("only caching update lists");
+ g_debug ("only caching update lists");
return FALSE;
}
@@ -81,20 +80,20 @@ pk_cache_set_results (PkCache *cache, PkRoleEnum role, PkResults *results)
/* do not use */
if (!cache->priv->use_cache) {
- egg_debug ("not using cache");
+ g_debug ("not using cache");
return FALSE;
}
/* only support GetUpdates */
if (role != PK_ROLE_ENUM_GET_UPDATES) {
- egg_debug ("only caching update lists");
+ g_debug ("only caching update lists");
return FALSE;
}
/* do this in case we have old data */
pk_cache_invalidate (cache);
- egg_debug ("reffing updates cache");
+ g_debug ("reffing updates cache");
cache->priv->get_updates = g_object_ref (results);
return TRUE;
}
@@ -107,7 +106,7 @@ pk_cache_invalidate (PkCache *cache)
{
g_return_val_if_fail (PK_IS_CACHE (cache), FALSE);
- egg_debug ("unreffing updates cache");
+ g_debug ("unreffing updates cache");
if (cache->priv->get_updates != NULL) {
g_object_unref (cache->priv->get_updates);
cache->priv->get_updates = NULL;
diff --git a/src/pk-conf.c b/src/pk-conf.c
index bfed952..97ec220 100644
--- a/src/pk-conf.c
+++ b/src/pk-conf.c
@@ -32,7 +32,6 @@
#include <glib/gi18n.h>
#include <glib.h>
-#include "egg-debug.h"
#include "pk-conf.h"
#define PK_CONF_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_CONF, PkConfPrivate))
@@ -61,7 +60,7 @@ pk_conf_get_string (PkConf *conf, const gchar *key)
if (error != NULL) {
/* set to missing value */
value = PK_CONF_VALUE_STRING_MISSING;
- egg_debug ("%s read error: %s", key, error->message);
+ g_debug ("%s read error: %s", key, error->message);
g_error_free (error);
}
return value;
@@ -83,7 +82,7 @@ pk_conf_get_strv (PkConf *conf, const gchar *key)
if (error != NULL) {
/* set to missing value */
value = PK_CONF_VALUE_STRING_MISSING;
- egg_debug ("%s read error: %s", key, error->message);
+ g_debug ("%s read error: %s", key, error->message);
g_error_free (error);
}
return value;
@@ -105,7 +104,7 @@ pk_conf_get_int (PkConf *conf, const gchar *key)
if (error != NULL) {
/* set to missing value */
value = PK_CONF_VALUE_INT_MISSING;
- egg_debug ("%s read error: %s", key, error->message);
+ g_debug ("%s read error: %s", key, error->message);
g_error_free (error);
}
return value;
@@ -125,7 +124,7 @@ pk_conf_get_bool (PkConf *conf, const gchar *key)
value = g_key_file_get_boolean (conf->priv->keyfile, "Daemon", key, &error);
if (error != NULL) {
- egg_debug ("%s read error: %s", key, error->message);
+ g_debug ("%s read error: %s", key, error->message);
g_error_free (error);
}
return value;
@@ -171,7 +170,7 @@ pk_conf_get_filename (void)
if (g_file_test (path, G_FILE_TEST_EXISTS)) {
goto out;
}
- egg_debug ("local config file not found '%s'", path);
+ g_debug ("local config file not found '%s'", path);
g_free (path);
#endif
/* check the prefix path */
@@ -181,7 +180,7 @@ pk_conf_get_filename (void)
}
/* none found! */
- egg_warning ("config file not found '%s'", path);
+ g_warning ("config file not found '%s'", path);
g_free (path);
path = NULL;
out:
@@ -204,14 +203,14 @@ pk_conf_init (PkConf *conf)
conf->priv = PK_CONF_GET_PRIVATE (conf);
path = pk_conf_get_filename ();
if (path == NULL)
- egg_error ("config file not found");
- egg_debug ("using config file '%s'", path);
+ g_error ("config file not found");
+ g_debug ("using config file '%s'", path);
conf->priv->keyfile = g_key_file_new ();
ret = g_key_file_load_from_file (conf->priv->keyfile, path,
G_KEY_FILE_NONE, NULL);
g_free (path);
if (!ret)
- egg_error ("failed to parse config file!");
+ g_error ("failed to parse config file!");
}
/**
diff --git a/src/pk-dbus.c b/src/pk-dbus.c
index 9ec83a3..728c47a 100644
--- a/src/pk-dbus.c
+++ b/src/pk-dbus.c
@@ -29,8 +29,6 @@
#include "pk-dbus.h"
-#include "egg-debug.h"
-
#define PK_DBUS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_DBUS, PkDbusPrivate))
struct PkDbusPrivate
@@ -67,7 +65,7 @@ pk_dbus_get_uid (PkDbus *dbus, const gchar *sender)
con = dbus_g_connection_get_connection (dbus->priv->connection);
uid = dbus_bus_get_unix_user (con, sender, &error);
if (dbus_error_is_set (&error)) {
- egg_warning ("Could not get uid for connection: %s %s", error.name, error.message);
+ g_warning ("Could not get uid for connection: %s %s", error.name, error.message);
uid = G_MAXUINT;
goto out;
}
@@ -106,7 +104,7 @@ pk_dbus_get_pid (PkDbus *dbus, const gchar *sender)
G_TYPE_UINT, &pid,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("failed to get pid: %s", error->message);
+ g_warning ("failed to get pid: %s", error->message);
g_error_free (error);
goto out;
}
@@ -138,7 +136,7 @@ pk_dbus_get_cmdline (PkDbus *dbus, const gchar *sender)
/* get pid */
pid = pk_dbus_get_pid (dbus, sender);
if (pid == G_MAXUINT) {
- egg_warning ("failed to get PID");
+ g_warning ("failed to get PID");
goto out;
}
@@ -146,7 +144,7 @@ pk_dbus_get_cmdline (PkDbus *dbus, const gchar *sender)
filename = g_strdup_printf ("/proc/%i/cmdline", pid);
ret = g_file_get_contents (filename, &cmdline, NULL, &error);
if (!ret) {
- egg_warning ("failed to get cmdline: %s", error->message);
+ g_warning ("failed to get cmdline: %s", error->message);
g_error_free (error);
}
out:
@@ -176,14 +174,14 @@ pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
/* no ConsoleKit? */
if (dbus->priv->proxy_session == NULL) {
- egg_warning ("no ConsoleKit, so cannot get session");
+ g_warning ("no ConsoleKit, so cannot get session");
goto out;
}
/* get pid */
pid = pk_dbus_get_pid (dbus, sender);
if (pid == G_MAXUINT) {
- egg_warning ("failed to get PID");
+ g_warning ("failed to get PID");
goto out;
}
@@ -195,7 +193,7 @@ pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
DBUS_TYPE_G_OBJECT_PATH, &session,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("failed to get session for %i: %s", pid, error->message);
+ g_warning ("failed to get session for %i: %s", pid, error->message);
g_error_free (error);
goto out;
}
@@ -258,7 +256,7 @@ pk_dbus_init (PkDbus *dbus)
"/org/freedesktop/DBus/Bus",
"org.freedesktop.DBus", &error);
if (dbus->priv->proxy_pid == NULL) {
- egg_warning ("cannot connect to DBus: %s", error->message);
+ g_warning ("cannot connect to DBus: %s", error->message);
g_error_free (error);
}
@@ -269,7 +267,7 @@ pk_dbus_init (PkDbus *dbus)
"/org/freedesktop/ConsoleKit/Manager",
"org.freedesktop.ConsoleKit.Manager", &error);
if (dbus->priv->proxy_session == NULL) {
- egg_warning ("cannot connect to DBus: %s", error->message);
+ g_warning ("cannot connect to DBus: %s", error->message);
g_error_free (error);
}
}
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 19c67fe..5e5abe9 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -44,7 +44,6 @@
#include <polkit/polkit.h>
#endif
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-network.h"
@@ -182,7 +181,7 @@ pk_engine_error_get_type (void)
static void
pk_engine_reset_timer (PkEngine *engine)
{
- egg_debug ("reset timer");
+ g_debug ("reset timer");
g_timer_reset (engine->priv->timer);
}
@@ -198,7 +197,7 @@ pk_engine_transaction_list_changed_cb (PkTransactionList *tlist, PkEngine *engin
transaction_list = pk_transaction_list_get_array (engine->priv->transaction_list);
- egg_debug ("emitting transaction-list-changed");
+ g_debug ("emitting transaction-list-changed");
g_signal_emit (engine, signals[SIGNAL_TRANSACTION_LIST_CHANGED], 0, transaction_list);
pk_engine_reset_timer (engine);
@@ -220,7 +219,7 @@ pk_engine_inhibit_locked_cb (PkInhibit *inhibit, gboolean is_locked, PkEngine *e
engine->priv->locked = is_locked;
/* emit */
- egg_debug ("emitting changed");
+ g_debug ("emitting changed");
g_signal_emit (engine, signals[SIGNAL_CHANGED], 0);
}
@@ -231,7 +230,7 @@ static void
pk_engine_notify_repo_list_changed_cb (PkNotify *notify, PkEngine *engine)
{
g_return_if_fail (PK_IS_ENGINE (engine));
- egg_debug ("emitting repo-list-changed");
+ g_debug ("emitting repo-list-changed");
g_signal_emit (engine, signals[SIGNAL_REPO_LIST_CHANGED], 0);
}
@@ -242,7 +241,7 @@ static void
pk_engine_notify_updates_changed_cb (PkNotify *notify, PkEngine *engine)
{
g_return_if_fail (PK_IS_ENGINE (engine));
- egg_debug ("emitting updates-changed");
+ g_debug ("emitting updates-changed");
g_signal_emit (engine, signals[SIGNAL_UPDATES_CHANGED], 0);
}
@@ -272,7 +271,7 @@ pk_engine_get_tid (PkEngine *engine, DBusGMethodInvocation *context)
g_return_if_fail (PK_IS_ENGINE (engine));
- egg_debug ("GetTid method called");
+ g_debug ("GetTid method called");
sender = dbus_g_method_get_sender (context);
new_tid = pk_transaction_db_generate_id (engine->priv->transaction_db);
@@ -284,7 +283,7 @@ pk_engine_get_tid (PkEngine *engine, DBusGMethodInvocation *context)
goto out;
}
- egg_debug ("sending tid: '%s'", new_tid);
+ g_debug ("sending tid: '%s'", new_tid);
/* reset the timer */
pk_engine_reset_timer (engine);
@@ -322,7 +321,7 @@ pk_engine_get_transaction_list (PkEngine *engine, gchar ***transaction_list, GEr
g_return_val_if_fail (engine != NULL, FALSE);
g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
- egg_debug ("GetTransactionList method called");
+ g_debug ("GetTransactionList method called");
if (transaction_list != NULL)
*transaction_list = pk_transaction_list_get_array (engine->priv->transaction_list);
@@ -352,7 +351,7 @@ pk_engine_state_changed_cb (gpointer data)
return TRUE;
}
- egg_debug ("unreffing updates cache as state may have changed");
+ g_debug ("unreffing updates cache as state may have changed");
pk_cache_invalidate (engine->priv->cache);
pk_notify_updates_changed (engine->priv->notify);
@@ -382,7 +381,7 @@ pk_engine_state_has_changed (PkEngine *engine, const gchar *reason, GError **err
/* have we already scheduled priority? */
if (engine->priv->timeout_priority_id != 0) {
- egg_warning ("Already asked to refresh priority state less than %i seconds ago",
+ g_warning ("Already asked to refresh priority state less than %i seconds ago",
engine->priv->timeout_priority);
goto out;
}
@@ -393,7 +392,7 @@ pk_engine_state_has_changed (PkEngine *engine, const gchar *reason, GError **err
/* are we normal, and already scheduled normal? */
if (!is_priority && engine->priv->timeout_normal_id != 0) {
- egg_warning ("Already asked to refresh normal state less than %i seconds ago",
+ g_warning ("Already asked to refresh normal state less than %i seconds ago",
engine->priv->timeout_normal);
goto out;
}
@@ -462,20 +461,20 @@ pk_engine_get_seconds_idle (PkEngine *engine)
* give sufficient percentage updates to not be marked as idle */
size = pk_transaction_list_get_size (engine->priv->transaction_list);
if (size != 0) {
- egg_debug ("engine idle zero as %i transactions in progress", size);
+ g_debug ("engine idle zero as %i transactions in progress", size);
return 0;
}
/* have we been updated? */
if (engine->priv->notify_clients_of_upgrade) {
- egg_debug ("emitting restart-schedule because of binary change");
+ g_debug ("emitting restart-schedule because of binary change");
g_signal_emit (engine, signals[SIGNAL_RESTART_SCHEDULE], 0);
return G_MAXUINT;
}
/* do we need to shutdown quickly */
if (engine->priv->shutdown_as_soon_as_possible) {
- egg_debug ("need to restart daemon asap");
+ g_debug ("need to restart daemon asap");
return G_MAXUINT;
}
@@ -496,7 +495,7 @@ pk_engine_suggest_daemon_quit (PkEngine *engine, GError **error)
/* can we exit straight away */
size = pk_transaction_list_get_size (engine->priv->transaction_list);
if (size == 0) {
- egg_debug ("emitting quit");
+ g_debug ("emitting quit");
g_signal_emit (engine, signals[SIGNAL_QUIT], 0);
return TRUE;
}
@@ -521,28 +520,28 @@ pk_engine_set_proxy_internal (PkEngine *engine, const gchar *sender, const gchar
/* try to set the new proxy */
ret = pk_backend_set_proxy (engine->priv->backend, proxy_http, proxy_ftp);
if (!ret) {
- egg_warning ("setting the proxy failed");
+ g_warning ("setting the proxy failed");
goto out;
}
/* get uid */
uid = pk_dbus_get_uid (engine->priv->dbus, sender);
if (uid == G_MAXUINT) {
- egg_warning ("failed to get the uid");
+ g_warning ("failed to get the uid");
goto out;
}
/* get session */
session = pk_dbus_get_session (engine->priv->dbus, sender);
if (session == NULL) {
- egg_warning ("failed to get the session");
+ g_warning ("failed to get the session");
goto out;
}
/* save to database */
ret = pk_transaction_db_set_proxy (engine->priv->transaction_db, uid, session, proxy_http, proxy_ftp);
if (!ret) {
- egg_warning ("failed to save the proxy in the database");
+ g_warning ("failed to save the proxy in the database");
goto out;
}
out:
@@ -595,7 +594,7 @@ pk_engine_action_obtain_proxy_authorization_finished_cb (PolkitAuthority *author
/* admin already set value, so silently refuse value */
if (priv->using_hardcoded_proxy) {
- egg_debug ("cannot override admin set proxy");
+ g_debug ("cannot override admin set proxy");
dbus_g_method_return (state->context);
goto out;
}
@@ -610,8 +609,8 @@ pk_engine_action_obtain_proxy_authorization_finished_cb (PolkitAuthority *author
}
/* only set after the auth success */
- egg_debug ("changing http proxy to %s for %s", state->value1, state->sender);
- egg_debug ("changing ftp proxy to %s for %s", state->value2, state->sender);
+ g_debug ("changing http proxy to %s for %s", state->value1, state->sender);
+ g_debug ("changing ftp proxy to %s for %s", state->value2, state->sender);
/* all okay */
dbus_g_method_return (state->context);
@@ -643,14 +642,14 @@ pk_engine_is_proxy_unchanged (PkEngine *engine, const gchar *sender, const gchar
/* get uid */
uid = pk_dbus_get_uid (engine->priv->dbus, sender);
if (uid == G_MAXUINT) {
- egg_warning ("failed to get the uid for %s", sender);
+ g_warning ("failed to get the uid for %s", sender);
goto out;
}
/* get session */
session = pk_dbus_get_session (engine->priv->dbus, sender);
if (session == NULL) {
- egg_warning ("failed to get the session for %s", sender);
+ g_warning ("failed to get the session for %s", sender);
goto out;
}
@@ -693,7 +692,7 @@ pk_engine_set_proxy (PkEngine *engine, const gchar *proxy_http, const gchar *pro
if (proxy_ftp != NULL && proxy_ftp[0] == '\0')
proxy_ftp = NULL;
- egg_debug ("SetProxy method called: %s, %s", proxy_http, proxy_ftp);
+ g_debug ("SetProxy method called: %s, %s", proxy_http, proxy_ftp);
/* check length of http */
len = egg_strlen (proxy_http, 1024);
@@ -717,7 +716,7 @@ pk_engine_set_proxy (PkEngine *engine, const gchar *proxy_http, const gchar *pro
/* is exactly the same proxy? */
ret = pk_engine_is_proxy_unchanged (engine, sender, proxy_http, proxy_ftp);
if (ret) {
- egg_debug ("not changing proxy as the same as before");
+ g_debug ("not changing proxy as the same as before");
dbus_g_method_return (context);
goto out;
}
@@ -750,7 +749,7 @@ pk_engine_set_proxy (PkEngine *engine, const gchar *proxy_http, const gchar *pro
/* check_authorization ref's this */
g_object_unref (details);
#else
- egg_warning ("*** THERE IS NO SECURITY MODEL BEING USED!!! ***");
+ g_warning ("*** THERE IS NO SECURITY MODEL BEING USED!!! ***");
/* try to set the new proxy and save to database */
ret = pk_engine_set_proxy_internal (engine, sender, proxy_http, proxy_ftp);
@@ -787,28 +786,28 @@ pk_engine_set_root_internal (PkEngine *engine, const gchar *root, const gchar *s
/* try to set the new root */
ret = pk_backend_set_root (engine->priv->backend, root);
if (!ret) {
- egg_warning ("setting the root failed");
+ g_warning ("setting the root failed");
goto out;
}
/* get uid */
uid = pk_dbus_get_uid (engine->priv->dbus, sender);
if (uid == G_MAXUINT) {
- egg_warning ("failed to get the uid");
+ g_warning ("failed to get the uid");
goto out;
}
/* get session */
session = pk_dbus_get_session (engine->priv->dbus, sender);
if (session == NULL) {
- egg_warning ("failed to get the session");
+ g_warning ("failed to get the session");
goto out;
}
/* save to database */
ret = pk_transaction_db_set_root (engine->priv->transaction_db, uid, session, root);
if (!ret) {
- egg_warning ("failed to save the root in the database");
+ g_warning ("failed to save the root in the database");
goto out;
}
out:
@@ -859,7 +858,7 @@ pk_engine_action_obtain_root_authorization_finished_cb (PolkitAuthority *authori
}
/* save these so we can set them after the auth success */
- egg_debug ("changing root to %s for %s", state->value1, state->sender);
+ g_debug ("changing root to %s for %s", state->value1, state->sender);
/* all okay */
dbus_g_method_return (state->context);
@@ -890,14 +889,14 @@ pk_engine_is_root_unchanged (PkEngine *engine, const gchar *sender, const gchar
/* get uid */
uid = pk_dbus_get_uid (engine->priv->dbus, sender);
if (uid == G_MAXUINT) {
- egg_warning ("failed to get the uid for %s", sender);
+ g_warning ("failed to get the uid for %s", sender);
goto out;
}
/* get session */
session = pk_dbus_get_session (engine->priv->dbus, sender);
if (session == NULL) {
- egg_warning ("failed to get the session for %s", sender);
+ g_warning ("failed to get the session for %s", sender);
goto out;
}
@@ -937,7 +936,7 @@ pk_engine_set_root (PkEngine *engine, const gchar *root, DBusGMethodInvocation *
root[0] == '\0')
root = "/";
- egg_debug ("SetRoot method called: %s", root);
+ g_debug ("SetRoot method called: %s", root);
/* check length of root */
len = egg_strlen (root, 1024);
@@ -960,7 +959,7 @@ pk_engine_set_root (PkEngine *engine, const gchar *root, DBusGMethodInvocation *
/* is exactly the same root? */
ret = pk_engine_is_root_unchanged (engine, sender, root);
if (ret) {
- egg_debug ("not changing root as the same as before");
+ g_debug ("not changing root as the same as before");
dbus_g_method_return (context);
goto out;
}
@@ -969,7 +968,7 @@ pk_engine_set_root (PkEngine *engine, const gchar *root, DBusGMethodInvocation *
if (g_strcmp0 (root, "/") == 0) {
ret = pk_engine_set_root_internal (engine, root, sender);
if (ret) {
- egg_debug ("using default root, so no need to authenticate");
+ g_debug ("using default root, so no need to authenticate");
dbus_g_method_return (context);
} else {
error = g_error_new (PK_ENGINE_ERROR, PK_ENGINE_ERROR_CANNOT_SET_ROOT, "%s", "setting the root failed");
@@ -1005,7 +1004,7 @@ pk_engine_set_root (PkEngine *engine, const gchar *root, DBusGMethodInvocation *
/* check_authorization ref's this */
g_object_unref (details);
#else
- egg_warning ("*** THERE IS NO SECURITY MODEL BEING USED!!! ***");
+ g_warning ("*** THERE IS NO SECURITY MODEL BEING USED!!! ***");
/* try to set the new root and save to database */
ret = pk_engine_set_root_internal (engine, root, sender);
@@ -1351,7 +1350,7 @@ static void
pk_engine_conf_file_changed_cb (PkFileMonitor *file_monitor, PkEngine *engine)
{
g_return_if_fail (PK_IS_ENGINE (engine));
- egg_debug ("setting shutdown_as_soon_as_possible TRUE");
+ g_debug ("setting shutdown_as_soon_as_possible TRUE");
engine->priv->shutdown_as_soon_as_possible = TRUE;
}
@@ -1362,7 +1361,7 @@ static void
pk_engine_binary_file_changed_cb (PkFileMonitor *file_monitor, PkEngine *engine)
{
g_return_if_fail (PK_IS_ENGINE (engine));
- egg_debug ("setting notify_clients_of_upgrade TRUE");
+ g_debug ("setting notify_clients_of_upgrade TRUE");
engine->priv->notify_clients_of_upgrade = TRUE;
}
@@ -1381,7 +1380,7 @@ pk_engine_network_state_changed_cb (PkNetwork *network, PkNetworkEnum network_st
engine->priv->network_state = network_state;
/* emit */
- egg_debug ("emitting changed");
+ g_debug ("emitting changed");
g_signal_emit (engine, signals[SIGNAL_CHANGED], 0);
}
@@ -1416,7 +1415,7 @@ pk_engine_init (PkEngine *engine)
/* clear the download cache */
filename = g_build_filename (LOCALSTATEDIR, "cache", "PackageKit", "downloads", NULL);
- egg_debug ("clearing download cache at %s", filename);
+ g_debug ("clearing download cache at %s", filename);
pk_directory_remove_contents (filename);
g_free (filename);
@@ -1428,7 +1427,7 @@ pk_engine_init (PkEngine *engine)
/* lock database */
ret = pk_backend_lock (engine->priv->backend);
if (!ret)
- egg_error ("could not lock backend, you need to restart the daemon");
+ g_error ("could not lock backend, you need to restart the daemon");
/* proxy the network state */
engine->priv->network = pk_network_new ();
@@ -1471,7 +1470,7 @@ pk_engine_init (PkEngine *engine)
/* get another connection */
connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
if (connection == NULL)
- egg_error ("no connection");
+ g_error ("no connection");
/* add the interface */
engine->priv->notify = pk_notify_new ();
@@ -1560,7 +1559,7 @@ pk_engine_finalize (GObject *object)
/* unlock if we locked this */
ret = pk_backend_unlock (engine->priv->backend);
if (!ret)
- egg_warning ("couldn't unlock the backend");
+ g_warning ("couldn't unlock the backend");
/* if we set an state changed notifier, clear */
if (engine->priv->timeout_priority_id != 0) {
diff --git a/src/pk-file-monitor.c b/src/pk-file-monitor.c
index 7c78c28..c7b3552 100644
--- a/src/pk-file-monitor.c
+++ b/src/pk-file-monitor.c
@@ -37,7 +37,6 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
-#include "egg-debug.h"
#include "pk-conf.h"
#include "pk-file-monitor.h"
@@ -89,7 +88,7 @@ static void
pk_file_monitor_monitor_changed (GFileMonitor *monitor, GFile *file, GFile *other_file,
GFileMonitorEvent event_type, PkFileMonitor *file_monitor)
{
- egg_debug ("emit: file-changed");
+ g_debug ("emit: file-changed");
g_signal_emit (file_monitor, signals [PK_FILE_MONITOR_CHANGED], 0);
}
@@ -102,7 +101,7 @@ pk_file_monitor_set_file (PkFileMonitor *file_monitor, const gchar *filename)
GError *error = NULL;
if (file_monitor->priv->file != NULL) {
- egg_warning ("already set file monitor, so can't set %s", filename);
+ g_warning ("already set file monitor, so can't set %s", filename);
return FALSE;
}
@@ -112,13 +111,13 @@ pk_file_monitor_set_file (PkFileMonitor *file_monitor, const gchar *filename)
/* watch this */
file_monitor->priv->monitor = g_file_monitor_file (file_monitor->priv->file, G_FILE_MONITOR_NONE, NULL, &error);
if (file_monitor->priv->monitor == NULL) {
- egg_warning ("failed to setup watch: %s", error->message);
+ g_warning ("failed to setup watch: %s", error->message);
g_error_free (error);
return FALSE;
}
/* we should get notified of changes */
- egg_debug ("watching for changes: %s", filename);
+ g_debug ("watching for changes: %s", filename);
g_file_monitor_set_rate_limit (file_monitor->priv->monitor, PK_FILE_MONITOR_RATE_LIMIT);
g_signal_connect (file_monitor->priv->monitor, "changed",
G_CALLBACK (pk_file_monitor_monitor_changed), file_monitor);
diff --git a/src/pk-inhibit.c b/src/pk-inhibit.c
index 5f0b034..80173d3 100644
--- a/src/pk-inhibit.c
+++ b/src/pk-inhibit.c
@@ -33,7 +33,6 @@
#include <glib.h>
#include <dbus/dbus-glib.h>
-#include "egg-debug.h"
#include "pk-inhibit.h"
#define PK_INHIBIT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_INHIBIT, PkInhibitPrivate))
@@ -42,7 +41,6 @@
#define HAL_DBUS_INTERFACE_DEVICE "org.freedesktop.Hal.Device"
#define HAL_DBUS_INTERFACE_PM "org.freedesktop.Hal.Device.SystemPowerManagement"
-
struct PkInhibitPrivate
{
GPtrArray *array;
@@ -82,11 +80,11 @@ pk_inhibit_lock (PkInhibit *inhibit)
g_return_val_if_fail (PK_IS_INHIBIT (inhibit), FALSE);
if (inhibit->priv->proxy == NULL) {
- egg_warning ("not connected to HAL");
+ g_warning ("not connected to HAL");
return FALSE;
}
if (inhibit->priv->is_locked) {
- egg_warning ("already inhibited, not trying again");
+ g_warning ("already inhibited, not trying again");
return FALSE;
}
@@ -102,7 +100,7 @@ pk_inhibit_lock (PkInhibit *inhibit)
}
if (ret) {
inhibit->priv->is_locked = TRUE;
- egg_debug ("emit lock %i", inhibit->priv->is_locked);
+ g_debug ("emit lock %i", inhibit->priv->is_locked);
g_signal_emit (inhibit, signals [PK_INHIBIT_LOCKED], 0, inhibit->priv->is_locked);
}
@@ -121,11 +119,11 @@ pk_inhibit_unlock (PkInhibit *inhibit)
g_return_val_if_fail (PK_IS_INHIBIT (inhibit), FALSE);
if (inhibit->priv->proxy == NULL) {
- egg_warning ("not connected to HAL");
+ g_warning ("not connected to HAL");
return FALSE;
}
if (inhibit->priv->is_locked == FALSE) {
- egg_warning ("not inhibited, not trying to unlock");
+ g_warning ("not inhibited, not trying to unlock");
return FALSE;
}
@@ -141,7 +139,7 @@ pk_inhibit_unlock (PkInhibit *inhibit)
}
if (ret) {
inhibit->priv->is_locked = FALSE;
- egg_debug ("emit lock %i", inhibit->priv->is_locked);
+ g_debug ("emit lock %i", inhibit->priv->is_locked);
g_signal_emit (inhibit, signals [PK_INHIBIT_LOCKED], 0, inhibit->priv->is_locked);
}
@@ -161,7 +159,7 @@ pk_inhibit_add (PkInhibit *inhibit, gpointer data)
for (i=0; i<inhibit->priv->array->len; i++) {
if (g_ptr_array_index (inhibit->priv->array, i) == data) {
- egg_debug ("trying to add item %p already in array", data);
+ g_debug ("trying to add item %p already in array", data);
return FALSE;
}
}
@@ -191,7 +189,7 @@ pk_inhibit_remove (PkInhibit *inhibit, gpointer data)
return ret;
}
}
- egg_debug ("cannot find item %p", data);
+ g_debug ("cannot find item %p", data);
return FALSE;
}
@@ -211,7 +209,7 @@ pk_inhibit_finalize (GObject *object)
if (inhibit->priv->is_locked) {
ret = pk_inhibit_unlock (inhibit);
if (!ret)
- egg_warning ("failed to unock on finalise!");
+ g_warning ("failed to unock on finalise!");
}
/* no need to free the data in the array */
g_ptr_array_free (inhibit->priv->array, TRUE);
@@ -256,7 +254,7 @@ pk_inhibit_init (PkInhibit *inhibit)
/* connect to system bus */
connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (error != NULL) {
- egg_warning ("Cannot connect to system bus: %s", error->message);
+ g_warning ("Cannot connect to system bus: %s", error->message);
g_error_free (error);
return;
}
@@ -266,7 +264,7 @@ pk_inhibit_init (PkInhibit *inhibit)
HAL_DBUS_SERVICE, HAL_DBUS_PATH_COMPUTER,
HAL_DBUS_INTERFACE_DEVICE, &error);
if (error != NULL) {
- egg_warning ("Cannot connect to HAL: %s", error->message);
+ g_warning ("Cannot connect to HAL: %s", error->message);
g_error_free (error);
}
diff --git a/src/pk-lsof.c b/src/pk-lsof.c
index 79b7136..c278090 100644
--- a/src/pk-lsof.c
+++ b/src/pk-lsof.c
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <glib.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-lsof.h"
@@ -155,7 +154,7 @@ pk_lsof_refresh (PkLsof *lsof)
/* run lsof to get all data */
ret = g_spawn_command_line_sync ("/usr/sbin/lsof -Fpfn", &stdout, &stderr, NULL, &error);
if (!ret) {
- egg_warning ("failed to get pids: %s", error->message);
+ g_warning ("failed to get pids: %s", error->message);
g_error_free (error);
goto out;
}
@@ -179,7 +178,7 @@ pk_lsof_refresh (PkLsof *lsof)
/* parse PID */
ret = egg_strtoint (value, &pid);
if (!ret) {
- egg_warning ("failed to parse pid: '%s'", value);
+ g_warning ("failed to parse pid: '%s'", value);
pid = -1;
goto out;
}
@@ -209,7 +208,7 @@ pk_lsof_refresh (PkLsof *lsof)
}
break;
default:
- egg_debug ("ignoring %c=%s (type=%s)", mode, value, pk_lsof_type_to_string (type));
+ g_debug ("ignoring %c=%s (type=%s)", mode, value, pk_lsof_type_to_string (type));
break;
}
}
@@ -241,7 +240,7 @@ pk_lsof_get_pids_for_filenames (PkLsof *lsof, gchar **filenames)
if (list_data->len == 0) {
ret = pk_lsof_refresh (lsof);
if (!ret) {
- egg_warning ("failed to refresh");
+ g_warning ("failed to refresh");
goto out;
}
}
@@ -251,7 +250,7 @@ pk_lsof_get_pids_for_filenames (PkLsof *lsof, gchar **filenames)
for (i=0; filenames[i] != NULL; i++) {
for (j=0; j < list_data->len; j++) {
data = g_ptr_array_index (list_data, j);
- egg_debug ("got %s", data->filename);
+ g_debug ("got %s", data->filename);
if (g_strcmp0 (filenames[i], data->filename) == 0) {
pk_lsof_add_pid (pids, data->pid);
}
diff --git a/src/pk-main.c b/src/pk-main.c
index a2c55bb..fb269bd 100644
--- a/src/pk-main.c
+++ b/src/pk-main.c
@@ -31,8 +31,8 @@
#include <glib/gi18n.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include <packagekit-glib2/pk-debug.h>
-#include "egg-debug.h"
#include "egg-dbus-monitor.h"
#include "pk-conf.h"
@@ -80,7 +80,7 @@ pk_object_register (DBusGConnection *connection, GObject *object, GError **error
/* abort as the DBUS method failed */
if (!ret) {
- egg_warning ("RequestName failed!");
+ g_warning ("RequestName failed!");
g_clear_error (error);
message = g_strdup_printf ("%s\n%s\n* %s\n* %s '%s'\n",
/* TRANSLATORS: failed due to DBus security */
@@ -136,9 +136,9 @@ pk_main_timeout_check_cb (PkEngine *engine)
{
guint idle;
idle = pk_engine_get_seconds_idle (engine);
- egg_debug ("idle is %i", idle);
+ g_debug ("idle is %i", idle);
if (idle > exit_idle_time) {
- egg_warning ("exit!!");
+ g_warning ("exit!!");
g_main_loop_quit (loop);
return FALSE;
}
@@ -151,7 +151,7 @@ pk_main_timeout_check_cb (PkEngine *engine)
static void
pk_main_quit_cb (PkEngine *engine, GMainLoop *mainloop)
{
- egg_debug ("engine quit");
+ g_debug ("engine quit");
g_main_loop_quit (mainloop);
}
@@ -161,7 +161,7 @@ pk_main_quit_cb (PkEngine *engine, GMainLoop *mainloop)
static void
pk_main_sigint_handler (int sig)
{
- egg_debug ("Handling SIGINT");
+ g_debug ("Handling SIGINT");
/* restore default ASAP, as the finalisers might hang */
signal (SIGINT, SIG_DFL);
@@ -229,7 +229,7 @@ main (int argc, char *argv[])
/* TRANSLATORS: describing the service that is running */
context = g_option_context_new (_("PackageKit service"));
g_option_context_add_main_entries (context, options, NULL);
- g_option_context_add_group (context, egg_debug_get_option_group ());
+ g_option_context_add_group (context, pk_debug_get_option_group ());
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
@@ -284,17 +284,15 @@ main (int argc, char *argv[])
/* do we log? */
do_logging = pk_conf_get_bool (conf, "TransactionLogging");
- egg_debug ("Log all transactions: %i", do_logging);
- if (do_logging)
- egg_debug_set_log_filename ("/var/log/PackageKit");
+ g_debug ("Log all transactions: %i", do_logging);
/* after how long do we timeout? */
exit_idle_time = pk_conf_get_int (conf, "ShutdownTimeout");
- egg_debug ("daemon shutdown set to %i seconds", exit_idle_time);
+ g_debug ("daemon shutdown set to %i seconds", exit_idle_time);
if (backend_name == NULL) {
backend_name = pk_conf_get_string (conf, "DefaultBackend");
- egg_debug ("using default backend %s", backend_name);
+ g_debug ("using default backend %s", backend_name);
}
/* load our chosen backend */
@@ -304,7 +302,7 @@ main (int argc, char *argv[])
/* all okay? */
if (!ret)
- egg_error ("cannot continue, backend invalid");
+ g_error ("cannot continue, backend invalid");
loop = g_main_loop_new (NULL, FALSE);
diff --git a/src/pk-network-stack-connman.c b/src/pk-network-stack-connman.c
index f28150c..01c04c7 100644
--- a/src/pk-network-stack-connman.c
+++ b/src/pk-network-stack-connman.c
@@ -26,7 +26,6 @@
#include <glib-object.h>
#include <dbus/dbus-glib.h>
-#include "egg-debug.h"
#include "egg-dbus-monitor.h"
#include "pk-network-stack-connman.h"
@@ -132,7 +131,7 @@ pk_network_stack_connman_get_state (PkNetworkStack *nstack)
for (list = services_list; list; list = list->next) {
gchar *path = list->data;
- egg_debug ("service path is %s", path);
+ g_debug ("service path is %s", path);
proxy_service = dbus_g_proxy_new_for_name (connection,
CONNMAN_DBUS_NAME,
@@ -167,7 +166,7 @@ pk_network_stack_connman_get_state (PkNetworkStack *nstack)
value = g_hash_table_lookup (hash_service, "Type");
type = pk_network_stack_connman_get_connection_type (value);
- egg_debug ("network type is %s", pk_network_enum_to_string (type));
+ g_debug ("network type is %s", pk_network_enum_to_string (type));
g_object_unref (proxy_service);
return type;
}
@@ -192,7 +191,7 @@ pk_network_stack_connman_state_changed (DBusGProxy *proxy, const char *property,
network_state = PK_NETWORK_ENUM_ONLINE;
else
network_state = PK_NETWORK_ENUM_OFFLINE;
- egg_debug ("emitting network-state-changed: %s", pk_network_enum_to_string (network_state));
+ g_debug ("emitting network-state-changed: %s", pk_network_enum_to_string (network_state));
g_signal_emit_by_name (PK_NETWORK_STACK (nstack_connman), "state-changed", network_state);
}
@@ -234,7 +233,7 @@ pk_network_stack_connman_init (PkNetworkStackConnman *nstack_connman)
/* get system connection */
nstack_connman->priv->bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (nstack_connman->priv->bus == NULL) {
- egg_warning ("Couldn't connect to system bus: %s", error->message);
+ g_warning ("Couldn't connect to system bus: %s", error->message);
g_error_free (error);
return;
}
@@ -246,7 +245,7 @@ pk_network_stack_connman_init (PkNetworkStackConnman *nstack_connman)
/* ConnMan isn't up, so we can't use it */
if (nstack_connman->priv->is_enabled && !service_alive) {
- egg_warning ("UseNetworkConnman true, but %s not up", CONNMAN_DBUS_NAME);
+ g_warning ("UseNetworkConnman true, but %s not up", CONNMAN_DBUS_NAME);
nstack_connman->priv->is_enabled = FALSE;
}
@@ -257,7 +256,7 @@ pk_network_stack_connman_init (PkNetworkStackConnman *nstack_connman)
nstack_connman->priv->proxy = proxy;
if (error != NULL) {
- egg_warning ("Cannot connect to connman: %s", error->message);
+ g_warning ("Cannot connect to connman: %s", error->message);
g_error_free (error);
return;
}
diff --git a/src/pk-network-stack-nm.c b/src/pk-network-stack-nm.c
index e28c990..bb34d16 100644
--- a/src/pk-network-stack-nm.c
+++ b/src/pk-network-stack-nm.c
@@ -26,7 +26,6 @@
#include <dbus/dbus-glib.h>
#include <NetworkManager.h>
-#include "egg-debug.h"
#include "egg-dbus-monitor.h"
#include "pk-network-stack-nm.h"
@@ -88,7 +87,7 @@ pk_network_stack_nm_get_active_connection_type_for_device (PkNetworkStackNm *nst
goto out;
}
type = g_value_get_uint (&value);
- egg_debug ("type: %i", type);
+ g_debug ("type: %i", type);
out:
g_object_unref (proxy);
return type;
@@ -112,7 +111,6 @@ pk_network_stack_nm_get_active_connection_type_for_connection (PkNetworkStackNm
NMDeviceType type_tmp;
NMDeviceType type = NM_DEVICE_TYPE_UNKNOWN;
-
/* get if the device is default */
proxy = dbus_g_proxy_new_for_name (nstack_nm->priv->bus, "org.freedesktop.NetworkManager",
active_connection, "org.freedesktop.DBus.Properties");
@@ -128,9 +126,9 @@ pk_network_stack_nm_get_active_connection_type_for_connection (PkNetworkStackNm
goto out;
}
is_default = g_value_get_boolean (&value_default);
- egg_debug ("is_default: %i", is_default);
+ g_debug ("is_default: %i", is_default);
if (!is_default) {
- egg_debug ("not default, skipping");
+ g_debug ("not default, skipping");
goto out;
}
@@ -148,7 +146,7 @@ pk_network_stack_nm_get_active_connection_type_for_connection (PkNetworkStackNm
}
devices = g_value_get_boxed (&value_devices);
- egg_debug ("number of devices: %i", devices->len);
+ g_debug ("number of devices: %i", devices->len);
if (devices->len == 0)
goto out;
@@ -197,7 +195,7 @@ pk_network_stack_nm_get_active_connection_type (PkNetworkStackNm *nstack_nm)
}
active_connections = g_value_get_boxed (&value);
- egg_debug ("active connections: %i", active_connections->len);
+ g_debug ("active connections: %i", active_connections->len);
if (active_connections->len == 0)
goto out;
@@ -247,7 +245,7 @@ pk_network_stack_nm_get_state (PkNetworkStack *nstack)
ret = PK_NETWORK_ENUM_ONLINE;
}
- egg_debug ("network state is %s", pk_network_enum_to_string (ret));
+ g_debug ("network state is %s", pk_network_enum_to_string (ret));
return ret;
}
@@ -263,12 +261,12 @@ pk_network_stack_nm_status_changed_cb (DBusGProxy *proxy, guint status, PkNetwor
/* do not use */
if (!nstack_nm->priv->is_enabled) {
- egg_debug ("not enabled, so ignoring");
+ g_debug ("not enabled, so ignoring");
return;
}
state = pk_network_stack_nm_get_state (PK_NETWORK_STACK (nstack_nm));
- egg_debug ("emitting network-state-changed: %s", pk_network_enum_to_string (state));
+ g_debug ("emitting network-state-changed: %s", pk_network_enum_to_string (state));
g_signal_emit_by_name (PK_NETWORK_STACK (nstack_nm), "state-changed", state);
}
@@ -302,7 +300,7 @@ pk_network_stack_nm_init (PkNetworkStackNm *nstack_nm)
/* get system connection */
nstack_nm->priv->bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (nstack_nm->priv->bus == NULL) {
- egg_warning ("Couldn't connect to system bus: %s", error->message);
+ g_warning ("Couldn't connect to system bus: %s", error->message);
g_error_free (error);
}
@@ -322,7 +320,7 @@ pk_network_stack_nm_init (PkNetworkStackNm *nstack_nm)
/* NetworkManager isn't up, so we can't use it */
if (nstack_nm->priv->is_enabled && !service_alive) {
- egg_warning ("UseNetworkManager true, but org.freedesktop.NetworkManager not up");
+ g_warning ("UseNetworkManager true, but org.freedesktop.NetworkManager not up");
nstack_nm->priv->is_enabled = FALSE;
}
}
diff --git a/src/pk-network-stack-unix.c b/src/pk-network-stack-unix.c
index 79b51b7..54b9f65 100644
--- a/src/pk-network-stack-unix.c
+++ b/src/pk-network-stack-unix.c
@@ -36,7 +36,6 @@
#include <glib.h>
#include <glib-object.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-network-stack-unix.h"
@@ -74,7 +73,7 @@ pk_network_stack_unix_is_valid (const gchar *line)
/* tab delimited */
sections = g_strsplit (line, "\t", 0);
if (sections == NULL) {
- egg_warning ("unable to split %s", PK_NETWORK_PROC_ROUTE);
+ g_warning ("unable to split %s", PK_NETWORK_PROC_ROUTE);
goto out;
}
@@ -89,20 +88,20 @@ pk_network_stack_unix_is_valid (const gchar *line)
/* is correct parameters? */
number_sections = g_strv_length (sections);
if (number_sections != 11) {
- egg_warning ("invalid line '%s' (%i)", line, number_sections);
+ g_warning ("invalid line '%s' (%i)", line, number_sections);
goto out;
}
/* is destination zero (default route)? */
if (g_strcmp0 (sections[1], "00000000") == 0) {
- egg_debug ("destination %s is valid", sections[0]);
+ g_debug ("destination %s is valid", sections[0]);
online = TRUE;
goto out;
}
/* is gateway nonzero? */
if (g_strcmp0 (sections[2], "00000000") != 0) {
- egg_debug ("interface %s is valid", sections[0]);
+ g_debug ("interface %s is valid", sections[0]);
online = TRUE;
goto out;
}
@@ -129,7 +128,7 @@ pk_network_stack_unix_get_state (PkNetworkStack *nstack)
/* hack, because netlink is teh suck */
ret = g_file_get_contents (PK_NETWORK_PROC_ROUTE, &contents, NULL, &error);
if (!ret) {
- egg_warning ("could not open %s: %s", PK_NETWORK_PROC_ROUTE, error->message);
+ g_warning ("could not open %s: %s", PK_NETWORK_PROC_ROUTE, error->message);
g_error_free (error);
/* no idea whatsoever! */
goto out;
@@ -137,14 +136,14 @@ pk_network_stack_unix_get_state (PkNetworkStack *nstack)
/* something insane */
if (contents == NULL) {
- egg_warning ("insane contents of %s", PK_NETWORK_PROC_ROUTE);
+ g_warning ("insane contents of %s", PK_NETWORK_PROC_ROUTE);
goto out;
}
/* one line per interface */
lines = g_strsplit (contents, "\n", 0);
if (lines == NULL) {
- egg_warning ("unable to split %s", PK_NETWORK_PROC_ROUTE);
+ g_warning ("unable to split %s", PK_NETWORK_PROC_ROUTE);
goto out;
}
@@ -177,20 +176,20 @@ pk_network_stack_unix_file_monitor_changed_cb (PkFileMonitor *file_monitor, PkNe
/* do not use */
if (!nstack_unix->priv->is_enabled) {
- egg_debug ("not enabled, so ignoring");
+ g_debug ("not enabled, so ignoring");
return;
}
/* same state? */
state = pk_network_stack_unix_get_state (PK_NETWORK_STACK (nstack_unix));
if (state == nstack_unix->priv->state_old) {
- egg_debug ("same state");
+ g_debug ("same state");
return;
}
/* new state */
nstack_unix->priv->state_old = state;
- egg_debug ("emitting network-state-changed: %s", pk_network_enum_to_string (state));
+ g_debug ("emitting network-state-changed: %s", pk_network_enum_to_string (state));
g_signal_emit_by_name (PK_NETWORK_STACK (nstack_unix), "state-changed", state);
}
diff --git a/src/pk-network.c b/src/pk-network.c
index 3e66b7f..e5c5f17 100644
--- a/src/pk-network.c
+++ b/src/pk-network.c
@@ -35,7 +35,6 @@
#include <glib/gi18n.h>
-#include "egg-debug.h"
#include "egg-dbus-monitor.h"
#include "pk-network.h"
#include "pk-network-stack.h"
@@ -112,7 +111,7 @@ pk_network_stack_state_changed_cb (PkNetworkStack *nstack, PkNetworkEnum state,
{
g_return_if_fail (PK_IS_NETWORK (network));
- egg_debug ("emitting network-state-changed: %s", pk_network_enum_to_string (state));
+ g_debug ("emitting network-state-changed: %s", pk_network_enum_to_string (state));
g_signal_emit (network, signals [PK_NETWORK_STATE_CHANGED], 0, state);
}
diff --git a/src/pk-notify.c b/src/pk-notify.c
index d533224..46884cb 100644
--- a/src/pk-notify.c
+++ b/src/pk-notify.c
@@ -33,7 +33,6 @@
#include <glib.h>
#include <dbus/dbus-glib.h>
-#include "egg-debug.h"
#include "pk-notify.h"
#include "pk-marshal.h"
@@ -64,7 +63,7 @@ pk_notify_repo_list_changed (PkNotify *notify)
{
g_return_val_if_fail (PK_IS_NOTIFY (notify), FALSE);
- egg_debug ("emitting repo-list-changed");
+ g_debug ("emitting repo-list-changed");
g_signal_emit (notify, signals [PK_NOTIFY_REPO_LIST_CHANGED], 0);
return TRUE;
}
@@ -77,7 +76,7 @@ pk_notify_updates_changed (PkNotify *notify)
{
g_return_val_if_fail (PK_IS_NOTIFY (notify), FALSE);
- egg_debug ("emitting updates-changed");
+ g_debug ("emitting updates-changed");
g_signal_emit (notify, signals [PK_NOTIFY_UPDATES_CHANGED], 0);
return TRUE;
}
@@ -94,7 +93,6 @@ pk_notify_finished_updates_changed_cb (gpointer data)
return FALSE;
}
-
/**
* pk_notify_wait_updates_changed:
**/
@@ -105,7 +103,7 @@ pk_notify_wait_updates_changed (PkNotify *notify, guint timeout)
/* check if we did this more than once */
if (notify->priv->timeout_id != 0) {
- egg_warning ("already scheduled");
+ g_warning ("already scheduled");
return FALSE;
}
diff --git a/src/pk-proc.c b/src/pk-proc.c
index 7967d19..f884089 100644
--- a/src/pk-proc.c
+++ b/src/pk-proc.c
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <glib.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-proc.h"
@@ -117,7 +116,7 @@ pk_proc_refresh_add_file (PkProc *proc, const gchar *pid_text, const gchar *path
/* get cmdline */
ret = g_file_get_contents (path, &cmdline, NULL, &error);
if (!ret) {
- egg_warning ("failed to get cmdline: %s", error->message);
+ g_warning ("failed to get cmdline: %s", error->message);
g_error_free (error);
goto out;
}
@@ -142,7 +141,7 @@ pk_proc_refresh_add_file (PkProc *proc, const gchar *pid_text, const gchar *path
} else {
cmdline_full = pk_proc_refresh_find_file (cmdline);
if (cmdline_full == NULL) {
- egg_warning ("cannot find in any bin dir: %s", cmdline);
+ g_warning ("cannot find in any bin dir: %s", cmdline);
ret = FALSE;
goto out;
}
@@ -151,7 +150,7 @@ pk_proc_refresh_add_file (PkProc *proc, const gchar *pid_text, const gchar *path
/* check if path exists */
ret = g_file_test (cmdline_full, G_FILE_TEST_IS_REGULAR);
if (!ret) {
- egg_warning ("cmdline does not exist: %s", cmdline_full);
+ g_warning ("cmdline does not exist: %s", cmdline_full);
goto out;
}
@@ -180,7 +179,7 @@ pk_proc_refresh_add_file (PkProc *proc, const gchar *pid_text, const gchar *path
/* add data to array */
data = pk_proc_data_new (cmdline_full, pid, uid);
g_ptr_array_add (proc->priv->list_data, data);
- egg_debug ("adding %s pid:%i uid:%i", data->cmdline, data->pid, data->uid);
+ g_debug ("adding %s pid:%i uid:%i", data->cmdline, data->pid, data->uid);
out:
g_free (cmdline_full);
g_free (cmdline);
@@ -206,7 +205,7 @@ pk_proc_refresh (PkProc *proc)
/* open directory */
dir = g_dir_open ("/proc", 0, &error);
if (dir == NULL) {
- egg_warning ("failed to open directory: %s", error->message);
+ g_warning ("failed to open directory: %s", error->message);
g_error_free (error);
goto out;
}
diff --git a/src/pk-self-test.c b/src/pk-self-test.c
index 7d45b2a..14ed7cc 100644
--- a/src/pk-self-test.c
+++ b/src/pk-self-test.c
@@ -119,7 +119,7 @@ static guint number_packages = 0;
static void
pk_test_backend_message_cb (PkBackend *backend, PkMessageEnum message, const gchar *details, gpointer data)
{
- egg_debug ("details=%s", details);
+ g_debug ("details=%s", details);
number_messages++;
}
@@ -165,7 +165,7 @@ pk_test_backend_func_immediate_false (PkBackend *backend)
static void
pk_test_backend_package_cb (PkBackend *backend, PkPackage *package, gpointer user_data)
{
- egg_debug ("package:%s", pk_package_get_id (package));
+ g_debug ("package:%s", pk_package_get_id (package));
number_packages++;
}
@@ -878,7 +878,7 @@ guint finished_count = 0;
static void
pk_test_exit_cb (PkSpawn *spawn, PkSpawnExitType exit, gpointer user_data)
{
- egg_debug ("spawn exit=%i", exit);
+ g_debug ("spawn exit=%i", exit);
mexit = exit;
finished_count++;
_g_test_loop_quit ();
@@ -890,7 +890,7 @@ pk_test_exit_cb (PkSpawn *spawn, PkSpawnExitType exit, gpointer user_data)
static void
pk_test_stdout_cb (PkSpawn *spawn, const gchar *line, gpointer user_data)
{
- egg_debug ("stdout '%s'", line);
+ g_debug ("stdout '%s'", line);
stdout_count++;
}
@@ -1351,7 +1351,7 @@ pk_test_transaction_db_func (void)
ret = g_file_test (PK_TRANSACTION_DB_FILE, G_FILE_TEST_EXISTS);
if (ret) {
/* remove old local database */
- egg_warning ("Removing %s", PK_TRANSACTION_DB_FILE);
+ g_warning ("Removing %s", PK_TRANSACTION_DB_FILE);
value = g_unlink (PK_TRANSACTION_DB_FILE);
g_assert (value == 0);
}
@@ -1514,7 +1514,7 @@ pk_test_transaction_list_func (void)
ret = g_file_test ("./transactions.db", G_FILE_TEST_EXISTS);
if (ret) {
/* remove old local database */
- egg_warning ("Removing %s", "./transactions.db");
+ g_warning ("Removing %s", "./transactions.db");
size = g_unlink ("./transactions.db");
g_assert (size == 0);
}
@@ -1848,7 +1848,7 @@ main (int argc, char **argv)
if (! g_thread_supported ())
g_thread_init (NULL);
g_type_init ();
- egg_debug_init (&argc, &argv);
+ g_debug_init (&argc, &argv);
g_test_init (&argc, &argv, NULL);
/* components */
diff --git a/src/pk-shared.c b/src/pk-shared.c
index 9b833e5..99a9998 100644
--- a/src/pk-shared.c
+++ b/src/pk-shared.c
@@ -31,7 +31,6 @@
#include <glib.h>
#include <glib/gstdio.h>
-#include "egg-debug.h"
#include "pk-shared.h"
/**
@@ -52,7 +51,7 @@ pk_directory_remove_contents (const gchar *directory)
/* try to open */
dir = g_dir_open (directory, 0, &error);
if (dir == NULL) {
- egg_warning ("cannot open directory: %s", error->message);
+ g_warning ("cannot open directory: %s", error->message);
g_error_free (error);
goto out;
}
@@ -62,17 +61,17 @@ pk_directory_remove_contents (const gchar *directory)
src = g_build_filename (directory, filename, NULL);
ret = g_file_test (src, G_FILE_TEST_IS_DIR);
if (ret) {
- egg_debug ("directory %s found in %s, deleting", filename, directory);
+ g_debug ("directory %s found in %s, deleting", filename, directory);
/* recurse, but should be only 1 level deep */
pk_directory_remove_contents (src);
retval = g_remove (src);
if (retval != 0)
- egg_warning ("failed to delete %s", src);
+ g_warning ("failed to delete %s", src);
} else {
- egg_debug ("file found in %s, deleting", directory);
+ g_debug ("file found in %s, deleting", directory);
retval = g_unlink (src);
if (retval != 0)
- egg_warning ("failed to delete %s", src);
+ g_warning ("failed to delete %s", src);
}
g_free (src);
}
diff --git a/src/pk-spawn.c b/src/pk-spawn.c
index 2e04a09..21fb061 100644
--- a/src/pk-spawn.c
+++ b/src/pk-spawn.c
@@ -42,7 +42,6 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-spawn.h"
@@ -186,7 +185,7 @@ pk_spawn_check_child (PkSpawn *spawn)
/* this shouldn't happen */
if (spawn->priv->finished) {
- egg_warning ("finished twice!");
+ g_warning ("finished twice!");
return FALSE;
}
@@ -205,12 +204,12 @@ pk_spawn_check_child (PkSpawn *spawn)
/* Only print one in twenty times to avoid filling the screen */
if (limit_printing++ % 20 == 0)
- egg_debug ("polling child_pid=%ld (1/20)", (long)spawn->priv->child_pid);
+ g_debug ("polling child_pid=%ld (1/20)", (long)spawn->priv->child_pid);
/* check if the child exited */
pid = waitpid (spawn->priv->child_pid, &status, WNOHANG);
if (pid == -1) {
- egg_warning ("failed to get the child PID data for %ld", (long)spawn->priv->child_pid);
+ g_warning ("failed to get the child PID data for %ld", (long)spawn->priv->child_pid);
return TRUE;
}
if (pid == 0) {
@@ -218,7 +217,7 @@ pk_spawn_check_child (PkSpawn *spawn)
return TRUE;
}
if (pid != spawn->priv->child_pid) {
- egg_warning ("some other process id was returned: got %ld and wanted %ld",
+ g_warning ("some other process id was returned: got %ld and wanted %ld",
(long)pid, (long)spawn->priv->child_pid);
return TRUE;
}
@@ -242,30 +241,30 @@ pk_spawn_check_child (PkSpawn *spawn)
if (WIFSIGNALED (status)) {
retval = WTERMSIG (status);
if (retval == SIGQUIT) {
- egg_debug ("the child process was terminated by SIGQUIT");
+ g_debug ("the child process was terminated by SIGQUIT");
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_SIGQUIT;
} else if (retval == SIGKILL) {
- egg_debug ("the child process was terminated by SIGKILL");
+ g_debug ("the child process was terminated by SIGKILL");
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_SIGKILL;
} else {
- egg_warning ("the child process was terminated by signal %i", WTERMSIG (status));
+ g_warning ("the child process was terminated by signal %i", WTERMSIG (status));
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_SIGKILL;
}
} else {
/* check we are dead and buried */
if (!WIFEXITED (status)) {
- egg_warning ("the process did not exit, but waitpid() returned!");
+ g_warning ("the process did not exit, but waitpid() returned!");
return TRUE;
}
/* get the exit code */
retval = WEXITSTATUS (status);
if (retval == 0) {
- egg_debug ("the child exited with success");
+ g_debug ("the child exited with success");
if (spawn->priv->exit == PK_SPAWN_EXIT_TYPE_UNKNOWN)
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_SUCCESS;
} else {
- egg_warning ("the child exited with return code %i", retval);
+ g_warning ("the child exited with return code %i", retval);
if (spawn->priv->exit == PK_SPAWN_EXIT_TYPE_UNKNOWN)
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_FAILED;
}
@@ -287,7 +286,7 @@ pk_spawn_check_child (PkSpawn *spawn)
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_DISPATCHER_EXIT;
/* don't emit if we just closed an invalid dispatcher */
- egg_debug ("emitting exit %s", pk_spawn_exit_type_enum_to_string (spawn->priv->exit));
+ g_debug ("emitting exit %s", pk_spawn_exit_type_enum_to_string (spawn->priv->exit));
g_signal_emit (spawn, signals [SIGNAL_EXIT], 0, spawn->priv->exit);
return FALSE;
@@ -303,20 +302,20 @@ pk_spawn_sigkill_cb (PkSpawn *spawn)
/* check if process has already gone */
if (spawn->priv->finished) {
- egg_warning ("already finished, ignoring");
+ g_warning ("already finished, ignoring");
return FALSE;
}
/* set this in case the script catches the signal and exits properly */
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_SIGKILL;
- egg_debug ("sending SIGKILL %ld", (long)spawn->priv->child_pid);
+ g_debug ("sending SIGKILL %ld", (long)spawn->priv->child_pid);
retval = kill (spawn->priv->child_pid, SIGKILL);
if (retval == EINVAL) {
- egg_warning ("The signum argument is an invalid or unsupported number");
+ g_warning ("The signum argument is an invalid or unsupported number");
return FALSE;
} else if (retval == EPERM) {
- egg_warning ("You do not have the privilege to send a signal to the process");
+ g_warning ("You do not have the privilege to send a signal to the process");
return FALSE;
}
@@ -354,26 +353,26 @@ pk_spawn_kill (PkSpawn *spawn)
/* is there a process running? */
if (spawn->priv->child_pid == -1) {
- egg_warning ("no child pid to kill!");
+ g_warning ("no child pid to kill!");
return FALSE;
}
/* check if process has already gone */
if (spawn->priv->finished) {
- egg_warning ("already finished, ignoring");
+ g_warning ("already finished, ignoring");
return FALSE;
}
/* set this in case the script catches the signal and exits properly */
spawn->priv->exit = PK_SPAWN_EXIT_TYPE_SIGQUIT;
- egg_debug ("sending SIGQUIT %ld", (long)spawn->priv->child_pid);
+ g_debug ("sending SIGQUIT %ld", (long)spawn->priv->child_pid);
retval = kill (spawn->priv->child_pid, SIGQUIT);
if (retval == EINVAL) {
- egg_warning ("The signum argument is an invalid or unsupported number");
+ g_warning ("The signum argument is an invalid or unsupported number");
return FALSE;
} else if (retval == EPERM) {
- egg_warning ("You do not have the privilege to send a signal to the process");
+ g_warning ("You do not have the privilege to send a signal to the process");
return FALSE;
}
@@ -405,20 +404,20 @@ pk_spawn_send_stdin (PkSpawn *spawn, const gchar *command)
/* check if process has already gone */
if (spawn->priv->finished) {
- egg_warning ("already finished, ignoring");
+ g_warning ("already finished, ignoring");
ret = FALSE;
goto out;
}
/* is there a process running? */
if (spawn->priv->child_pid == -1) {
- egg_debug ("no child pid");
+ g_debug ("no child pid");
ret = FALSE;
goto out;
}
/* buffer always has to have trailing newline */
- egg_debug ("sending '%s'", command);
+ g_debug ("sending '%s'", command);
buffer = g_strdup_printf ("%s\n", command);
/* ITS4: ignore, we generated this */
@@ -427,7 +426,7 @@ pk_spawn_send_stdin (PkSpawn *spawn, const gchar *command)
/* write to the waiting process */
wrote = write (spawn->priv->stdin_fd, buffer, length);
if (wrote != length) {
- egg_warning ("wrote %i/%i bytes on fd %i (%s)", wrote, length, spawn->priv->stdin_fd, strerror (errno));
+ g_warning ("wrote %i/%i bytes on fd %i (%s)", wrote, length, spawn->priv->stdin_fd, strerror (errno));
ret = FALSE;
}
out:
@@ -451,7 +450,7 @@ pk_spawn_exit (PkSpawn *spawn)
/* check if already sending exit */
if (spawn->priv->is_sending_exit) {
- egg_warning ("already sending exit, ignoring");
+ g_warning ("already sending exit, ignoring");
return FALSE;
}
@@ -459,13 +458,13 @@ pk_spawn_exit (PkSpawn *spawn)
spawn->priv->is_sending_exit = TRUE;
ret = pk_spawn_send_stdin (spawn, "exit");
if (!ret) {
- egg_warning ("failed to send exit");
+ g_warning ("failed to send exit");
goto out;
}
/* block until the previous script exited */
do {
- egg_debug ("waiting for exit");
+ g_debug ("waiting for exit");
/* Usleep rather than g_main_loop_run -- we have to block.
* If we run the loop, other idle events can be processed,
* and this includes sending data to a new instance,
@@ -478,7 +477,7 @@ pk_spawn_exit (PkSpawn *spawn)
if (count < 500)
ret = TRUE;
else
- egg_warning ("failed to exit script");
+ g_warning ("failed to exit script");
out:
spawn->priv->is_sending_exit = FALSE;
return ret;
@@ -508,11 +507,11 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp, GError **error)
len = g_strv_length (argv);
for (i=0; i<len; i++)
- egg_debug ("argv[%i] '%s'", i, argv[i]);
+ g_debug ("argv[%i] '%s'", i, argv[i]);
if (envp != NULL) {
len = g_strv_length (envp);
for (i=0; i<len; i++)
- egg_debug ("envp[%i] '%s'", i, envp[i]);
+ g_debug ("envp[%i] '%s'", i, envp[i]);
}
/* check we are not using a closing instance */
@@ -527,30 +526,30 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp, GError **error)
* - all of envp are the same (proxy and locale settings) */
if (spawn->priv->stdin_fd != -1) {
if (g_strcmp0 (spawn->priv->last_argv0, argv[0]) != 0) {
- egg_debug ("argv did not match, not reusing");
+ g_debug ("argv did not match, not reusing");
} else if (!egg_strvequal (spawn->priv->last_envp, envp)) {
- egg_debug ("envp did not match, not reusing");
+ g_debug ("envp did not match, not reusing");
} else {
/* join with tabs, as spaces could be in file name */
command = g_strjoinv ("\t", &argv[1]);
/* reuse instance */
- egg_debug ("reusing instance");
+ g_debug ("reusing instance");
ret = pk_spawn_send_stdin (spawn, command);
g_free (command);
if (ret)
return TRUE;
/* so fall on through to kill and respawn */
- egg_warning ("failed to write, so trying to kill and respawn");
+ g_warning ("failed to write, so trying to kill and respawn");
}
/* kill off existing instance */
- egg_debug ("changing dispatcher (exit old instance)");
+ g_debug ("changing dispatcher (exit old instance)");
spawn->priv->is_changing_dispatcher = TRUE;
ret = pk_spawn_exit (spawn);
if (!ret) {
- egg_warning ("failed to exit previous instance");
+ g_warning ("failed to exit previous instance");
/* remove poll, as we can't reply on pk_spawn_check_child() */
if (spawn->priv->poll_id != 0) {
g_source_remove (spawn->priv->poll_id);
@@ -562,7 +561,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp, GError **error)
/* create spawned object for tracking */
spawn->priv->finished = FALSE;
- egg_debug ("creating new instance of %s", argv[0]);
+ g_debug ("creating new instance of %s", argv[0]);
ret = g_spawn_async_with_pipes (NULL, argv, envp,
G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
NULL, NULL, &spawn->priv->child_pid,
@@ -587,7 +586,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp, GError **error)
#if HAVE_SETPRIORITY
/* don't completely bog the system down */
if (nice_value != 0) {
- egg_debug ("renice to %i", nice_value);
+ g_debug ("renice to %i", nice_value);
setpriority (PRIO_PROCESS, spawn->priv->child_pid, nice_value);
}
#endif
@@ -598,7 +597,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp, GError **error)
key = "BackendSpawnIdleIOBackground";
idleio = pk_conf_get_bool (spawn->priv->conf, key);
if (idleio) {
- egg_debug ("setting ioprio class to idle");
+ g_debug ("setting ioprio class to idle");
pk_ioprio_set_idle (spawn->priv->child_pid);
}
@@ -616,7 +615,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp, GError **error)
/* sanity check */
if (spawn->priv->poll_id != 0) {
- egg_warning ("trying to set timeout when already set");
+ g_warning ("trying to set timeout when already set");
g_source_remove (spawn->priv->poll_id);
}
@@ -784,7 +783,7 @@ pk_spawn_finalize (GObject *object)
/* still running? */
if (spawn->priv->stdin_fd != -1) {
- egg_warning ("killing as still running");
+ g_warning ("killing as still running");
pk_spawn_kill (spawn);
/* just hope the script responded to SIGQUIT */
if (spawn->priv->kill_id != 0)
diff --git a/src/pk-store.c b/src/pk-store.c
index 85ccb5c..cd3204a 100644
--- a/src/pk-store.c
+++ b/src/pk-store.c
@@ -25,7 +25,6 @@
#include <glib.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-store.h"
@@ -60,9 +59,9 @@ pk_store_set_string (PkStore *store, const gchar *key, const gchar *data)
/* does already exist? */
ret = g_hash_table_remove (store->priv->hash_string, key);
if (ret)
- egg_debug ("already set data for %s, so removing", key);
+ g_debug ("already set data for %s, so removing", key);
- egg_debug ("saving '%s' for %s", data, key);
+ g_debug ("saving '%s' for %s", data, key);
g_hash_table_insert (store->priv->hash_string, g_strdup (key), (gpointer) g_strdup (data));
return TRUE;
}
@@ -85,9 +84,9 @@ pk_store_set_strv (PkStore *store, const gchar *key, gchar **data)
/* does already exist? */
ret = g_hash_table_remove (store->priv->hash_strv, key);
if (ret)
- egg_debug ("already set data for %s, so removing", key);
+ g_debug ("already set data for %s, so removing", key);
- egg_debug ("saving %p for %s", data, key);
+ g_debug ("saving %p for %s", data, key);
g_hash_table_insert (store->priv->hash_strv, g_strdup (key), (gpointer) g_strdupv (data));
return TRUE;
}
@@ -110,9 +109,9 @@ pk_store_set_array (PkStore *store, const gchar *key, GPtrArray *data)
/* does already exist? */
ret = g_hash_table_remove (store->priv->hash_array, key);
if (ret)
- egg_debug ("already set data for %s, so removing", key);
+ g_debug ("already set data for %s, so removing", key);
- egg_debug ("saving %p for %s", data, key);
+ g_debug ("saving %p for %s", data, key);
g_hash_table_insert (store->priv->hash_array, g_strdup (key), (gpointer) data);
return TRUE;
}
@@ -131,9 +130,9 @@ pk_store_set_uint (PkStore *store, const gchar *key, guint data)
/* does already exist? */
ret = g_hash_table_remove (store->priv->hash_pointer, key);
if (ret)
- egg_debug ("already set data for %s, so removing", key);
+ g_debug ("already set data for %s, so removing", key);
- egg_debug ("saving %i for %s", data, key);
+ g_debug ("saving %i for %s", data, key);
g_hash_table_insert (store->priv->hash_pointer, g_strdup (key), GINT_TO_POINTER (data+1));
return TRUE;
}
@@ -152,9 +151,9 @@ pk_store_set_bool (PkStore *store, const gchar *key, gboolean data)
/* does already exist? */
ret = g_hash_table_remove (store->priv->hash_pointer, key);
if (ret)
- egg_debug ("already set data for %s, so removing", key);
+ g_debug ("already set data for %s, so removing", key);
- egg_debug ("saving %i for %s", data, key);
+ g_debug ("saving %i for %s", data, key);
g_hash_table_insert (store->priv->hash_pointer, g_strdup (key), GINT_TO_POINTER (data+1));
return TRUE;
}
@@ -174,9 +173,9 @@ pk_store_set_pointer (PkStore *store, const gchar *key, gpointer data)
/* does already exist? */
ret = g_hash_table_remove (store->priv->hash_pointer, key);
if (ret)
- egg_debug ("already set data for %s, so removing", key);
+ g_debug ("already set data for %s, so removing", key);
- egg_debug ("saving %p for %s", data, key);
+ g_debug ("saving %p for %s", data, key);
g_hash_table_insert (store->priv->hash_pointer, g_strdup (key), GINT_TO_POINTER(GPOINTER_TO_INT(data)+1));
return TRUE;
}
@@ -194,7 +193,7 @@ pk_store_get_string (const PkStore *store, const gchar *key)
/* does already exist? */
value = g_hash_table_lookup (store->priv->hash_string, (gpointer) key);
if (value == NULL) {
- egg_warning ("not set data for %s", key);
+ g_warning ("not set data for %s", key);
return NULL;
}
return (const gchar *) value;
@@ -213,7 +212,7 @@ pk_store_get_strv (const PkStore *store, const gchar *key)
/* does already exist? */
value = g_hash_table_lookup (store->priv->hash_strv, (gpointer) key);
if (value == NULL) {
- egg_warning ("not set data for %s", key);
+ g_warning ("not set data for %s", key);
return NULL;
}
return (gchar **) value;
@@ -232,7 +231,7 @@ pk_store_get_array (const PkStore *store, const gchar *key)
/* does already exist? */
value = g_hash_table_lookup (store->priv->hash_array, (gpointer) key);
if (value == NULL) {
- egg_warning ("not set data for %s", key);
+ g_warning ("not set data for %s", key);
return NULL;
}
return (GPtrArray *) value;
@@ -251,7 +250,7 @@ pk_store_get_uint (const PkStore *store, const gchar *key)
/* does already exist? */
value = g_hash_table_lookup (store->priv->hash_pointer, (gpointer) key);
if (value == NULL) {
- egg_warning ("not set data for %s", key);
+ g_warning ("not set data for %s", key);
return 0;
}
/* we do the +1/-1 as NULL also means missing in the hash table */
@@ -271,7 +270,7 @@ pk_store_get_bool (const PkStore *store, const gchar *key)
/* does already exist? */
value = g_hash_table_lookup (store->priv->hash_pointer, (gpointer) key);
if (value == NULL) {
- egg_warning ("not set data for %s", key);
+ g_warning ("not set data for %s", key);
return FALSE;
}
return GPOINTER_TO_INT (value)-1;
@@ -290,7 +289,7 @@ pk_store_get_pointer (const PkStore *store, const gchar *key)
/* does already exist? */
value = g_hash_table_lookup (store->priv->hash_pointer, (gpointer) key);
if (value == NULL) {
- egg_warning ("not set data for %s", key);
+ g_warning ("not set data for %s", key);
return NULL;
}
return GINT_TO_POINTER(GPOINTER_TO_INT(value)-1);
diff --git a/src/pk-syslog.c b/src/pk-syslog.c
index 69d21c8..3102b8e 100644
--- a/src/pk-syslog.c
+++ b/src/pk-syslog.c
@@ -25,8 +25,6 @@
#include "pk-syslog.h"
#include "pk-conf.h"
-#include "egg-debug.h"
-
#define PK_SYSLOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_SYSLOG, PkSyslogPrivate))
struct PkSyslogPrivate
@@ -60,7 +58,7 @@ pk_syslog_add (PkSyslog *self, PkSyslogType type, const gchar *format, ...)
if (type == PK_SYSLOG_TYPE_AUTH)
syslog (LOG_AUTHPRIV, "%s", va_args_buffer);
- egg_debug ("logging to syslog '%s'", va_args_buffer);
+ g_debug ("logging to syslog '%s'", va_args_buffer);
syslog (LOG_DAEMON, "%s", va_args_buffer);
}
@@ -103,7 +101,7 @@ pk_syslog_init (PkSyslog *self)
g_object_unref (conf);
if (!self->priv->enabled) {
- egg_debug ("syslog fucntionality disabled");
+ g_debug ("syslog fucntionality disabled");
return;
}
diff --git a/src/pk-time.c b/src/pk-time.c
index 762f1cd..4c669c3 100644
--- a/src/pk-time.c
+++ b/src/pk-time.c
@@ -39,7 +39,6 @@
#include <glib/gi18n.h>
-#include "egg-debug.h"
#include "pk-time.h"
#include "pk-marshal.h"
@@ -161,7 +160,7 @@ pk_time_get_remaining (PkTime *pktime)
length = pktime->priv->array->len;
if (length < 2) {
- egg_debug ("array too small");
+ g_debug ("array too small");
return 0;
}
@@ -170,9 +169,9 @@ pk_time_get_remaining (PkTime *pktime)
item_prev = g_ptr_array_index (pktime->priv->array, i-1);
item = g_ptr_array_index (pktime->priv->array, i);
grad = pk_time_get_gradient (item, item_prev);
-// egg_debug ("gradient between %i/%i=%f", i-1, i, grad);
+// g_debug ("gradient between %i/%i=%f", i-1, i, grad);
if (grad < 0.00001 || grad > 100) {
- egg_debug ("ignoring gradient: %f", grad);
+ g_debug ("ignoring gradient: %f", grad);
} else {
grad_ave += grad;
averaged++;
@@ -182,29 +181,29 @@ pk_time_get_remaining (PkTime *pktime)
}
}
- egg_debug ("averaged %i points", averaged);
+ g_debug ("averaged %i points", averaged);
if (averaged < pktime->priv->average_min) {
- egg_debug ("not enough samples for accurate time: %i", averaged);
+ g_debug ("not enough samples for accurate time: %i", averaged);
return 0;
}
/* normalise to the number of samples */
grad_ave /= averaged;
- egg_debug ("grad_ave=%f", grad_ave);
+ g_debug ("grad_ave=%f", grad_ave);
/* just for debugging */
elapsed = pk_time_get_elapsed (pktime);
- egg_debug ("elapsed=%i", elapsed);
+ g_debug ("elapsed=%i", elapsed);
/* 100 percent to be complete */
item = g_ptr_array_index (pktime->priv->array, length - 1);
percentage_left = 100 - item->percentage;
- egg_debug ("percentage_left=%i", percentage_left);
+ g_debug ("percentage_left=%i", percentage_left);
estimated = (gfloat) percentage_left / grad_ave;
/* turn to ms */
estimated /= 1000;
- egg_debug ("estimated=%f seconds", estimated);
+ g_debug ("estimated=%f seconds", estimated);
if (estimated < pktime->priv->value_min) {
estimated = 0;
@@ -227,7 +226,7 @@ pk_time_add_data (PkTime *pktime, guint percentage)
/* check we are going up */
if (percentage < pktime->priv->last_percentage) {
- egg_warning ("percentage cannot go down!");
+ g_warning ("percentage cannot go down!");
return FALSE;
}
pktime->priv->last_percentage = percentage;
@@ -235,7 +234,7 @@ pk_time_add_data (PkTime *pktime, guint percentage)
/* get runtime in ms */
elapsed = pk_time_get_elapsed (pktime);
- egg_debug ("adding %i at %i (ms)", percentage, elapsed);
+ g_debug ("adding %i at %i (ms)", percentage, elapsed);
/* create a new object and add to the array */
item = g_new0 (PkTimeItem, 1);
diff --git a/src/pk-transaction-db.c b/src/pk-transaction-db.c
index 71ca3cf..bdfaee4 100644
--- a/src/pk-transaction-db.c
+++ b/src/pk-transaction-db.c
@@ -39,7 +39,6 @@
#include <packagekit-glib2/pk-results.h>
#include <packagekit-glib2/pk-common.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-transaction-db.h"
@@ -96,7 +95,7 @@ pk_transaction_sqlite_transaction_cb (void *data, gint argc, gchar **argv, gchar
if (g_strcmp0 (col, "succeeded") == 0) {
ret = egg_strtouint (value, &temp);
if (!ret)
- egg_warning ("failed to parse succeeded: %s", value);
+ g_warning ("failed to parse succeeded: %s", value);
if (temp == 1)
g_object_set (item, "succeeded", TRUE, NULL);
else
@@ -123,14 +122,14 @@ pk_transaction_sqlite_transaction_cb (void *data, gint argc, gchar **argv, gchar
} else if (g_strcmp0 (col, "duration") == 0) {
ret = egg_strtouint (value, &temp);
if (!ret) {
- egg_warning ("failed to parse duration: %s", value);
+ g_warning ("failed to parse duration: %s", value);
} else if (temp > 60*60*12) {
- egg_warning ("insane duration: %i", temp);
+ g_warning ("insane duration: %i", temp);
} else {
g_object_set (item, "duration", temp, NULL);
}
} else {
- egg_warning ("%s = %s\n", col, value);
+ g_warning ("%s = %s\n", col, value);
}
}
@@ -155,7 +154,7 @@ pk_transaction_db_sql_statement (PkTransactionDb *tdb, const gchar *sql)
rc = sqlite3_exec (tdb->priv->db, sql, pk_transaction_sqlite_transaction_cb, tdb, &error_msg);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
return FALSE;
}
@@ -180,7 +179,7 @@ pk_time_action_sqlite_callback (void *data, gint argc, gchar **argv, gchar **col
if (g_strcmp0 (col, "timespec") == 0)
*timespec = g_strdup (value);
else
- egg_warning ("%s = %s\n", col, value);
+ g_warning ("%s = %s\n", col, value);
}
return 0;
}
@@ -204,7 +203,7 @@ pk_transaction_db_iso8601_difference (const gchar *isodate)
/* convert date */
ret = g_time_val_from_iso8601 (isodate, &timeval_then);
if (!ret) {
- egg_warning ("failed to parse '%s'", isodate);
+ g_warning ("failed to parse '%s'", isodate);
return 0;
}
g_get_current_time (&timeval_now);
@@ -232,24 +231,24 @@ pk_transaction_db_action_time_since (PkTransactionDb *tdb, PkRoleEnum role)
g_return_val_if_fail (tdb->priv->db != NULL, 0);
role_text = pk_role_enum_to_string (role);
- egg_debug ("get_time_since_action=%s", role_text);
+ g_debug ("get_time_since_action=%s", role_text);
statement = g_strdup_printf ("SELECT timespec FROM last_action WHERE role = '%s'", role_text);
rc = sqlite3_exec (tdb->priv->db, statement, pk_time_action_sqlite_callback, ×pec, &error_msg);
g_free (statement);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
return G_MAXUINT;
}
if (timespec == NULL) {
- egg_warning ("no response, assume maximum value");
+ g_warning ("no response, assume maximum value");
return G_MAXUINT;
}
/* work out the difference */
time_ms = pk_transaction_db_iso8601_difference (timespec);
- egg_debug ("timespec=%s, difference=%i", timespec, time_ms);
+ g_debug ("timespec=%s, difference=%i", timespec, time_ms);
g_free (timespec);
return time_ms;
@@ -278,10 +277,10 @@ pk_transaction_db_action_time_reset (PkTransactionDb *tdb, PkRoleEnum role)
/* get the previous entry */
since = pk_transaction_db_action_time_since (tdb, role);
if (since == G_MAXUINT) {
- egg_debug ("set action time=%s to %s", role_text, timespec);
+ g_debug ("set action time=%s to %s", role_text, timespec);
statement = g_strdup_printf ("INSERT INTO last_action (role, timespec) VALUES ('%s', '%s')", role_text, timespec);
} else {
- egg_debug ("reset action time=%s to %s", role_text, timespec);
+ g_debug ("reset action time=%s to %s", role_text, timespec);
statement = g_strdup_printf ("UPDATE last_action SET timespec = '%s' WHERE role = '%s'", timespec, role_text);
}
@@ -290,7 +289,7 @@ pk_transaction_db_action_time_reset (PkTransactionDb *tdb, PkRoleEnum role)
/* did we fail? */
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
ret = FALSE;
goto out;
@@ -335,7 +334,7 @@ pk_transaction_db_add (PkTransactionDb *tdb, const gchar *tid)
g_return_val_if_fail (PK_IS_TRANSACTION_DB (tdb), FALSE);
- egg_debug ("adding transaction %s", tid);
+ g_debug ("adding transaction %s", tid);
timespec = pk_iso8601_present ();
statement = g_strdup_printf ("INSERT INTO transactions (transaction_id, timespec) VALUES ('%s', '%s')", tid, timespec);
@@ -472,7 +471,7 @@ pk_transaction_sqlite_job_id_cb (void *data, gint argc, gchar **argv, gchar **co
{
PkTransactionDb *tdb = PK_TRANSACTION_DB (data);
if (argc != 1) {
- egg_warning ("wrong number of replies: %i", argc);
+ g_warning ("wrong number of replies: %i", argc);
goto out;
}
egg_strtouint (argv[0], &tdb->priv->job_count);
@@ -480,7 +479,6 @@ out:
return 0;
}
-
/**
* pk_transaction_db_get_random_hex_string:
**/
@@ -519,11 +517,11 @@ pk_transaction_db_defer_write_job_count_cb (PkTransactionDb *tdb)
sqlite3_exec (tdb->priv->db, "PRAGMA synchronous=ON", NULL, NULL, NULL);
/* save the job count */
- egg_debug ("doing deferred write syncronous");
+ g_debug ("doing deferred write syncronous");
statement = g_strdup_printf ("UPDATE config SET value = '%i' WHERE key = 'job_count'", tdb->priv->job_count);
rc = sqlite3_exec (tdb->priv->db, statement, NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
- egg_error ("failed to set job id: %s\n", error_msg);
+ g_error ("failed to set job id: %s\n", error_msg);
sqlite3_free (error_msg);
goto out;
}
@@ -549,12 +547,12 @@ pk_transaction_db_generate_id (PkTransactionDb *tdb)
/* increment */
tdb->priv->job_count++;
- egg_debug ("job count now %i", tdb->priv->job_count);
+ g_debug ("job count now %i", tdb->priv->job_count);
/* we don't need to wait for the database write, just do this the
* next time we are idle (but ensure we do this on shutdown) */
if (tdb->priv->database_save_id == 0) {
- egg_debug ("deferring low priority write until idle");
+ g_debug ("deferring low priority write until idle");
tdb->priv->database_save_id =
g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc)
pk_transaction_db_defer_write_job_count_cb, tdb, NULL);
@@ -589,7 +587,7 @@ pk_transaction_sqlite_proxy_cb (void *data, gint argc, gchar **argv, gchar **col
item->proxy_ftp = g_strdup (argv[i]);
item->set = TRUE;
} else {
- egg_warning ("%s = %s\n", col_name[i], argv[i]);
+ g_warning ("%s = %s\n", col_name[i], argv[i]);
}
}
return 0;
@@ -641,14 +639,14 @@ pk_transaction_db_get_proxy (PkTransactionDb *tdb, guint uid, const gchar *sessi
uid, session);
rc = sqlite3_exec (tdb->priv->db, statement, pk_transaction_sqlite_proxy_cb, item, &error_msg);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
goto out;
}
/* nothing matched */
if (!item->set) {
- egg_debug ("no data");
+ g_debug ("no data");
goto out;
}
@@ -693,14 +691,14 @@ pk_transaction_db_set_proxy (PkTransactionDb *tdb, guint uid, const gchar *sessi
/* check for previous entries */
ret = pk_transaction_db_get_proxy (tdb, uid, session, &proxy_http_tmp, &proxy_ftp_tmp);
if (ret) {
- egg_debug ("updated proxy %s, %s for uid:%i and session:%s", proxy_http, proxy_ftp, uid, session);
+ g_debug ("updated proxy %s, %s for uid:%i and session:%s", proxy_http, proxy_ftp, uid, session);
/* prepare statement */
rc = sqlite3_prepare_v2 (tdb->priv->db,
"UPDATE proxy SET proxy_http = ?, proxy_ftp = ? WHERE uid = ? AND session = ?",
-1, &statement, NULL);
if (rc != SQLITE_OK) {
- egg_warning ("failed to prepare statement: %s", sqlite3_errmsg (tdb->priv->db));
+ g_warning ("failed to prepare statement: %s", sqlite3_errmsg (tdb->priv->db));
goto out;
}
@@ -713,7 +711,7 @@ pk_transaction_db_set_proxy (PkTransactionDb *tdb, guint uid, const gchar *sessi
/* execute statement */
rc = sqlite3_step (statement);
if (rc != SQLITE_DONE) {
- egg_warning ("failed to execute statement: %s", sqlite3_errmsg (tdb->priv->db));
+ g_warning ("failed to execute statement: %s", sqlite3_errmsg (tdb->priv->db));
goto out;
}
goto out;
@@ -721,14 +719,14 @@ pk_transaction_db_set_proxy (PkTransactionDb *tdb, guint uid, const gchar *sessi
/* insert new entry */
timespec = pk_iso8601_present ();
- egg_debug ("set proxy %s, %s for uid:%i and session:%s", proxy_http, proxy_ftp, uid, session);
+ g_debug ("set proxy %s, %s for uid:%i and session:%s", proxy_http, proxy_ftp, uid, session);
/* prepare statement */
rc = sqlite3_prepare_v2 (tdb->priv->db,
"INSERT INTO proxy (created, uid, session, proxy_http, proxy_ftp) VALUES (?, ?, ?, ?, ?)",
-1, &statement, NULL);
if (rc != SQLITE_OK) {
- egg_warning ("failed to prepare statement: %s", sqlite3_errmsg (tdb->priv->db));
+ g_warning ("failed to prepare statement: %s", sqlite3_errmsg (tdb->priv->db));
goto out;
}
@@ -742,7 +740,7 @@ pk_transaction_db_set_proxy (PkTransactionDb *tdb, guint uid, const gchar *sessi
/* execute statement */
rc = sqlite3_step (statement);
if (rc != SQLITE_DONE) {
- egg_warning ("failed to execute statement: %s", sqlite3_errmsg (tdb->priv->db));
+ g_warning ("failed to execute statement: %s", sqlite3_errmsg (tdb->priv->db));
goto out;
}
@@ -791,10 +789,10 @@ pk_transaction_db_init (PkTransactionDb *tdb)
tdb->priv->db = NULL;
tdb->priv->database_save_id = 0;
- egg_debug ("trying to open database '%s'", PK_TRANSACTION_DB_FILE);
+ g_debug ("trying to open database '%s'", PK_TRANSACTION_DB_FILE);
rc = sqlite3_open (PK_TRANSACTION_DB_FILE, &tdb->priv->db);
if (rc != SQLITE_OK) {
- egg_error ("Can't open database: %s\n", sqlite3_errmsg (tdb->priv->db));
+ g_error ("Can't open database: %s\n", sqlite3_errmsg (tdb->priv->db));
sqlite3_close (tdb->priv->db);
return;
}
@@ -805,7 +803,7 @@ pk_transaction_db_init (PkTransactionDb *tdb)
/* check transactions */
rc = sqlite3_exec (tdb->priv->db, "SELECT * FROM transactions LIMIT 1", NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
- egg_debug ("creating table to repair: %s", error_msg);
+ g_debug ("creating table to repair: %s", error_msg);
sqlite3_free (error_msg);
statement = "CREATE TABLE transactions ("
"transaction_id TEXT PRIMARY KEY,"
@@ -823,7 +821,7 @@ pk_transaction_db_init (PkTransactionDb *tdb)
/* check transactions has enough data (since 0.3.11) */
rc = sqlite3_exec (tdb->priv->db, "SELECT uid, cmdline FROM transactions LIMIT 1", NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
- egg_debug ("altering table to repair: %s", error_msg);
+ g_debug ("altering table to repair: %s", error_msg);
sqlite3_free (error_msg);
statement = "ALTER TABLE transactions ADD COLUMN uid INTEGER DEFAULT 0;";
sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
@@ -834,7 +832,7 @@ pk_transaction_db_init (PkTransactionDb *tdb)
/* check last_action (since 0.3.10) */
rc = sqlite3_exec (tdb->priv->db, "SELECT * FROM last_action LIMIT 1", NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
- egg_debug ("adding last action details: %s", error_msg);
+ g_debug ("adding last action details: %s", error_msg);
statement = "CREATE TABLE last_action (role TEXT PRIMARY KEY, timespec TEXT);";
sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
}
@@ -842,7 +840,7 @@ pk_transaction_db_init (PkTransactionDb *tdb)
/* check config (since 0.4.6) */
rc = sqlite3_exec (tdb->priv->db, "SELECT * FROM config LIMIT 1", NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
- egg_debug ("adding config: %s", error_msg);
+ g_debug ("adding config: %s", error_msg);
statement = "CREATE TABLE config (key TEXT PRIMARY KEY, value TEXT);";
sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
@@ -866,16 +864,16 @@ pk_transaction_db_init (PkTransactionDb *tdb)
statement = "SELECT value FROM config WHERE key = 'job_count'";
rc = sqlite3_exec (tdb->priv->db, statement, pk_transaction_sqlite_job_id_cb, tdb, &error_msg);
if (rc != SQLITE_OK) {
- egg_warning ("failed to get job id: %s\n", error_msg);
+ g_warning ("failed to get job id: %s\n", error_msg);
sqlite3_free (error_msg);
}
- egg_debug ("job count is now at %i", tdb->priv->job_count);
+ g_debug ("job count is now at %i", tdb->priv->job_count);
}
/* session proxy saving (since 0.5.1) */
rc = sqlite3_exec (tdb->priv->db, "SELECT * FROM proxy LIMIT 1", NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
- egg_debug ("adding table proxy: %s", error_msg);
+ g_debug ("adding table proxy: %s", error_msg);
statement = "CREATE TABLE proxy (created TEXT, proxy_http TEXT, proxy_ftp TEXT, uid INTEGER, session TEXT);";
sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
}
@@ -883,7 +881,7 @@ pk_transaction_db_init (PkTransactionDb *tdb)
/* transaction root (since 0.6.4) */
rc = sqlite3_exec (tdb->priv->db, "SELECT * FROM root LIMIT 1", NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
- egg_debug ("adding table root: %s", error_msg);
+ g_debug ("adding table root: %s", error_msg);
statement = "CREATE TABLE root (created TEXT, root TEXT, uid INTEGER, session TEXT);";
sqlite3_exec (tdb->priv->db, statement, NULL, NULL, NULL);
}
@@ -904,7 +902,7 @@ pk_transaction_sqlite_root_cb (void *data, gint argc, gchar **argv, gchar **col_
if (g_strcmp0 (col_name[i], "root") == 0) {
*root = g_strdup (argv[i]);
} else {
- egg_warning ("%s = %s\n", col_name[i], argv[i]);
+ g_warning ("%s = %s\n", col_name[i], argv[i]);
}
}
return 0;
@@ -939,14 +937,14 @@ pk_transaction_db_get_root (PkTransactionDb *tdb, guint uid, const gchar *sessio
uid, session);
rc = sqlite3_exec (tdb->priv->db, statement, pk_transaction_sqlite_root_cb, root, &error_msg);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
goto out;
}
/* nothing matched */
if (*root == NULL) {
- egg_debug ("no data");
+ g_debug ("no data");
goto out;
}
@@ -984,14 +982,14 @@ pk_transaction_db_set_root (PkTransactionDb *tdb, guint uid, const gchar *sessio
/* check for previous entries */
ret = pk_transaction_db_get_root (tdb, uid, session, &root_tmp);
if (ret) {
- egg_debug ("updated root %s for uid:%i and session:%s", root, uid, session);
+ g_debug ("updated root %s for uid:%i and session:%s", root, uid, session);
/* prepare statement */
rc = sqlite3_prepare_v2 (tdb->priv->db,
"UPDATE root SET root = ? WHERE uid = ? AND session = ?",
-1, &statement, NULL);
if (rc != SQLITE_OK) {
- egg_warning ("failed to prepare statement: %s", sqlite3_errmsg (tdb->priv->db));
+ g_warning ("failed to prepare statement: %s", sqlite3_errmsg (tdb->priv->db));
goto out;
}
@@ -1003,7 +1001,7 @@ pk_transaction_db_set_root (PkTransactionDb *tdb, guint uid, const gchar *sessio
/* execute statement */
rc = sqlite3_step (statement);
if (rc != SQLITE_DONE) {
- egg_warning ("failed to execute statement: %s", sqlite3_errmsg (tdb->priv->db));
+ g_warning ("failed to execute statement: %s", sqlite3_errmsg (tdb->priv->db));
goto out;
}
goto out;
@@ -1011,14 +1009,14 @@ pk_transaction_db_set_root (PkTransactionDb *tdb, guint uid, const gchar *sessio
/* insert new entry */
timespec = pk_iso8601_present ();
- egg_debug ("set root %s for uid:%i and session:%s", root, uid, session);
+ g_debug ("set root %s for uid:%i and session:%s", root, uid, session);
/* prepare statement */
rc = sqlite3_prepare_v2 (tdb->priv->db,
"INSERT INTO root (created, uid, session, root) VALUES (?, ?, ?, ?)",
-1, &statement, NULL);
if (rc != SQLITE_OK) {
- egg_warning ("failed to prepare statement: %s", sqlite3_errmsg (tdb->priv->db));
+ g_warning ("failed to prepare statement: %s", sqlite3_errmsg (tdb->priv->db));
goto out;
}
@@ -1031,7 +1029,7 @@ pk_transaction_db_set_root (PkTransactionDb *tdb, guint uid, const gchar *sessio
/* execute statement */
rc = sqlite3_step (statement);
if (rc != SQLITE_DONE) {
- egg_warning ("failed to execute statement: %s", sqlite3_errmsg (tdb->priv->db));
+ g_warning ("failed to execute statement: %s", sqlite3_errmsg (tdb->priv->db));
goto out;
}
diff --git a/src/pk-transaction-extra.c b/src/pk-transaction-extra.c
index 8b7e735..4d4d11a 100644
--- a/src/pk-transaction-extra.c
+++ b/src/pk-transaction-extra.c
@@ -36,8 +36,6 @@
#include <gio/gdesktopappinfo.h>
#include <sqlite3.h>
-#include "egg-debug.h"
-
#include "pk-transaction-extra.h"
#include "pk-shared.h"
#include "pk-marshal.h"
@@ -82,7 +80,7 @@ pk_transaction_extra_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTr
{
if (g_main_loop_is_running (extra->priv->loop)) {
if (exit_enum != PK_EXIT_ENUM_SUCCESS) {
- egg_warning ("%s failed with exit code: %s",
+ g_warning ("%s failed with exit code: %s",
pk_role_enum_to_string (pk_backend_get_role (backend)),
pk_exit_enum_to_string (exit_enum));
}
@@ -105,7 +103,7 @@ pk_transaction_extra_package_cb (PkBackend *backend, PkPackage *package, PkTrans
static void
pk_transaction_extra_set_status_changed (PkTransactionExtra *extra, PkStatusEnum status)
{
- egg_debug ("emiting status-changed %s", pk_status_enum_to_string (status));
+ g_debug ("emiting status-changed %s", pk_status_enum_to_string (status));
g_signal_emit (extra, signals [PK_POST_TRANS_STATUS_CHANGED], 0, status);
}
@@ -115,7 +113,7 @@ pk_transaction_extra_set_status_changed (PkTransactionExtra *extra, PkStatusEnum
static void
pk_transaction_extra_set_progress_changed (PkTransactionExtra *extra, guint percentage)
{
- egg_debug ("emiting progress-changed %i", percentage);
+ g_debug ("emiting progress-changed %i", percentage);
g_signal_emit (extra, signals [PK_POST_TRANS_PROGRESS_CHANGED], 0, percentage, 0, 0, 0);
}
@@ -141,14 +139,14 @@ pk_transaction_extra_get_installed_package_for_file (PkTransactionExtra *extra,
/* check that we only matched one package */
if (extra->priv->list->len != 1) {
- egg_warning ("not correct size, %i", extra->priv->list->len);
+ g_warning ("not correct size, %i", extra->priv->list->len);
goto out;
}
/* get the package */
package = g_ptr_array_index (extra->priv->list, 0);
if (package == NULL) {
- egg_warning ("cannot get package");
+ g_warning ("cannot get package");
goto out;
}
out:
@@ -175,7 +173,7 @@ pk_transaction_extra_get_filename_md5 (const gchar *filename)
/* get data */
ret = g_file_get_contents (filename, &data, &length, &error);
if (!ret) {
- egg_warning ("failed to open file %s: %s", filename, error->message);
+ g_warning ("failed to open file %s: %s", filename, error->message);
g_error_free (error);
goto out;
}
@@ -218,13 +216,13 @@ pk_transaction_extra_sqlite_add_filename_details (PkTransactionExtra *extra, con
/* find out if we should show desktop file in menus */
info = g_desktop_app_info_new_from_filename (filename);
if (info == NULL) {
- egg_warning ("could not load desktop file %s", filename);
+ g_warning ("could not load desktop file %s", filename);
goto out;
}
show = g_app_info_should_show (G_APP_INFO (info));
g_object_unref (info);
- egg_debug ("add filename %s from %s with md5: %s (show: %i)", filename, package, md5, show);
+ g_debug ("add filename %s from %s with md5: %s (show: %i)", filename, package, md5, show);
/* the row might already exist */
statement = g_strdup_printf ("DELETE FROM cache WHERE filename = '%s'", filename);
@@ -234,7 +232,7 @@ pk_transaction_extra_sqlite_add_filename_details (PkTransactionExtra *extra, con
/* prepare the query, as we don't escape it */
rc = sqlite3_prepare_v2 (extra->priv->db, "INSERT INTO cache (filename, package, show, md5) VALUES (?, ?, ?, ?)", -1, &sql_statement, NULL);
if (rc != SQLITE_OK) {
- egg_warning ("SQL failed to prepare: %s", sqlite3_errmsg (extra->priv->db));
+ g_warning ("SQL failed to prepare: %s", sqlite3_errmsg (extra->priv->db));
goto out;
}
@@ -248,7 +246,7 @@ pk_transaction_extra_sqlite_add_filename_details (PkTransactionExtra *extra, con
sqlite3_step (sql_statement);
rc = sqlite3_finalize (sql_statement);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
goto out;
}
@@ -277,7 +275,7 @@ pk_transaction_extra_sqlite_add_filename (PkTransactionExtra *extra, const gchar
/* resolve */
package = pk_transaction_extra_get_installed_package_for_file (extra, filename);
if (package == NULL) {
- egg_warning ("failed to get list");
+ g_warning ("failed to get list");
goto out;
}
@@ -312,14 +310,14 @@ pk_transaction_extra_sqlite_cache_rescan_cb (void *data, gint argc, gchar **argv
/* sanity check */
if (filename == NULL || md5 == NULL) {
- egg_warning ("filename %s and md5 %s)", filename, md5);
+ g_warning ("filename %s and md5 %s)", filename, md5);
goto out;
}
/* get md5 */
md5_calc = pk_transaction_extra_get_filename_md5 (filename);
if (md5_calc == NULL) {
- egg_debug ("remove of %s as no longer found", filename);
+ g_debug ("remove of %s as no longer found", filename);
pk_transaction_extra_sqlite_remove_filename (extra, filename);
goto out;
}
@@ -329,11 +327,11 @@ pk_transaction_extra_sqlite_cache_rescan_cb (void *data, gint argc, gchar **argv
/* check md5 is same */
if (g_strcmp0 (md5, md5_calc) != 0) {
- egg_debug ("add of %s as md5 invalid (%s vs %s)", filename, md5, md5_calc);
+ g_debug ("add of %s as md5 invalid (%s vs %s)", filename, md5, md5_calc);
pk_transaction_extra_sqlite_add_filename (extra, filename, md5_calc);
}
- egg_debug ("existing filename %s valid, md5=%s", filename, md5);
+ g_debug ("existing filename %s valid, md5=%s", filename, md5);
out:
g_free (md5_calc);
return 0;
@@ -356,7 +354,7 @@ pk_transaction_extra_get_desktop_files (PkTransactionExtra *extra,
/* open directory */
dir = g_dir_open (app_dir, 0, &error);
if (dir == NULL) {
- egg_warning ("failed to open directory %s: %s", app_dir, error->message);
+ g_warning ("failed to open directory %s: %s", app_dir, error->message);
g_error_free (error);
return;
}
@@ -370,7 +368,7 @@ pk_transaction_extra_get_desktop_files (PkTransactionExtra *extra,
} else if (g_str_has_suffix (filename, ".desktop")) {
data = g_hash_table_lookup (extra->priv->hash, path);
if (data == NULL) {
- egg_debug ("add of %s as not present in db", path);
+ g_debug ("add of %s as not present in db", path);
g_ptr_array_add (array, g_strdup (path));
}
}
@@ -398,13 +396,13 @@ pk_transaction_extra_import_desktop_files (PkTransactionExtra *extra)
/* no database */
if (extra->priv->db == NULL) {
- egg_debug ("unable to import: no database");
+ g_debug ("unable to import: no database");
return FALSE;
}
/* no support */
if (!pk_backend_is_implemented (extra->priv->backend, PK_ROLE_ENUM_SEARCH_FILE)) {
- egg_debug ("cannot search files");
+ g_debug ("cannot search files");
return FALSE;
}
@@ -421,7 +419,7 @@ pk_transaction_extra_import_desktop_files (PkTransactionExtra *extra)
rc = sqlite3_exec (extra->priv->db, statement, pk_transaction_extra_sqlite_cache_rescan_cb, extra, &error_msg);
g_free (statement);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
}
@@ -491,11 +489,11 @@ pk_transaction_extra_update_package_list (PkTransactionExtra *extra)
g_return_val_if_fail (PK_IS_POST_TRANS (extra), FALSE);
if (!pk_backend_is_implemented (extra->priv->backend, PK_ROLE_ENUM_GET_PACKAGES)) {
- egg_debug ("cannot get packages");
+ g_debug ("cannot get packages");
return FALSE;
}
- egg_debug ("updating package lists");
+ g_debug ("updating package lists");
/* clear old list */
if (extra->priv->list->len > 0)
@@ -519,7 +517,7 @@ pk_transaction_extra_update_package_list (PkTransactionExtra *extra)
data = pk_transaction_extra_package_list_to_string (extra->priv->list);
ret = g_file_set_contents (PK_SYSTEM_PACKAGE_LIST_FILENAME, data, -1, &error);
if (!ret) {
- egg_warning ("failed to save to file: %s", error->message);
+ g_warning ("failed to save to file: %s", error->message);
g_error_free (error);
}
@@ -544,15 +542,14 @@ pk_transaction_extra_clear_firmware_requests (PkTransactionExtra *extra)
/* clear the firmware requests directory */
filename = g_build_filename (LOCALSTATEDIR, "run", "PackageKit", "udev", NULL);
- egg_debug ("clearing udev firmware requests at %s", filename);
+ g_debug ("clearing udev firmware requests at %s", filename);
ret = pk_directory_remove_contents (filename);
if (!ret)
- egg_warning ("failed to clear %s", filename);
+ g_warning ("failed to clear %s", filename);
g_free (filename);
return ret;
}
-
/**
* pk_transaction_extra_update_files_check_running_cb:
**/
@@ -588,7 +585,7 @@ pk_transaction_extra_update_files_check_running_cb (PkBackend *backend, PkFiles
* suggest an application restart instead */
/* send signal about session restart */
- egg_debug ("package %s updated, and %s is running", package_id, filenames[i]);
+ g_debug ("package %s updated, and %s is running", package_id, filenames[i]);
pk_backend_require_restart (extra->priv->backend, PK_RESTART_ENUM_SESSION, package_id);
}
g_strfreev (filenames);
@@ -606,7 +603,7 @@ pk_transaction_extra_check_running_process (PkTransactionExtra *extra, gchar **p
g_return_val_if_fail (PK_IS_POST_TRANS (extra), FALSE);
if (!pk_backend_is_implemented (extra->priv->backend, PK_ROLE_ENUM_GET_FILES)) {
- egg_debug ("cannot get files");
+ g_debug ("cannot get files");
return FALSE;
}
@@ -665,7 +662,7 @@ pk_transaction_extra_update_files_check_desktop_cb (PkBackend *backend, PkFiles
if (!ret)
continue;
- egg_debug ("adding filename %s", filenames[i]);
+ g_debug ("adding filename %s", filenames[i]);
md5 = pk_transaction_extra_get_filename_md5 (filenames[i]);
pk_transaction_extra_sqlite_add_filename_details (extra, filenames[i], package[PK_PACKAGE_ID_NAME], md5);
g_free (md5);
@@ -686,7 +683,7 @@ pk_transaction_extra_check_desktop_files (PkTransactionExtra *extra, gchar **pac
g_return_val_if_fail (PK_IS_POST_TRANS (extra), FALSE);
if (!pk_backend_is_implemented (extra->priv->backend, PK_ROLE_ENUM_GET_FILES)) {
- egg_debug ("cannot get files");
+ g_debug ("cannot get files");
return FALSE;
}
@@ -735,7 +732,7 @@ pk_transaction_extra_files_check_library_restart_cb (PkBackend *backend, PkFiles
continue;
/* add as it matches the criteria */
- egg_debug ("adding filename %s", filenames[i]);
+ g_debug ("adding filename %s", filenames[i]);
g_ptr_array_add (extra->priv->files_list, g_strdup (filenames[i]));
}
g_strfreev (filenames);
@@ -756,7 +753,7 @@ pk_transaction_extra_get_cmdline (PkTransactionExtra *extra, guint pid)
filename = g_strdup_printf ("/proc/%i/cmdline", pid);
ret = g_file_get_contents (filename, &cmdline, NULL, &error);
if (!ret) {
- egg_warning ("failed to get cmdline: %s", error->message);
+ g_warning ("failed to get cmdline: %s", error->message);
g_error_free (error);
goto out;
}
@@ -843,7 +840,7 @@ pk_transaction_extra_check_library_restart (PkTransactionExtra *extra)
else
cmdline_full = g_strdup_printf ("/usr/bin/%s", cmdline);
- egg_debug ("pid=%i: %s (%i)", pid, cmdline_full, uid);
+ g_debug ("pid=%i: %s (%i)", pid, cmdline_full, uid);
if (uid < 500)
g_ptr_array_add (files_system, cmdline_full);
else
@@ -853,7 +850,7 @@ pk_transaction_extra_check_library_restart (PkTransactionExtra *extra)
/* we found nothing */
if (files_system->len == 0 && files_session->len == 0) {
- egg_warning ("no pids could be resolved");
+ g_warning ("no pids could be resolved");
goto out;
}
@@ -863,7 +860,7 @@ pk_transaction_extra_check_library_restart (PkTransactionExtra *extra)
package = pk_transaction_extra_get_installed_package_for_file (extra, filename);
if (package == NULL) {
- egg_debug ("failed to find package for %s", filename);
+ g_debug ("failed to find package for %s", filename);
continue;
}
pk_backend_require_restart (extra->priv->backend, PK_RESTART_ENUM_SECURITY_SESSION, pk_package_get_id (package));
@@ -875,7 +872,7 @@ pk_transaction_extra_check_library_restart (PkTransactionExtra *extra)
package = pk_transaction_extra_get_installed_package_for_file (extra, filename);
if (package == NULL) {
- egg_debug ("failed to find package for %s", filename);
+ g_debug ("failed to find package for %s", filename);
continue;
}
pk_backend_require_restart (extra->priv->backend, PK_RESTART_ENUM_SECURITY_SYSTEM, pk_package_get_id (package));
@@ -939,7 +936,7 @@ pk_transaction_extra_files_check_applications_are_running_cb (PkBackend *backend
/* check each file to see if it's a system shared library */
len = g_strv_length (filenames);
- egg_debug ("len=%i", len);
+ g_debug ("len=%i", len);
for (i=0; i<len; i++) {
/* does the package filename match */
@@ -948,7 +945,7 @@ pk_transaction_extra_files_check_applications_are_running_cb (PkBackend *backend
continue;
/* add as it matches the criteria */
- egg_debug ("adding filename %s", filenames[i]);
+ g_debug ("adding filename %s", filenames[i]);
g_ptr_array_add (extra->priv->files_list, g_strdup (filenames[i]));
}
g_strfreev (filenames);
@@ -970,7 +967,7 @@ pk_transaction_extra_applications_are_running (PkTransactionExtra *extra, gchar
g_return_val_if_fail (package_ids != NULL, FALSE);
if (!pk_backend_is_implemented (extra->priv->backend, PK_ROLE_ENUM_GET_FILES)) {
- egg_debug ("cannot get files");
+ g_debug ("cannot get files");
/* return success, as we're not setting an error */
return TRUE;
}
@@ -978,7 +975,7 @@ pk_transaction_extra_applications_are_running (PkTransactionExtra *extra, gchar
/* check we have entry */
if (extra->priv->no_update_process_list == NULL ||
extra->priv->no_update_process_list[0] == NULL) {
- egg_debug ("no processes to watch");
+ g_debug ("no processes to watch");
/* return success, as we're not setting an error */
return TRUE;
}
@@ -993,7 +990,7 @@ pk_transaction_extra_applications_are_running (PkTransactionExtra *extra, gchar
/* get list from proc */
ret = pk_proc_refresh (extra->priv->proc);
if (!ret) {
- egg_warning ("failed to refresh");
+ g_warning ("failed to refresh");
/* non-fatal */
ret = TRUE;
goto out;
@@ -1052,7 +1049,7 @@ pk_transaction_extra_check_library_restart_pre (PkTransactionExtra *extra, gchar
g_return_val_if_fail (PK_IS_POST_TRANS (extra), FALSE);
if (!pk_backend_is_implemented (extra->priv->backend, PK_ROLE_ENUM_GET_FILES)) {
- egg_debug ("cannot get files");
+ g_debug ("cannot get files");
return FALSE;
}
@@ -1071,7 +1068,7 @@ pk_transaction_extra_check_library_restart_pre (PkTransactionExtra *extra, gchar
/* get list from lsof */
ret = pk_lsof_refresh (extra->priv->lsof);
if (!ret) {
- egg_warning ("failed to refresh");
+ g_warning ("failed to refresh");
goto out;
}
@@ -1090,7 +1087,7 @@ pk_transaction_extra_check_library_restart_pre (PkTransactionExtra *extra, gchar
/* nothing to do */
if (extra->priv->files_list->len == 0) {
- egg_debug ("no files");
+ g_debug ("no files");
goto out;
}
@@ -1100,13 +1097,13 @@ pk_transaction_extra_check_library_restart_pre (PkTransactionExtra *extra, gchar
/* nothing depends on these libraries */
if (extra->priv->pids == NULL) {
- egg_warning ("failed to get process list");
+ g_warning ("failed to get process list");
goto out;
}
/* nothing depends on these libraries */
if (extra->priv->pids->len == 0) {
- egg_debug ("no processes depend on these libraries");
+ g_debug ("no processes depend on these libraries");
goto out;
}
@@ -1214,10 +1211,10 @@ pk_transaction_extra_init (PkTransactionExtra *extra)
/* check if exists */
ret = g_file_test (PK_DESKTOP_DEFAULT_DATABASE, G_FILE_TEST_EXISTS);
- egg_debug ("trying to open database '%s'", PK_DESKTOP_DEFAULT_DATABASE);
+ g_debug ("trying to open database '%s'", PK_DESKTOP_DEFAULT_DATABASE);
rc = sqlite3_open (PK_DESKTOP_DEFAULT_DATABASE, &extra->priv->db);
if (rc != 0) {
- egg_warning ("Can't open database: %s\n", sqlite3_errmsg (extra->priv->db));
+ g_warning ("Can't open database: %s\n", sqlite3_errmsg (extra->priv->db));
sqlite3_close (extra->priv->db);
extra->priv->db = NULL;
return;
@@ -1225,7 +1222,7 @@ pk_transaction_extra_init (PkTransactionExtra *extra)
/* create if not exists */
if (!ret) {
- egg_debug ("creating database cache in %s", PK_DESKTOP_DEFAULT_DATABASE);
+ g_debug ("creating database cache in %s", PK_DESKTOP_DEFAULT_DATABASE);
statement = "CREATE TABLE cache ("
"filename TEXT,"
"package TEXT,"
@@ -1233,7 +1230,7 @@ pk_transaction_extra_init (PkTransactionExtra *extra)
"md5 TEXT);";
rc = sqlite3_exec (extra->priv->db, statement, NULL, NULL, &error_msg);
if (rc != SQLITE_OK) {
- egg_warning ("SQL error: %s\n", error_msg);
+ g_warning ("SQL error: %s\n", error_msg);
sqlite3_free (error_msg);
}
}
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index 37c41ba..b8ccaef 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -39,7 +39,6 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <packagekit-glib2/pk-common.h>
-#include "egg-debug.h"
#include "egg-string.h"
#include "pk-conf.h"
@@ -197,10 +196,10 @@ pk_transaction_list_remove_internal (PkTransactionList *tlist, PkTransactionItem
g_return_val_if_fail (item != NULL, FALSE);
/* valid item */
- egg_debug ("remove transaction %s, item %p", item->tid, item);
+ g_debug ("remove transaction %s, item %p", item->tid, item);
ret = g_ptr_array_remove (tlist->priv->array, item);
if (!ret) {
- egg_warning ("could not remove %p as not present in list", item);
+ g_warning ("could not remove %p as not present in list", item);
return FALSE;
}
pk_transaction_list_item_free (item);
@@ -222,11 +221,11 @@ pk_transaction_list_remove (PkTransactionList *tlist, const gchar *tid)
item = pk_transaction_list_get_from_tid (tlist, tid);
if (item == NULL) {
- egg_warning ("could not get item");
+ g_warning ("could not get item");
return FALSE;
}
if (item->finished) {
- egg_debug ("already finished, so waiting to timeout");
+ g_debug ("already finished, so waiting to timeout");
return FALSE;
}
@@ -239,11 +238,11 @@ pk_transaction_list_remove (PkTransactionList *tlist, const gchar *tid)
/* check if we are running, or _just_ about to be run */
if (item->running) {
if (item->idle_id == 0) {
- egg_warning ("already running, but no idle_id");
+ g_warning ("already running, but no idle_id");
return FALSE;
}
/* just about to be run! */
- egg_debug ("cancelling the callback to the 'lost' transaction");
+ g_debug ("cancelling the callback to the 'lost' transaction");
g_source_remove (item->idle_id);
item->idle_id = 0;
}
@@ -264,14 +263,14 @@ pk_transaction_list_set_background (PkTransactionList *tlist, const gchar *tid,
item = pk_transaction_list_get_from_tid (tlist, tid);
if (item == NULL) {
- egg_warning ("could not get item");
+ g_warning ("could not get item");
return FALSE;
}
if (item->finished) {
- egg_debug ("already finished, so waiting to timeout");
+ g_debug ("already finished, so waiting to timeout");
return FALSE;
}
- egg_debug ("%s is now background: %i", tid, background);
+ g_debug ("%s is now background: %i", tid, background);
item->background = background;
return TRUE;
}
@@ -282,7 +281,7 @@ pk_transaction_list_set_background (PkTransactionList *tlist, const gchar *tid,
static gboolean
pk_transaction_list_remove_item_cb (PkTransactionItem *item)
{
- egg_debug ("transaction %s completed, removing", item->tid);
+ g_debug ("transaction %s completed, removing", item->tid);
pk_transaction_list_remove_internal (item->list, item);
return FALSE;
}
@@ -295,10 +294,10 @@ pk_transaction_list_run_idle_cb (PkTransactionItem *item)
{
gboolean ret;
- egg_debug ("actually running %s", item->tid);
+ g_debug ("actually running %s", item->tid);
ret = pk_transaction_run (item->transaction);
if (!ret)
- egg_error ("failed to run transaction (fatal)");
+ g_error ("failed to run transaction (fatal)");
/* never try to idle add this again */
item->idle_id = 0;
@@ -312,7 +311,7 @@ static void
pk_transaction_list_run_item (PkTransactionList *tlist, PkTransactionItem *item)
{
/* we set this here so that we don't try starting more than one */
- egg_debug ("schedule idle running %s", item->tid);
+ g_debug ("schedule idle running %s", item->tid);
item->running = TRUE;
/* add this idle, so that we don't have a deep out-of-order callchain */
@@ -374,11 +373,11 @@ pk_transaction_list_transaction_finished_cb (PkTransaction *transaction, const g
tid = pk_transaction_get_tid (transaction);
item = pk_transaction_list_get_from_tid (tlist, tid);
if (item == NULL)
- egg_error ("no transaction list item '%s' found!", tid);
+ g_error ("no transaction list item '%s' found!", tid);
/* transaction is already finished? */
if (item->finished) {
- egg_warning ("transaction %s finished twice!", item->tid);
+ g_warning ("transaction %s finished twice!", item->tid);
return;
}
@@ -388,7 +387,7 @@ pk_transaction_list_transaction_finished_cb (PkTransaction *transaction, const g
item->commit_id = 0;
}
- egg_debug ("transaction %s completed, marking finished", item->tid);
+ g_debug ("transaction %s completed, marking finished", item->tid);
item->running = FALSE;
item->finished = TRUE;
@@ -396,7 +395,7 @@ pk_transaction_list_transaction_finished_cb (PkTransaction *transaction, const g
item->committed = TRUE;
/* we have changed what is running */
- egg_debug ("emmitting ::changed");
+ g_debug ("emmitting ::changed");
g_signal_emit (tlist, signals [PK_TRANSACTION_LIST_CHANGED], 0);
/* give the client a few seconds to still query the runner */
@@ -409,7 +408,7 @@ pk_transaction_list_transaction_finished_cb (PkTransaction *transaction, const g
/* do the next transaction now if we have another queued */
item = pk_transaction_list_get_next_item (tlist);
if (item != NULL) {
- egg_debug ("running %s as previous one finished", item->tid);
+ g_debug ("running %s as previous one finished", item->tid);
pk_transaction_list_run_item (tlist, item);
}
}
@@ -420,7 +419,7 @@ pk_transaction_list_transaction_finished_cb (PkTransaction *transaction, const g
static gboolean
pk_transaction_list_no_commit_cb (PkTransactionItem *item)
{
- egg_warning ("ID %s was not committed in time!", item->tid);
+ g_warning ("ID %s was not committed in time!", item->tid);
pk_transaction_list_remove_internal (item->list, item);
/* never repeat */
@@ -470,7 +469,7 @@ pk_transaction_list_create (PkTransactionList *tlist, const gchar *tid, const gc
item = pk_transaction_list_get_from_tid (tlist, tid);
if (item != NULL) {
g_set_error (error, 1, 0, "already added %s to list", tid);
- egg_warning ("already added %s to list", tid);
+ g_warning ("already added %s to list", tid);
goto out;
}
@@ -491,7 +490,7 @@ pk_transaction_list_create (PkTransactionList *tlist, const gchar *tid, const gc
/* get another connection */
connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
if (connection == NULL)
- egg_error ("no connection");
+ g_error ("no connection");
item->transaction = pk_transaction_new ();
item->finished_id =
@@ -519,7 +518,7 @@ pk_transaction_list_create (PkTransactionList *tlist, const gchar *tid, const gc
/* find out the number of transactions this uid already has in progress */
count = pk_transaction_list_get_number_transactions_for_uid (tlist, item->uid);
- egg_debug ("uid=%i, count=%i", item->uid, count);
+ g_debug ("uid=%i, count=%i", item->uid, count);
/* would this take us over the maximum number of requests allowed */
max_count = pk_conf_get_int (tlist->priv->conf, "SimultaneousTransactionsForUid");
@@ -545,7 +544,7 @@ pk_transaction_list_create (PkTransactionList *tlist, const gchar *tid, const gc
g_source_set_name_by_id (item->commit_id, "[PkTransactionList] commit");
#endif
- egg_debug ("adding transaction %p, item %p", item->transaction, item);
+ g_debug ("adding transaction %p, item %p", item->transaction, item);
g_ptr_array_add (tlist->priv->array, item);
out:
return ret;
@@ -587,17 +586,17 @@ pk_transaction_list_commit (PkTransactionList *tlist, const gchar *tid)
item = pk_transaction_list_get_from_tid (tlist, tid);
if (item == NULL) {
- egg_warning ("could not get transaction: %s", tid);
+ g_warning ("could not get transaction: %s", tid);
return FALSE;
}
/* check we're not this again */
if (item->committed) {
- egg_warning ("already committed");
+ g_warning ("already committed");
return FALSE;
}
- egg_debug ("marking transaction %s as committed", item->tid);
+ g_debug ("marking transaction %s as committed", item->tid);
item->committed = TRUE;
/* we've been 'used' */
@@ -607,12 +606,12 @@ pk_transaction_list_commit (PkTransactionList *tlist, const gchar *tid)
}
/* we will changed what is running */
- egg_debug ("emitting ::changed");
+ g_debug ("emitting ::changed");
g_signal_emit (tlist, signals [PK_TRANSACTION_LIST_CHANGED], 0);
/* do the transaction now if we have no other in progress */
if (pk_transaction_list_number_running (tlist) == 0) {
- egg_debug ("running %s as no others in progress", item->tid);
+ g_debug ("running %s as no others in progress", item->tid);
pk_transaction_list_run_item (tlist, item);
}
@@ -644,7 +643,7 @@ pk_transaction_list_get_array (PkTransactionList *tlist)
if (item->committed && !item->finished)
g_ptr_array_add (parray, g_strdup (item->tid));
}
- egg_debug ("%i transactions in list, %i committed but not finished", length, parray->len);
+ g_debug ("%i transactions in list, %i committed but not finished", length, parray->len);
array = pk_ptr_array_to_strv (parray);
g_ptr_array_unref (parray);
@@ -724,7 +723,7 @@ pk_transaction_list_print (PkTransactionList *tlist)
{
gchar *state;
state = pk_transaction_list_get_state (tlist);
- egg_debug ("%s", state);
+ g_debug ("%s", state);
g_free (state);
}
@@ -756,7 +755,7 @@ pk_transaction_list_is_consistent (PkTransactionList *tlist)
goto out;
/* get state */
- egg_debug ("checking consistency as length %i", length);
+ g_debug ("checking consistency as length %i", length);
for (i=0; i<length; i++) {
item = (PkTransactionItem *) g_ptr_array_index (tlist->priv->array, i);
if (item->running)
@@ -779,27 +778,27 @@ pk_transaction_list_is_consistent (PkTransactionList *tlist)
/* wrong flags */
if (wrong != 0) {
- egg_warning ("%i have inconsistent flags", wrong);
+ g_warning ("%i have inconsistent flags", wrong);
ret = FALSE;
}
/* role not set */
if (unknown_role != 0)
- egg_debug ("%i have an unknown role (GetTid then nothing?)", unknown_role);
+ g_debug ("%i have an unknown role (GetTid then nothing?)", unknown_role);
/* some are not committed */
if (no_commit != 0)
- egg_debug ("%i have not been committed and may be pending auth", no_commit);
+ g_debug ("%i have not been committed and may be pending auth", no_commit);
/* more than one running */
if (running > 1) {
- egg_warning ("%i are running", running);
+ g_warning ("%i are running", running);
ret = FALSE;
}
/* nothing running */
if (waiting == length) {
- egg_warning ("everything is waiting!");
+ g_warning ("everything is waiting!");
ret = FALSE;
}
out:
@@ -816,15 +815,15 @@ pk_transaction_list_wedge_check2 (PkTransactionList *tlist)
g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), FALSE);
- egg_debug ("checking consistency a second time, as the first was not valid");
+ g_debug ("checking consistency a second time, as the first was not valid");
ret = pk_transaction_list_is_consistent (tlist);
if (ret) {
- egg_debug ("panic over");
+ g_debug ("panic over");
goto out;
}
/* dump all the state we know */
- egg_warning ("dumping data:");
+ g_warning ("dumping data:");
pk_transaction_list_print (tlist);
out:
/* never repeat */
@@ -844,7 +843,7 @@ pk_transaction_list_wedge_check1 (PkTransactionList *tlist)
ret = pk_transaction_list_is_consistent (tlist);
if (!ret) {
/* we have to do this twice, as we might idle add inbetween a transition */
- egg_warning ("list is consistent, scheduling another check");
+ g_warning ("list is consistent, scheduling another check");
tlist->priv->unwedge2_id = g_timeout_add (500, (GSourceFunc) pk_transaction_list_wedge_check2, tlist);
#if GLIB_CHECK_VERSION(2,25,8)
g_source_set_name_by_id (tlist->priv->unwedge2_id, "[PkTransactionList] wedge-check");
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 949aee0..40da1f6 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -51,7 +51,6 @@
#include <polkit/polkit.h>
#endif
-#include "egg-debug.h"
#include "egg-string.h"
#include "egg-dbus-monitor.h"
@@ -307,7 +306,7 @@ pk_transaction_finish_invalidate_caches (PkTransaction *transaction)
"transaction-id", &transaction_id,
NULL);
if (transaction_id == NULL) {
- egg_warning ("could not get current tid from backend");
+ g_warning ("could not get current tid from backend");
return FALSE;
}
@@ -323,7 +322,7 @@ pk_transaction_finish_invalidate_caches (PkTransaction *transaction)
priv->role == PK_ROLE_ENUM_REFRESH_CACHE) {
/* the cached list is no longer valid */
- egg_debug ("invalidating caches");
+ g_debug ("invalidating caches");
pk_cache_invalidate (priv->cache);
/* this needs to be done after a small delay */
@@ -349,7 +348,7 @@ pk_transaction_progress_changed_emit (PkTransaction *transaction, guint percenta
transaction->priv->remaining_time = remaining;
/* emit */
- egg_debug ("emitting changed");
+ g_debug ("emitting changed");
g_signal_emit (transaction, signals[SIGNAL_CHANGED], 0);
}
@@ -374,7 +373,7 @@ pk_transaction_allow_cancel_emit (PkTransaction *transaction, gboolean allow_can
pk_inhibit_add (transaction->priv->inhibit, transaction);
/* emit */
- egg_debug ("emitting changed");
+ g_debug ("emitting changed");
g_signal_emit (transaction, signals[SIGNAL_CHANGED], 0);
}
@@ -394,7 +393,7 @@ pk_transaction_status_changed_emit (PkTransaction *transaction, PkStatusEnum sta
transaction->priv->status = status;
/* emit */
- egg_debug ("emitting changed");
+ g_debug ("emitting changed");
g_signal_emit (transaction, signals[SIGNAL_CHANGED], 0);
}
@@ -406,7 +405,7 @@ pk_transaction_finished_emit (PkTransaction *transaction, PkExitEnum exit_enum,
{
const gchar *exit_text;
exit_text = pk_exit_enum_to_string (exit_enum);
- egg_debug ("emitting finished '%s', %i", exit_text, time_ms);
+ g_debug ("emitting finished '%s', %i", exit_text, time_ms);
g_signal_emit (transaction, signals[SIGNAL_FINISHED], 0, exit_text, time_ms);
}
@@ -418,7 +417,7 @@ pk_transaction_error_code_emit (PkTransaction *transaction, PkErrorEnum error_en
{
const gchar *text;
text = pk_error_enum_to_string (error_enum);
- egg_debug ("emitting error-code %s, '%s'", text, details);
+ g_debug ("emitting error-code %s, '%s'", text, details);
g_signal_emit (transaction, signals[SIGNAL_ERROR_CODE], 0, text, details);
}
@@ -431,7 +430,7 @@ pk_transaction_allow_cancel_cb (PkBackend *backend, gboolean allow_cancel, PkTra
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("emitting allow-cancel %i", allow_cancel);
+ g_debug ("emitting allow-cancel %i", allow_cancel);
pk_transaction_allow_cancel_emit (transaction, allow_cancel);
}
@@ -452,7 +451,7 @@ pk_transaction_caller_active_changed_cb (EggDbusMonitor *egg_dbus_monitor, gbool
transaction->priv->caller_active = caller_active;
/* emit */
- egg_debug ("emitting changed");
+ g_debug ("emitting changed");
g_signal_emit (transaction, signals[SIGNAL_CHANGED], 0);
}
@@ -488,7 +487,7 @@ pk_transaction_details_cb (PkBackend *backend, PkDetails *item, PkTransaction *t
/* emit */
group_text = pk_group_enum_to_string (group);
- egg_debug ("emitting details");
+ g_debug ("emitting details");
g_signal_emit (transaction, signals[SIGNAL_DETAILS], 0, package_id,
license, group_text, description, url, size);
@@ -567,7 +566,7 @@ pk_transaction_files_cb (PkBackend *backend, PkFiles *item, PkTransaction *trans
/* emit */
filelist = g_strjoinv (";", files);
- egg_debug ("emitting files %s, %s", package_id, filelist);
+ g_debug ("emitting files %s, %s", package_id, filelist);
g_signal_emit (transaction, signals[SIGNAL_FILES], 0, package_id, filelist);
g_free (filelist);
g_free (package_id);
@@ -602,7 +601,7 @@ pk_transaction_category_cb (PkBackend *backend, PkCategory *item, PkTransaction
NULL);
/* emit */
- egg_debug ("emitting category %s, %s, %s, %s, %s ", parent_id, cat_id, name, summary, icon);
+ g_debug ("emitting category %s, %s, %s, %s, %s ", parent_id, cat_id, name, summary, icon);
g_signal_emit (transaction, signals[SIGNAL_CATEGORY], 0, parent_id, cat_id, name, summary, icon);
g_free (parent_id);
@@ -638,7 +637,7 @@ pk_transaction_distro_upgrade_cb (PkBackend *backend, PkDistroUpgrade *item, PkT
/* emit */
type_text = pk_distro_upgrade_enum_to_string (state);
- egg_debug ("emitting distro-upgrade %s, %s, %s", type_text, name, summary);
+ g_debug ("emitting distro-upgrade %s, %s, %s", type_text, name, summary);
g_signal_emit (transaction, signals[SIGNAL_DISTRO_UPGRADE], 0, type_text, name, summary);
g_free (name);
@@ -700,21 +699,21 @@ pk_transaction_process_script (PkTransaction *transaction, const gchar *filename
G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE,
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &error);
if (info == NULL) {
- egg_warning ("failed to get info: %s", error->message);
+ g_warning ("failed to get info: %s", error->message);
goto out;
}
/* check is executable */
ret = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE);
if (!ret) {
- egg_warning ("%s is not executable", filename);
+ g_warning ("%s is not executable", filename);
goto out;
}
/* check is owned by the correct user */
file_uid = g_file_info_get_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_UID);
if (file_uid != 0) {
- egg_warning ("%s is not owned by the root user", filename);
+ g_warning ("%s is not owned by the root user", filename);
goto out;
}
@@ -726,10 +725,10 @@ pk_transaction_process_script (PkTransaction *transaction, const gchar *filename
/* run the command, but don't exit if fails */
ret = g_spawn_command_line_sync (command, NULL, NULL, &exit_status, &error);
if (!ret) {
- egg_warning ("failed to spawn %s [%i]: %s", command, exit_status, error->message);
+ g_warning ("failed to spawn %s [%i]: %s", command, exit_status, error->message);
g_error_free (error);
} else {
- egg_debug ("ran %s", command);
+ g_debug ("ran %s", command);
}
out:
@@ -758,7 +757,7 @@ pk_transaction_process_scripts (PkTransaction *transaction, const gchar *locatio
dirname = g_build_filename (SYSCONFDIR, "PackageKit", "events", location, NULL);
dir = g_dir_open (dirname, 0, &error);
if (dir == NULL) {
- egg_warning ("Failed to open %s: %s", dirname, error->message);
+ g_warning ("Failed to open %s: %s", dirname, error->message);
g_error_free (error);
goto out;
}
@@ -806,7 +805,7 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
/* have we already been marked as finished? */
if (transaction->priv->finished) {
- egg_warning ("Already finished");
+ g_warning ("Already finished");
return;
}
@@ -902,7 +901,7 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
g_free (package_id);
}
- egg_debug ("processing %i packags for desktop files", list->len);
+ g_debug ("processing %i packags for desktop files", list->len);
/* process file lists on these packages */
if (list->len > 0) {
package_ids = pk_ptr_array_to_strv (list);
@@ -978,7 +977,7 @@ pk_transaction_finished_cb (PkBackend *backend, PkExitEnum exit_enum, PkTransact
/* find the length of time we have been running */
time_ms = pk_transaction_get_runtime (transaction);
- egg_debug ("backend was running for %i ms", time_ms);
+ g_debug ("backend was running for %i ms", time_ms);
/* add to the database if we are going to log it */
if (transaction->priv->role == PK_ROLE_ENUM_UPDATE_SYSTEM ||
@@ -1071,7 +1070,7 @@ pk_transaction_message_cb (PkBackend *backend, PkMessage *item, PkTransaction *t
if (!developer_mode &&
(type == PK_MESSAGE_ENUM_BACKEND_ERROR ||
type == PK_MESSAGE_ENUM_DAEMON_ERROR)) {
- egg_warning ("ignoring message: %s", details);
+ g_warning ("ignoring message: %s", details);
return;
}
@@ -1080,7 +1079,7 @@ pk_transaction_message_cb (PkBackend *backend, PkMessage *item, PkTransaction *t
/* emit */
message_text = pk_message_enum_to_string (type);
- egg_debug ("emitting message %s, '%s'", message_text, details);
+ g_debug ("emitting message %s, '%s'", message_text, details);
g_signal_emit (transaction, signals[SIGNAL_MESSAGE], 0, message_text, details);
g_free (details);
@@ -1103,7 +1102,7 @@ pk_transaction_package_cb (PkBackend *backend, PkPackage *item, PkTransaction *t
/* have we already been marked as finished? */
if (transaction->priv->finished) {
- egg_warning ("Already finished");
+ g_warning ("Already finished");
return;
}
@@ -1155,7 +1154,7 @@ pk_transaction_package_cb (PkBackend *backend, PkPackage *item, PkTransaction *t
g_free (transaction->priv->last_package_id);
transaction->priv->last_package_id = g_strdup (package_id);
info_text = pk_info_enum_to_string (info);
- egg_debug ("emit package %s, %s, %s", info_text, package_id, summary);
+ g_debug ("emit package %s, %s, %s", info_text, package_id, summary);
g_signal_emit (transaction, signals[SIGNAL_PACKAGE], 0, info_text, package_id, summary);
g_free (package_id);
g_free (summary);
@@ -1198,7 +1197,7 @@ pk_transaction_repo_detail_cb (PkBackend *backend, PkRepoDetail *item, PkTransac
NULL);
/* emit */
- egg_debug ("emitting repo-detail %s, %s, %i", repo_id, description, enabled);
+ g_debug ("emitting repo-detail %s, %s, %i", repo_id, description, enabled);
g_signal_emit (transaction, signals[SIGNAL_REPO_DETAIL], 0, repo_id, description, enabled);
g_free (repo_id);
@@ -1241,7 +1240,7 @@ pk_transaction_repo_signature_required_cb (PkBackend *backend, PkRepoSignatureRe
/* emit */
type_text = pk_sig_type_enum_to_string (type);
- egg_debug ("emitting repo_signature_required %s, %s, %s, %s, %s, %s, %s, %s",
+ g_debug ("emitting repo_signature_required %s, %s, %s, %s, %s, %s, %s, %s",
package_id, repository_name, key_url, key_userid, key_id,
key_fingerprint, key_timestamp, type_text);
g_signal_emit (transaction, signals[SIGNAL_REPO_SIGNATURE_REQUIRED], 0,
@@ -1286,7 +1285,7 @@ pk_transaction_eula_required_cb (PkBackend *backend, PkEulaRequired *item, PkTra
NULL);
/* emit */
- egg_debug ("emitting eula-required %s, %s, %s, %s",
+ g_debug ("emitting eula-required %s, %s, %s, %s",
eula_id, package_id, vendor_name, license_agreement);
g_signal_emit (transaction, signals[SIGNAL_EULA_REQUIRED], 0,
eula_id, package_id, vendor_name, license_agreement);
@@ -1326,7 +1325,7 @@ pk_transaction_media_change_required_cb (PkBackend *backend, PkMediaChangeRequir
/* emit */
media_type_text = pk_media_type_enum_to_string (media_type);
- egg_debug ("emitting media-change-required %s, %s, %s",
+ g_debug ("emitting media-change-required %s, %s, %s",
media_type_text, media_id, media_text);
g_signal_emit (transaction, signals[SIGNAL_MEDIA_CHANGE_REQUIRED], 0,
media_type_text, media_id, media_text);
@@ -1381,7 +1380,7 @@ pk_transaction_require_restart_cb (PkBackend *backend, PkRequireRestart *item, P
/* ignore */
restart_text = pk_restart_enum_to_string (restart);
if (found) {
- egg_debug ("ignoring %s (%s) as already sent", restart_text, package_id);
+ g_debug ("ignoring %s (%s) as already sent", restart_text, package_id);
return;
}
@@ -1389,7 +1388,7 @@ pk_transaction_require_restart_cb (PkBackend *backend, PkRequireRestart *item, P
pk_results_add_require_restart (transaction->priv->results, item);
/* emit */
- egg_debug ("emitting require-restart %s, '%s'", restart_text, package_id);
+ g_debug ("emitting require-restart %s, '%s'", restart_text, package_id);
g_signal_emit (transaction, signals[SIGNAL_REQUIRE_RESTART], 0, restart_text, package_id);
g_free (package_id);
@@ -1410,7 +1409,7 @@ pk_transaction_status_changed_cb (PkBackend *backend, PkStatusEnum status, PkTra
/* have we already been marked as finished? */
if (transaction->priv->finished) {
- egg_warning ("Already finished, so can't proxy status %s", pk_status_enum_to_string (status));
+ g_warning ("Already finished, so can't proxy status %s", pk_status_enum_to_string (status));
return;
}
@@ -1453,7 +1452,7 @@ pk_transaction_transaction_cb (PkTransactionDb *tdb, PkTransactionPast *item, Pk
/* emit */
role_text = pk_role_enum_to_string (role);
- egg_debug ("emitting transaction %s, %s, %i, %s, %i, %s, %i, %s",
+ g_debug ("emitting transaction %s, %s, %i, %s, %i, %s, %i, %s",
tid, timespec, succeeded, role_text,
duration, data, uid, cmdline);
g_signal_emit (transaction, signals[SIGNAL_TRANSACTION], 0,
@@ -1510,7 +1509,7 @@ pk_transaction_update_detail_cb (PkBackend *backend, PkUpdateDetail *item, PkTra
NULL);
/* emit */
- egg_debug ("emitting update-detail");
+ g_debug ("emitting update-detail");
restart_text = pk_restart_enum_to_string (restart);
state_text = pk_update_state_enum_to_string (state);
g_signal_emit (transaction, signals[SIGNAL_UPDATE_DETAIL], 0,
@@ -1561,7 +1560,7 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
/* check we have anything to process */
if (package_ids == NULL) {
- egg_debug ("no package_ids for %s", pk_role_enum_to_string (priv->role));
+ g_debug ("no package_ids for %s", pk_role_enum_to_string (priv->role));
goto out;
}
@@ -1569,21 +1568,21 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
if (priv->role != PK_ROLE_ENUM_UPDATE_SYSTEM &&
priv->role != PK_ROLE_ENUM_UPDATE_PACKAGES &&
priv->role != PK_ROLE_ENUM_INSTALL_PACKAGES) {
- egg_debug ("doing nothing, as not update or install");
+ g_debug ("doing nothing, as not update or install");
goto out;
}
/* do we want to enable this codepath? */
ret = pk_conf_get_bool (priv->conf, "CheckSharedLibrariesInUse");
if (!ret) {
- egg_warning ("not checking for library restarts");
+ g_warning ("not checking for library restarts");
goto out;
}
/* do we have a cache */
results = pk_cache_get_results (priv->cache, PK_ROLE_ENUM_GET_UPDATES);
if (results == NULL) {
- egg_warning ("no updates cache");
+ g_warning ("no updates cache");
goto out;
}
@@ -1596,7 +1595,7 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
"package-id", &package_id,
NULL);
if (info == PK_INFO_ENUM_SECURITY) {
- egg_debug ("security update: %s", package_id);
+ g_debug ("security update: %s", package_id);
length++;
}
g_free (package_id);
@@ -1604,7 +1603,7 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
/* nothing to scan for */
if (length == 0) {
- egg_debug ("no security updates");
+ g_debug ("no security updates");
goto out;
}
@@ -1621,7 +1620,6 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
g_free (package_id);
}
-
/* is a security update we are installing */
if (priv->role == PK_ROLE_ENUM_INSTALL_PACKAGES) {
ret = FALSE;
@@ -1638,7 +1636,7 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
/* nothing matched */
if (!ret) {
- egg_debug ("not installing a security update package");
+ g_debug ("not installing a security update package");
goto out;
}
}
@@ -1646,7 +1644,7 @@ pk_transaction_pre_transaction_checks (PkTransaction *transaction, gchar **packa
/* find files in security updates */
ret = pk_transaction_extra_check_library_restart_pre (priv->transaction_extra, package_ids_security);
if (!ret) {
- egg_debug ("could not check the library list");
+ g_debug ("could not check the library list");
goto out;
}
out:
@@ -1703,7 +1701,7 @@ pk_transaction_set_session_state (PkTransaction *transaction, GError **error)
g_set_error_literal (error, 1, 0, "failed to set the root");
goto out;
}
- egg_debug ("using http_proxy=%s, ftp_proxy=%s, root=%s for %i:%s",
+ g_debug ("using http_proxy=%s, ftp_proxy=%s, root=%s for %i:%s",
proxy_http, proxy_ftp, root, priv->uid, session);
out:
g_free (proxy_http);
@@ -1722,7 +1720,7 @@ pk_transaction_speed_cb (GObject *object, GParamSpec *pspec, PkTransaction *tran
"speed", &transaction->priv->speed,
NULL);
/* emit */
- egg_debug ("emitting changed");
+ g_debug ("emitting changed");
g_signal_emit (transaction, signals[SIGNAL_CHANGED], 0);
}
@@ -1765,7 +1763,7 @@ pk_transaction_set_running (PkTransaction *transaction)
/* set proxy */
ret = pk_transaction_set_session_state (transaction, &error);
if (!ret) {
- egg_warning ("failed to set the session state: %s", error->message);
+ g_warning ("failed to set the session state: %s", error->message);
g_error_free (error);
}
@@ -1793,7 +1791,7 @@ pk_transaction_set_running (PkTransaction *transaction)
/* set the role */
pk_backend_set_role (priv->backend, priv->role);
- egg_debug ("setting role for %s to %s", priv->tid, pk_role_enum_to_string (priv->role));
+ g_debug ("setting role for %s to %s", priv->tid, pk_role_enum_to_string (priv->role));
/* connect up the signals */
priv->signal_allow_cancel =
@@ -1921,7 +1919,7 @@ pk_transaction_set_running (PkTransaction *transaction)
if (pk_backend_is_implemented (priv->backend, PK_ROLE_ENUM_SIMULATE_INSTALL_PACKAGES)) {
pk_backend_simulate_install_packages (priv->backend, priv->cached_package_ids);
} else {
- egg_warning ("falling back to get depends as simulate install packages isn't implemented");
+ g_warning ("falling back to get depends as simulate install packages isn't implemented");
/* we need to emit the original packages before we fall back */
for (i=0; priv->cached_package_ids[i] != NULL; i++)
pk_backend_package (priv->backend, PK_INFO_ENUM_INSTALLING, priv->cached_package_ids[i], "");
@@ -1933,7 +1931,7 @@ pk_transaction_set_running (PkTransaction *transaction)
if (pk_backend_is_implemented (priv->backend, PK_ROLE_ENUM_SIMULATE_REMOVE_PACKAGES)) {
pk_backend_simulate_remove_packages (priv->backend, priv->cached_package_ids, priv->cached_autoremove);
} else {
- egg_warning ("falling back to get requires as simulate remove packages isn't implemented");
+ g_warning ("falling back to get requires as simulate remove packages isn't implemented");
filters = pk_bitfield_from_enums (PK_FILTER_ENUM_INSTALLED, PK_FILTER_ENUM_NEWEST, -1);
pk_backend_get_requires (priv->backend, filters, priv->cached_package_ids, TRUE);
}
@@ -1942,7 +1940,7 @@ pk_transaction_set_running (PkTransaction *transaction)
if (pk_backend_is_implemented (priv->backend, PK_ROLE_ENUM_SIMULATE_UPDATE_PACKAGES)) {
pk_backend_simulate_update_packages (priv->backend, priv->cached_package_ids);
} else {
- egg_warning ("falling back to get depends as simulate update packages isn't implemented");
+ g_warning ("falling back to get depends as simulate update packages isn't implemented");
/* we need to emit the original packages before we fall back */
for (i=0; priv->cached_package_ids[i] != NULL; i++)
pk_backend_package (priv->backend, PK_INFO_ENUM_UPDATING, priv->cached_package_ids[i], "");
@@ -1950,7 +1948,7 @@ pk_transaction_set_running (PkTransaction *transaction)
pk_backend_get_depends (priv->backend, filters, priv->cached_package_ids, TRUE);
}
} else {
- egg_error ("failed to run as role not assigned");
+ g_error ("failed to run as role not assigned");
ret = FALSE;
}
out:
@@ -1997,7 +1995,7 @@ pk_transaction_set_tid (PkTransaction *transaction, const gchar *tid)
g_return_val_if_fail (transaction->priv->tid == NULL, FALSE);
if (transaction->priv->tid != NULL) {
- egg_warning ("changing a tid -- why?");
+ g_warning ("changing a tid -- why?");
return FALSE;
}
g_free (transaction->priv->tid);
@@ -2015,7 +2013,7 @@ pk_transaction_set_sender (PkTransaction *transaction, const gchar *sender)
g_return_val_if_fail (sender != NULL, FALSE);
g_return_val_if_fail (transaction->priv->sender == NULL, FALSE);
- egg_debug ("setting sender to %s", sender);
+ g_debug ("setting sender to %s", sender);
transaction->priv->sender = g_strdup (sender);
egg_dbus_monitor_assign (transaction->priv->monitor, EGG_DBUS_MONITOR_SYSTEM, sender);
@@ -2068,7 +2066,7 @@ pk_transaction_commit (PkTransaction *transaction)
priv->tid);
if (!ret) {
pk_transaction_release_tid (transaction);
- egg_warning ("failed to commit (job not run?)");
+ g_warning ("failed to commit (job not run?)");
return FALSE;
}
@@ -2110,7 +2108,6 @@ pk_transaction_finished_idle_cb (PkTransaction *transaction)
return FALSE;
}
-
/**
* pk_transaction_strvalidate_char:
* @item: A single char to test
@@ -2311,7 +2308,7 @@ pk_transaction_action_obtain_authorization_finished_cb (GObject *source_object,
/* failed, maybe polkit is messed up? */
if (result == NULL) {
- egg_warning ("failed to check for auth: %s", error->message);
+ g_warning ("failed to check for auth: %s", error->message);
/* emit an ::StatusChanged, ::ErrorCode() and then ::Finished() */
pk_transaction_status_changed_emit (transaction, PK_STATUS_ENUM_FINISHED);
@@ -2339,7 +2336,7 @@ pk_transaction_action_obtain_authorization_finished_cb (GObject *source_object,
/* try to commit this */
ret = pk_transaction_commit (transaction);
if (!ret) {
- egg_warning ("Could not commit to a transaction object");
+ g_warning ("Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
goto out;
}
@@ -2514,12 +2511,12 @@ pk_transaction_obtain_authorization (PkTransaction *transaction, gboolean only_t
{
gboolean ret;
- egg_warning ("*** THERE IS NO SECURITY MODEL BEING USED!!! ***");
+ g_warning ("*** THERE IS NO SECURITY MODEL BEING USED!!! ***");
/* try to commit this */
ret = pk_transaction_commit (transaction);
if (!ret) {
- egg_warning ("Could not commit to a transaction object");
+ g_warning ("Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
}
@@ -2575,7 +2572,7 @@ pk_transaction_dbus_return_error (DBusGMethodInvocation *context, GError *error)
{
/* not set inside the test suite */
if (context == NULL) {
- egg_warning ("context null, and error: %s", error->message);
+ g_warning ("context null, and error: %s", error->message);
g_error_free (error);
return;
}
@@ -2633,7 +2630,7 @@ pk_transaction_accept_eula (PkTransaction *transaction, const gchar *eula_id, DB
return;
}
- egg_debug ("AcceptEula method called: %s", eula_id);
+ g_debug ("AcceptEula method called: %s", eula_id);
ret = pk_backend_accept_eula (transaction->priv->backend, eula_id);
if (!ret) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INPUT_INVALID,
@@ -2667,7 +2664,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("Cancel method called on %s", transaction->priv->tid);
+ g_debug ("Cancel method called on %s", transaction->priv->tid);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_CANCEL)) {
@@ -2679,7 +2676,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
/* if it's finished, cancelling will have no action regardless of uid */
if (transaction->priv->finished) {
- egg_debug ("No point trying to cancel a finished transaction, ignoring");
+ g_debug ("No point trying to cancel a finished transaction, ignoring");
/* return from async with success */
pk_transaction_dbus_return (context);
@@ -2707,7 +2704,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
sender = dbus_g_method_get_sender (context);
ret = (g_strcmp0 (transaction->priv->sender, sender) == 0);
if (ret) {
- egg_debug ("same sender, no need to check uid");
+ g_debug ("same sender, no need to check uid");
goto skip_uid;
}
@@ -2729,7 +2726,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
/* check the caller uid with the originator uid */
if (transaction->priv->uid != uid) {
- egg_debug ("uid does not match (%i vs. %i)", transaction->priv->uid, uid);
+ g_debug ("uid does not match (%i vs. %i)", transaction->priv->uid, uid);
ret = pk_transaction_obtain_authorization (transaction, FALSE, PK_ROLE_ENUM_CANCEL, &error);
if (!ret) {
pk_transaction_dbus_return_error (context, error);
@@ -2786,7 +2783,7 @@ pk_transaction_download_packages (PkTransaction *transaction, gchar **package_id
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("DownloadPackages method called: %s", package_ids[0]);
+ g_debug ("DownloadPackages method called: %s", package_ids[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_DOWNLOAD_PACKAGES)) {
@@ -2872,7 +2869,7 @@ pk_transaction_get_categories (PkTransaction *transaction, DBusGMethodInvocation
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("GetCategories method called");
+ g_debug ("GetCategories method called");
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_GET_CATEGORIES)) {
@@ -2932,7 +2929,7 @@ pk_transaction_get_depends (PkTransaction *transaction, const gchar *filter, gch
g_return_if_fail (transaction->priv->tid != NULL);
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug ("GetDepends method called: %s (recursive %i)", package_ids_temp, recursive);
+ g_debug ("GetDepends method called: %s (recursive %i)", package_ids_temp, recursive);
g_free (package_ids_temp);
/* not implemented yet */
@@ -3019,7 +3016,7 @@ pk_transaction_get_details (PkTransaction *transaction, gchar **package_ids, DBu
g_return_if_fail (transaction->priv->tid != NULL);
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug ("GetDetails method called: %s", package_ids_temp);
+ g_debug ("GetDetails method called: %s", package_ids_temp);
g_free (package_ids_temp);
/* not implemented yet */
@@ -3092,7 +3089,7 @@ pk_transaction_get_distro_upgrades (PkTransaction *transaction, DBusGMethodInvoc
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("GetDistroUpgrades method called");
+ g_debug ("GetDistroUpgrades method called");
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_GET_DISTRO_UPGRADES)) {
@@ -3146,7 +3143,7 @@ pk_transaction_get_files (PkTransaction *transaction, gchar **package_ids, DBusG
g_return_if_fail (transaction->priv->tid != NULL);
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug ("GetFiles method called: %s", package_ids_temp);
+ g_debug ("GetFiles method called: %s", package_ids_temp);
g_free (package_ids_temp);
/* not implemented yet */
@@ -3219,7 +3216,7 @@ pk_transaction_get_packages (PkTransaction *transaction, const gchar *filter, DB
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("GetPackages method called: %s", filter);
+ g_debug ("GetPackages method called: %s", filter);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_GET_PACKAGES)) {
@@ -3275,7 +3272,7 @@ pk_transaction_get_old_transactions (PkTransaction *transaction, guint number, G
g_return_val_if_fail (PK_IS_TRANSACTION (transaction), FALSE);
g_return_val_if_fail (transaction->priv->tid != NULL, FALSE);
- egg_debug ("GetOldTransactions method called");
+ g_debug ("GetOldTransactions method called");
pk_transaction_set_role (transaction, PK_ROLE_ENUM_GET_OLD_TRANSACTIONS);
pk_transaction_db_get_list (transaction->priv->transaction_db, number);
@@ -3299,7 +3296,7 @@ pk_transaction_get_repo_list (PkTransaction *transaction, const gchar *filter, D
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("GetRepoList method called");
+ g_debug ("GetRepoList method called");
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_GET_REPO_LIST)) {
@@ -3361,7 +3358,7 @@ pk_transaction_get_requires (PkTransaction *transaction, const gchar *filter, gc
g_return_if_fail (transaction->priv->tid != NULL);
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug ("GetRequires method called: %s (recursive %i)", package_ids_temp, recursive);
+ g_debug ("GetRequires method called: %s (recursive %i)", package_ids_temp, recursive);
g_free (package_ids_temp);
/* not implemented yet */
@@ -3449,7 +3446,7 @@ pk_transaction_get_update_detail (PkTransaction *transaction, gchar **package_id
g_return_if_fail (transaction->priv->tid != NULL);
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug ("GetUpdateDetail method called: %s", package_ids_temp);
+ g_debug ("GetUpdateDetail method called: %s", package_ids_temp);
g_free (package_ids_temp);
/* not implemented yet */
@@ -3534,11 +3531,11 @@ pk_transaction_try_emit_cache (PkTransaction *transaction)
/* failed last time */
exit_enum = pk_results_get_exit_code (results);
if (exit_enum != PK_EXIT_ENUM_SUCCESS) {
- egg_warning ("failed last time with: %s", pk_exit_enum_to_string (exit_enum));
+ g_warning ("failed last time with: %s", pk_exit_enum_to_string (exit_enum));
goto out;
}
- egg_debug ("we have cached data we should use");
+ g_debug ("we have cached data we should use");
/* packages */
package_array = pk_results_get_package_array (results);
@@ -3591,7 +3588,7 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("GetUpdates method called");
+ g_debug ("GetUpdates method called");
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_GET_UPDATES)) {
@@ -3722,7 +3719,7 @@ pk_transaction_install_files (PkTransaction *transaction, gboolean only_trusted,
g_return_if_fail (transaction->priv->tid != NULL);
full_paths_temp = pk_package_ids_to_string (full_paths);
- egg_debug ("InstallFiles method called: %s (only_trusted %i)", full_paths_temp, only_trusted);
+ g_debug ("InstallFiles method called: %s (only_trusted %i)", full_paths_temp, only_trusted);
g_free (full_paths_temp);
/* not implemented yet */
@@ -3828,7 +3825,7 @@ pk_transaction_install_packages (PkTransaction *transaction, gboolean only_trust
g_return_if_fail (transaction->priv->tid != NULL);
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug ("InstallPackages method called: %s", package_ids_temp);
+ g_debug ("InstallPackages method called: %s", package_ids_temp);
g_free (package_ids_temp);
/* not implemented yet */
@@ -3902,7 +3899,7 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("InstallSignature method called: %s, %s", key_id, package_id);
+ g_debug ("InstallSignature method called: %s, %s", key_id, package_id);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_INSTALL_SIGNATURE)) {
@@ -3968,7 +3965,7 @@ pk_transaction_refresh_cache (PkTransaction *transaction, gboolean force, DBusGM
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("RefreshCache method called: %i", force);
+ g_debug ("RefreshCache method called: %i", force);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_REFRESH_CACHE)) {
@@ -4024,7 +4021,7 @@ pk_transaction_remove_packages (PkTransaction *transaction, gchar **package_ids,
g_return_if_fail (transaction->priv->tid != NULL);
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug ("RemovePackages method called: %s, %i, %i", package_ids_temp, allow_deps, autoremove);
+ g_debug ("RemovePackages method called: %s, %i, %i", package_ids_temp, allow_deps, autoremove);
g_free (package_ids_temp);
/* not implemented yet */
@@ -4098,7 +4095,7 @@ pk_transaction_repo_enable (PkTransaction *transaction, const gchar *repo_id, gb
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("RepoEnable method called: %s, %i", repo_id, enabled);
+ g_debug ("RepoEnable method called: %s, %i", repo_id, enabled);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_REPO_ENABLE)) {
@@ -4156,7 +4153,7 @@ pk_transaction_repo_set_data (PkTransaction *transaction, const gchar *repo_id,
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("RepoSetData method called: %s, %s, %s", repo_id, parameter, value);
+ g_debug ("RepoSetData method called: %s, %s, %s", repo_id, parameter, value);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_REPO_SET_DATA)) {
@@ -4219,7 +4216,7 @@ pk_transaction_resolve (PkTransaction *transaction, const gchar *filter,
g_return_if_fail (transaction->priv->tid != NULL);
packages_temp = pk_package_ids_to_string (packages);
- egg_debug ("Resolve method called: %s, %s", filter, packages_temp);
+ g_debug ("Resolve method called: %s, %s", filter, packages_temp);
g_free (packages_temp);
/* not implemented yet */
@@ -4300,7 +4297,7 @@ pk_transaction_rollback (PkTransaction *transaction, const gchar *transaction_id
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("Rollback method called: %s", transaction_id);
+ g_debug ("Rollback method called: %s", transaction_id);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_ROLLBACK)) {
@@ -4356,7 +4353,7 @@ pk_transaction_search_details (PkTransaction *transaction, const gchar *filter,
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("SearchDetails method called: %s, %s", filter, values[0]);
+ g_debug ("SearchDetails method called: %s, %s", filter, values[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_SEARCH_DETAILS)) {
@@ -4424,7 +4421,7 @@ pk_transaction_search_files (PkTransaction *transaction, const gchar *filter,
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("SearchFiles method called: %s, %s", filter, values[0]);
+ g_debug ("SearchFiles method called: %s, %s", filter, values[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_SEARCH_FILE)) {
@@ -4503,7 +4500,7 @@ pk_transaction_search_groups (PkTransaction *transaction, const gchar *filter,
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("SearchGroups method called: %s, %s", filter, values[0]);
+ g_debug ("SearchGroups method called: %s, %s", filter, values[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_SEARCH_GROUP)) {
@@ -4581,7 +4578,7 @@ pk_transaction_search_names (PkTransaction *transaction, const gchar *filter,
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("SearchNames method called: %s, %s", filter, values[0]);
+ g_debug ("SearchNames method called: %s, %s", filter, values[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_SEARCH_NAME)) {
@@ -4727,7 +4724,7 @@ pk_transaction_set_hint (PkTransaction *transaction, const gchar *key, const gch
}
/* to preserve forwards and backwards compatibility, we ignore extra options here */
- egg_warning ("unknown option: %s with value %s", key, value);
+ g_warning ("unknown option: %s with value %s", key, value);
out:
return ret;
}
@@ -4748,7 +4745,7 @@ pk_transaction_set_hints (PkTransaction *transaction, gchar **hints, DBusGMethod
g_return_if_fail (transaction->priv->tid != NULL);
dbg = g_strjoinv (", ", hints);
- egg_debug ("SetHints method called: %s", dbg);
+ g_debug ("SetHints method called: %s", dbg);
g_free (dbg);
/* check if the sender is the same */
@@ -4805,7 +4802,7 @@ pk_transaction_simulate_install_files (PkTransaction *transaction, gchar **full_
g_return_if_fail (transaction->priv->tid != NULL);
full_paths_temp = pk_package_ids_to_string (full_paths);
- egg_debug ("SimulateInstallFiles method called: %s", full_paths_temp);
+ g_debug ("SimulateInstallFiles method called: %s", full_paths_temp);
g_free (full_paths_temp);
/* not implemented yet */
@@ -4908,7 +4905,7 @@ pk_transaction_simulate_install_packages (PkTransaction *transaction, gchar **pa
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("SimulateInstallPackages method called: %s", package_ids[0]);
+ g_debug ("SimulateInstallPackages method called: %s", package_ids[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_SIMULATE_INSTALL_PACKAGES) &&
@@ -4984,7 +4981,7 @@ pk_transaction_simulate_remove_packages (PkTransaction *transaction, gchar **pac
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("SimulateRemovePackages method called: %s", package_ids[0]);
+ g_debug ("SimulateRemovePackages method called: %s", package_ids[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_SIMULATE_REMOVE_PACKAGES) &&
@@ -5061,7 +5058,7 @@ pk_transaction_simulate_update_packages (PkTransaction *transaction, gchar **pac
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("SimulateUpdatePackages method called: %s", package_ids[0]);
+ g_debug ("SimulateUpdatePackages method called: %s", package_ids[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_SIMULATE_UPDATE_PACKAGES) &&
@@ -5138,7 +5135,7 @@ pk_transaction_update_packages (PkTransaction *transaction, gboolean only_truste
g_return_if_fail (transaction->priv->tid != NULL);
package_ids_temp = pk_package_ids_to_string (package_ids);
- egg_debug ("UpdatePackages method called: %s", package_ids_temp);
+ g_debug ("UpdatePackages method called: %s", package_ids_temp);
g_free (package_ids_temp);
/* not implemented yet */
@@ -5210,7 +5207,7 @@ pk_transaction_update_system (PkTransaction *transaction, gboolean only_trusted,
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("UpdateSystem method called");
+ g_debug ("UpdateSystem method called");
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_UPDATE_SYSTEM)) {
@@ -5267,7 +5264,7 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("WhatProvides method called: %s, %s", type, values[0]);
+ g_debug ("WhatProvides method called: %s, %s", type, values[0]);
/* not implemented yet */
if (!pk_backend_is_implemented (transaction->priv->backend, PK_ROLE_ENUM_WHAT_PROVIDES)) {
@@ -5702,7 +5699,7 @@ pk_transaction_dispose (GObject *object)
}
/* send signal to clients that we are about to be destroyed */
- egg_debug ("emitting destroy %s", transaction->priv->tid);
+ g_debug ("emitting destroy %s", transaction->priv->tid);
g_signal_emit (transaction, signals[SIGNAL_DESTROY], 0);
G_OBJECT_CLASS (pk_transaction_parent_class)->dispose (object);
commit e205afe7a3630fd607d731671d5e18897424fc7a
Author: Richard Hughes <richard at hughsie.com>
Date: Sun Oct 17 20:30:21 2010 +0100
Prevent a segfault when estimating the time when the backend issues many ProgressChanged signals at one time. Fixes #30941
diff --git a/src/pk-time.c b/src/pk-time.c
index 41791b4..762f1cd 100644
--- a/src/pk-time.c
+++ b/src/pk-time.c
@@ -131,6 +131,8 @@ pk_time_get_gradient (PkTimeItem *item1, PkTimeItem *item2)
{
gfloat dy;
gfloat dx;
+ if (item1->time == item2->time)
+ return 0;
dy = (gfloat) (item1->percentage - item2->percentage);
dx = (gfloat) (item1->time - item2->time);
return dy/dx;
commit 5c6f4b4ba90ba688736d07fdd33de8794b6aee8c
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Fri Oct 15 09:30:57 2010 +0200
smart: set PATH for FreeBSD (and Linux)
diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index 375f2d7..d7eeeab 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -1331,7 +1331,10 @@ def main():
backend.dispatcher(sys.argv[1:])
# Required for daemon mode
-os.putenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
+if sys.platform.startswith("linux"):
+ os.putenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
+elif sys.platform.startswith("freebsd"):
+ os.putenv("PATH", "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin")
if __name__ == "__main__":
main()
commit 1da914ca4e995b65e260bb721458efa4eeffe69a
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Fri Oct 15 09:15:03 2010 +0200
add missing os import
diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index db89ecc..375f2d7 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -28,6 +28,7 @@ from packagekit.package import PackagekitPackage
from packagekit.enums import *
import re
import sys
+import os
import codecs
import locale
@@ -938,7 +939,6 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
systemchannel = None # unfortunately package strings depend on system
def _machine(self):
- import os
machine = os.uname()[-1]
if machine == "Power Macintosh": #<sigh>
machine = "ppc"
commit 2aa54af3d79ddc6637262e152cf8f2c69e8e4506
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Thu Oct 14 18:47:32 2010 +0200
smart: dpkg requires a PATH variable, so set it.
diff --git a/backends/smart/smartBackend.py b/backends/smart/smartBackend.py
index d26a1c9..db89ecc 100755
--- a/backends/smart/smartBackend.py
+++ b/backends/smart/smartBackend.py
@@ -1330,5 +1330,8 @@ def main():
backend = PackageKitSmartBackend('')
backend.dispatcher(sys.argv[1:])
+# Required for daemon mode
+os.putenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
+
if __name__ == "__main__":
main()
commit c23fc9733475437f16aa22e4ce2552ee762a87b3
Author: Jason Woodward <woodwardj at jaos.org>
Date: Tue Sep 28 00:08:03 2010 +0000
updated slapt backend for compatibility with slapt-get 0.10.2g
Signed-off-by: Jason Woodward <woodwardj at jaos.org>
Signed-off-by: Anders F Bjorklund <afb at users.sourceforge.net>
diff --git a/backends/slapt/pk-backend-slapt.c b/backends/slapt/pk-backend-slapt.c
index 4e16ccd..cb6eb82 100644
--- a/backends/slapt/pk-backend-slapt.c
+++ b/backends/slapt/pk-backend-slapt.c
@@ -224,8 +224,8 @@ backend_cancel (PkBackend *backend)
}
static slapt_pkg_info_t* _get_pkg_from_id(PkPackageId *pi,
- struct slapt_pkg_list *avail_pkgs,
- struct slapt_pkg_list *installed_pkgs)
+ slapt_pkg_list_t *avail_pkgs,
+ slapt_pkg_list_t *installed_pkgs)
{
slapt_pkg_info_t *pkg;
gchar **fields;
@@ -244,8 +244,8 @@ static slapt_pkg_info_t* _get_pkg_from_id(PkPackageId *pi,
}
static slapt_pkg_info_t* _get_pkg_from_string(const gchar *package_id,
- struct slapt_pkg_list *avail_pkgs,
- struct slapt_pkg_list *installed_pkgs)
+ slapt_pkg_list_t *avail_pkgs,
+ slapt_pkg_list_t *installed_pkgs)
{
PkPackageId *pi;
slapt_pkg_info_t *pkg;
@@ -354,13 +354,13 @@ backend_get_depends (PkBackend *backend, PkBitfield filters, gchar **package_ids
slapt_pkg_info_t *pkg;
int ret;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
- struct slapt_pkg_list *depends;
+ slapt_pkg_list_t *depends;
- struct slapt_pkg_err_list *conflicts;
- struct slapt_pkg_err_list *missing;
+ slapt_pkg_err_list_t *conflicts;
+ slapt_pkg_err_list_t *missing;
PkInfoEnum state;
const char *summary;
@@ -432,8 +432,8 @@ backend_get_details (PkBackend *backend, gchar **package_ids)
const gchar *description;
PkGroupEnum group;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
slapt_pkg_info_t *pkg;
const char *category;
struct category_map *catgroup;
@@ -497,10 +497,10 @@ backend_get_requires (PkBackend *backend, PkBitfield filters, gchar **package_id
slapt_pkg_info_t *pkg;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
- struct slapt_pkg_list *requires;
+ slapt_pkg_list_t *requires;
PkInfoEnum state;
const char *summary;
@@ -560,10 +560,10 @@ backend_get_update_detail (PkBackend *backend, gchar **package_ids)
const gchar *old_package_id;
PkPackageId *pi;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
const gchar *search;
- struct slapt_pkg_list *results;
+ slapt_pkg_list_t *results;
slapt_pkg_info_t *pkg;
slapt_pkg_info_t *oldpkg;
const gchar *title;
@@ -635,8 +635,8 @@ backend_get_updates (PkBackend *backend, PkBitfield filters)
const gchar *package_id;
const gchar *new_package_id;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
slapt_pkg_info_t *pkg;
slapt_pkg_info_t *newpkg;
const gchar *summary;
@@ -694,8 +694,8 @@ backend_install_packages (PkBackend *backend, gboolean only_trusted, gchar **pac
PkPackageId *pi;
int ret;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
slapt_transaction_t *transaction;
slapt_pkg_info_t *pkg;
@@ -771,9 +771,9 @@ backend_resolve (PkBackend *backend, PkBitfield filters, gchar **packages)
guint len;
const gchar *package_id;
- struct slapt_pkg_list *pkglist;
+ slapt_pkg_list_t *pkglist;
slapt_pkg_info_t *pkg = NULL;
- struct slapt_pkg_list *results = NULL;
+ slapt_pkg_list_t *results = NULL;
PkInfoEnum state;
const gchar *search;
@@ -832,8 +832,8 @@ backend_remove_packages (PkBackend *backend, gchar **package_ids, gboolean allow
PkPackageId *pi;
int ret;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
slapt_transaction_t *transaction;
slapt_pkg_info_t *pkg;
@@ -896,9 +896,9 @@ backend_search_details (PkBackend *backend, PkBitfield filters, const gchar *sea
guint i;
const gchar *package_id;
- struct slapt_pkg_list *pkglist;
+ slapt_pkg_list_t *pkglist;
slapt_pkg_info_t *pkg = NULL;
- struct slapt_pkg_list *results = NULL;
+ slapt_pkg_list_t *results = NULL;
PkInfoEnum state;
const char *summary;
@@ -942,7 +942,7 @@ backend_search_group (PkBackend *backend, PkBitfield filters, const gchar *searc
guint i;
const gchar *package_id;
- struct slapt_pkg_list *pkglist;
+ slapt_pkg_list_t *pkglist;
slapt_pkg_info_t *pkg = NULL;
PkGroupEnum group;
PkGroupEnum search_group;
@@ -1003,9 +1003,9 @@ backend_search_name (PkBackend *backend, PkBitfield filters, const gchar *search
unsigned int i;
const gchar *package_id;
- struct slapt_pkg_list *pkglist;
+ slapt_pkg_list_t *pkglist;
slapt_pkg_info_t *pkg = NULL;
- struct slapt_pkg_list *results = NULL;
+ slapt_pkg_list_t *results = NULL;
PkInfoEnum state;
const char *summary;
@@ -1058,10 +1058,10 @@ backend_update_packages (PkBackend *backend, gboolean only_trusted, gchar **pack
const gchar *package_id;
int ret;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
const gchar *search;
- struct slapt_pkg_list *results = NULL;
+ slapt_pkg_list_t *results = NULL;
slapt_transaction_t *transaction;
slapt_pkg_info_t *pkg;
slapt_pkg_info_t *oldpkg;
@@ -1200,14 +1200,14 @@ backend_get_packages (PkBackend *backend, PkBitfield filters)
};
PkFilterEnum *list_filter;
- struct slapt_pkg_list *pkglist;
+ slapt_pkg_list_t *pkglist;
slapt_pkg_info_t *pkg;
slapt_pkg_info_t *other_pkg;
unsigned int i;
const gchar *package_id;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
PkInfoEnum state;
const char *summary;
@@ -1278,8 +1278,8 @@ backend_download_packages (PkBackend *backend, gchar **package_ids, const gchar
const gchar *package_id;
const gchar *files;
const char *error;
- struct slapt_pkg_list *installed;
- struct slapt_pkg_list *available;
+ slapt_pkg_list_t *installed;
+ slapt_pkg_list_t *available;
slapt_pkg_info_t *pkg;
const char *summary;
const char *note = NULL;
commit 367fb624620cb803883cb547e4fbbee0c6a08fcc
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Oct 14 12:14:45 2010 +0100
yum: Remove selinux-policy from InfrastructurePackages, it's updated way too often
diff --git a/backends/yum/Yum.conf b/backends/yum/Yum.conf
index 8884138..90b9d38 100644
--- a/backends/yum/Yum.conf
+++ b/backends/yum/Yum.conf
@@ -35,7 +35,7 @@ SystemPackages=yum;rpm;glibc;PackageKit
# infrastructure packages too, and are included in the update viewer.
#
# default=PackageKit;yum;rpm;gnome-packagekit;kpackagekit;selinux-policy
-InfrastructurePackages=PackageKit;yum;rpm;gnome-packagekit;kpackagekit;selinux-policy
+InfrastructurePackages=PackageKit;yum;rpm;gnome-packagekit;kpackagekit
# Yum is slow, and we can use Zif to accelerate some simple transactions
#
commit 6086609be31097c67a60baaa43484600ebe7976c
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Oct 12 17:01:11 2010 +0100
Do not dist the PackageKitGlib-1.0.gir file to fix building on F14
diff --git a/Makefile.am b/Makefile.am
index f20b779..025a525 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -77,7 +77,6 @@ EXTRA_DIST = \
DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc \
- --enable-introspection \
--with-security-framework=dummy \
--disable-tests \
$(NULL)
diff --git a/lib/packagekit-glib2/Makefile.am b/lib/packagekit-glib2/Makefile.am
index 9c077bc..cd48236 100644
--- a/lib/packagekit-glib2/Makefile.am
+++ b/lib/packagekit-glib2/Makefile.am
@@ -245,7 +245,7 @@ PackageKitGlib_1_0_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += PackageKitGlib-1.0.gir
girdir = $(datadir)/gir-1.0
-dist_gir_DATA = $(INTROSPECTION_GIRS)
+gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
More information about the PackageKit-commit
mailing list