GNOME Bugzilla – Bug 764006
Debug messages for pruning and traversion
Last modified: 2016-03-26 15:45:49 UTC
If you have a repo with a missing object, debugging it is painful as you have no idea what's being pruned or traversed. Here's some debug messages that would help. BTW, should ostree have G_LOG_DOMAIN set to "OSTree" or something like that?
Created attachment 324510 [details] [review] core: Add verbose messages for pruning When prune fails, it can be really difficult to figure out why. This at least lets you know which objects are being considered.
Created attachment 324511 [details] [review] 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://github.com/ostreedev/ostree/pull/224
(In reply to Dan Nicholson from comment #0) > BTW, should ostree have G_LOG_DOMAIN set to "OSTree" or something like that? Yeah.
FWIW, what I've done in the past to debug this sort of thing is use: ``` ostree ls -C |grep $checksum ```
Follow up for the G_LOG_DOMAIN setting in bug764237. As for debugging, I agree on that. What I've found is helpful for the traversal is to `ostree ls -R <commit>` for each referenced commit and see what breaks. But after this I can run `ostree prune --verbose --refs-only` and it should be pretty clear what's busted.