delta-show: Don't dump whole superblock, do show fallback checksums
Doing `g_variant_print (superblock)` is unreadable and not very useful, since we show the checksums as byte arrays. However, do show the checksums for fallback objects. This makes it easier to see which objects are fallbacks (and inspect why). Closes: #678 Approved by: giuseppe
This commit is contained in:
parent
98a4547510
commit
0142e5ff39
|
|
@ -884,10 +884,6 @@ _ostree_repo_static_delta_dump (OstreeRepo *self,
|
||||||
OT_VARIANT_MAP_TRUSTED, &delta_superblock, error))
|
OT_VARIANT_MAP_TRUSTED, &delta_superblock, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
{ g_autofree char *variant_string = g_variant_print (delta_superblock, 1);
|
|
||||||
g_print ("%s\n", variant_string);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_print ("Delta: %s\n", delta_id);
|
g_print ("Delta: %s\n", delta_id);
|
||||||
{ const char *endianness_description;
|
{ const char *endianness_description;
|
||||||
gboolean was_heuristic;
|
gboolean was_heuristic;
|
||||||
|
|
@ -940,9 +936,13 @@ _ostree_repo_static_delta_dump (OstreeRepo *self,
|
||||||
for (i = 0; i < n_fallback; i++)
|
for (i = 0; i < n_fallback; i++)
|
||||||
{
|
{
|
||||||
guint64 size, usize;
|
guint64 size, usize;
|
||||||
g_variant_get_child (fallback, i, "(y@aytt)", NULL, NULL, &size, &usize);
|
g_autoptr(GVariant) checksum_v = NULL;
|
||||||
|
char checksum[65];
|
||||||
|
g_variant_get_child (fallback, i, "(y@aytt)", NULL, &checksum_v, &size, &usize);
|
||||||
|
ostree_checksum_inplace_from_bytes (ostree_checksum_bytes_peek (checksum_v), checksum);
|
||||||
size = maybe_swap_endian_u64 (swap_endian, size);
|
size = maybe_swap_endian_u64 (swap_endian, size);
|
||||||
usize = maybe_swap_endian_u64 (swap_endian, usize);
|
usize = maybe_swap_endian_u64 (swap_endian, usize);
|
||||||
|
g_print (" %s\n", checksum);
|
||||||
total_fallback_size += size;
|
total_fallback_size += size;
|
||||||
total_fallback_usize += usize;
|
total_fallback_usize += usize;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue