[gnome-software/wip/mcrha/ci-test] more transaction debug prints
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/mcrha/ci-test] more transaction debug prints
- Date: Wed, 16 Mar 2022 15:15:54 +0000 (UTC)
commit 416c83875f4b64331735e3bb7da1df171a4323a8
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 16 16:15:11 2022 +0100
more transaction debug prints
plugins/flatpak/gs-flatpak-transaction.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak-transaction.c b/plugins/flatpak/gs-flatpak-transaction.c
index efcafd6f3..c8d273007 100644
--- a/plugins/flatpak/gs-flatpak-transaction.c
+++ b/plugins/flatpak/gs-flatpak-transaction.c
@@ -139,15 +139,18 @@ _transaction_ready (FlatpakTransaction *transaction)
{
GsFlatpakTransaction *self = GS_FLATPAK_TRANSACTION (transaction);
g_autolist(GObject) ops = NULL;
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
/* nothing to do */
ops = flatpak_transaction_get_operations (transaction);
if (ops == NULL)
return TRUE; // FIXME: error?
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
for (GList *l = ops; l != NULL; l = l->next) {
FlatpakTransactionOperation *op = l->data;
const gchar *ref = flatpak_transaction_operation_get_ref (op);
g_autoptr(GsApp) app = _ref_to_app (self, ref);
+ g_message (" aaa %s: %d app:%p\n", __FUNCTION__, __LINE__, app);
if (app != NULL) {
_transaction_operation_set_app (op, app);
/* if we're updating a component, then mark all the apps
@@ -161,6 +164,7 @@ _transaction_ready (FlatpakTransaction *transaction)
}
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
/* Debug dump. */
{
GPtrArray *related_to_ops = flatpak_transaction_operation_get_related_to_ops (op);
@@ -180,7 +184,9 @@ _transaction_ready (FlatpakTransaction *transaction)
g_string_append (debug_message, "\n └ (end)");
g_debug ("%s", debug_message->str);
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
return TRUE;
}
@@ -370,6 +376,7 @@ _transaction_progress_changed_cb (FlatpakTransactionProgress *progress,
GsApp *app = data->app;
GsFlatpakTransaction *self = data->transaction;
g_autolist(FlatpakTransactionOperation) ops = NULL;
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
if (flatpak_transaction_progress_get_is_estimating (progress)) {
/* "Estimating" happens while fetching the metadata, which
@@ -377,6 +384,7 @@ _transaction_progress_changed_cb (FlatpakTransactionProgress *progress,
* each operation. At this point, no more detailed progress
* information is available. */
gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN);
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
return;
}
@@ -403,8 +411,10 @@ _transaction_progress_changed_cb (FlatpakTransactionProgress *progress,
* flatpak_transaction_operation_get_related_to_ops(), so have to be
* ignored manually.
*/
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
ops = flatpak_transaction_get_operations (FLATPAK_TRANSACTION (self));
update_progress_for_op_recurse_up (self, progress, ops, data->operation, data->operation);
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
}
static const gchar *
@@ -436,16 +446,19 @@ _transaction_new_operation (FlatpakTransaction *transaction,
GsApp *app;
g_autoptr(ProgressData) progress_data = NULL;
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
/* find app */
app = _transaction_operation_get_app (operation);
if (app == NULL) {
FlatpakTransactionOperationType ot;
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
ot = flatpak_transaction_operation_get_operation_type (operation);
g_warning ("failed to find app for %s during %s",
flatpak_transaction_operation_get_ref (operation),
_flatpak_transaction_operation_type_to_string (ot));
return;
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
/* report progress */
progress_data = g_new0 (ProgressData, 1);
@@ -484,6 +497,7 @@ _transaction_new_operation (FlatpakTransaction *transaction,
default:
break;
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
}
static gboolean
@@ -561,14 +575,17 @@ _transaction_operation_done (FlatpakTransaction *transaction,
FlatpakTransactionResult details)
{
GsFlatpakTransaction *self = GS_FLATPAK_TRANSACTION (transaction);
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
/* invalidate */
GsApp *app = _transaction_operation_get_app (operation);
if (app == NULL) {
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
g_warning ("failed to find app for %s",
flatpak_transaction_operation_get_ref (operation));
return;
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
switch (flatpak_transaction_operation_get_operation_type (operation)) {
case FLATPAK_TRANSACTION_OPERATION_INSTALL:
case FLATPAK_TRANSACTION_OPERATION_INSTALL_BUNDLE:
@@ -600,6 +617,7 @@ _transaction_operation_done (FlatpakTransaction *transaction,
gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
break;
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
}
static gboolean
@@ -612,8 +630,10 @@ _transaction_operation_error (FlatpakTransaction *transaction,
FlatpakTransactionOperationType operation_type = flatpak_transaction_operation_get_operation_type
(operation);
GsApp *app = _transaction_operation_get_app (operation);
const gchar *ref = flatpak_transaction_operation_get_ref (operation);
+ g_message (" aaa %s: %d: error:%s\n", __FUNCTION__, __LINE__, error ? error->message : "");
if (g_error_matches (error, FLATPAK_ERROR, FLATPAK_ERROR_SKIPPED)) {
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
g_debug ("skipped to %s %s: %s",
_flatpak_transaction_operation_type_to_string (operation_type),
ref,
@@ -622,6 +642,7 @@ _transaction_operation_error (FlatpakTransaction *transaction,
}
if (detail & FLATPAK_TRANSACTION_ERROR_DETAILS_NON_FATAL) {
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
g_warning ("failed to %s %s (non fatal): %s",
_flatpak_transaction_operation_type_to_string (operation_type),
ref,
@@ -630,11 +651,13 @@ _transaction_operation_error (FlatpakTransaction *transaction,
}
if (self->first_operation_error == NULL) {
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
g_propagate_error (&self->first_operation_error,
g_error_copy (error));
if (app != NULL)
gs_utils_error_add_app_id (&self->first_operation_error, app);
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
return FALSE; /* stop */
}
@@ -644,6 +667,7 @@ _transaction_choose_remote_for_ref (FlatpakTransaction *transaction,
const char *runtime_ref,
const char * const *remotes)
{
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
//FIXME: do something smarter
return 0;
}
@@ -654,6 +678,7 @@ _transaction_end_of_lifed (FlatpakTransaction *transaction,
const gchar *reason,
const gchar *rebase)
{
+ g_message (" aaa %s: %d: ref:%s reason:%s rebase:%s\n", __FUNCTION__, __LINE__, ref, reason,
rebase);
if (rebase) {
g_message ("%s is end-of-life, in favor of %s", ref, rebase);
} else if (reason) {
@@ -670,6 +695,7 @@ _transaction_end_of_lifed_with_rebase (FlatpakTransaction *transaction,
const gchar *rebased_to_ref,
const gchar **previous_ids)
{
+ g_message (" aaa %s: %d remote:%s ref:%s reason:%s rebased_to_ref:%s\n", __FUNCTION__, __LINE__,
remote, ref, reason, rebased_to_ref);
if (rebased_to_ref) {
g_message ("%s is end-of-life, in favor of %s", ref, rebased_to_ref);
} else if (reason) {
@@ -708,17 +734,21 @@ _transaction_add_new_remote (FlatpakTransaction *transaction,
const char *remote_name,
const char *url)
{
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
/* additional applications */
if (reason == FLATPAK_TRANSACTION_REMOTE_GENERIC_REPO) {
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
g_debug ("configuring %s as new generic remote", url);
return TRUE; //FIXME?
}
/* runtime deps always make sense */
if (reason == FLATPAK_TRANSACTION_REMOTE_RUNTIME_DEPS) {
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
g_debug ("configuring %s as new remote for deps", url);
return TRUE;
}
+ g_message (" aaa %s: %d\n", __FUNCTION__, __LINE__);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]