[ostree: 8/70] core: Add debug messages for traversing
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree: 8/70] core: Add debug messages for traversing
- Date: Fri, 15 Apr 2016 21:01:55 +0000 (UTC)
commit 750e2cbf33503ef0e08da93bba110ab3a2f46e8a
Author: Dan Nicholson <nicholson endlessm com>
Date: Mon Mar 21 15:55:19 2016 -0700
core: Add debug messages for traversing
If you have a repo where a needed object has been inadvertantly removed,
all you'll get is a "No such metadata object" error with no clue about
where it was referenced from.
Add some debug messages to provide clues about which objects are being
traversed and found.
https://bugzilla.gnome.org/show_bug.cgi?id=764006
Closes: #224
Approved by: cgwalters
src/libostree/ostree-repo-traverse.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-repo-traverse.c b/src/libostree/ostree-repo-traverse.c
index 97bd102..bb437c3 100644
--- a/src/libostree/ostree-repo-traverse.c
+++ b/src/libostree/ostree-repo-traverse.c
@@ -328,6 +328,7 @@ traverse_iter (OstreeRepo *repo,
ostree_repo_commit_traverse_iter_get_file (iter, &name, &checksum);
+ g_debug ("Found file object %s", checksum);
key = ostree_object_name_serialize (checksum, OSTREE_OBJECT_TYPE_FILE);
g_hash_table_replace (inout_reachable, key, key);
key = NULL;
@@ -341,6 +342,8 @@ traverse_iter (OstreeRepo *repo,
ostree_repo_commit_traverse_iter_get_dir (iter, &name, &content_checksum,
&meta_checksum);
+ g_debug ("Found dirtree object %s", content_checksum);
+ g_debug ("Found dirmeta object %s", meta_checksum);
key = ostree_object_name_serialize (meta_checksum, OSTREE_OBJECT_TYPE_DIR_META);
g_hash_table_replace (inout_reachable, key, key);
key = NULL;
@@ -381,6 +384,7 @@ traverse_dirtree (OstreeRepo *repo,
&dirtree, error))
goto out;
+ g_debug ("Traversing dirtree %s", checksum);
if (!ostree_repo_commit_traverse_iter_init_dirtree (&iter, repo, dirtree,
OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE,
error))
@@ -444,6 +448,7 @@ ostree_repo_traverse_commit_union (OstreeRepo *repo,
g_hash_table_add (inout_reachable, key);
key = NULL;
+ g_debug ("Traversing commit %s", commit_checksum);
if (!ostree_repo_commit_traverse_iter_init_commit (&iter, repo, commit,
OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE,
error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]