From 6afe4f87adb3dc5a6b99a9c06575ea577b23a0e7 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Tue, 10 Dec 2024 17:08:48 -0500 Subject: [PATCH] bin/xbps-install/transaction: print consistently for dry run this ensures there will always be 6 fields per line, making it possible to parse the output consistently. `arch` and `repository` default to `-`. `installed_size` and `filename-size` default to 0 to allow for easy tabulation. --- bin/xbps-install/transaction.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/xbps-install/transaction.c b/bin/xbps-install/transaction.c index 1e207741..8bb951ae 100644 --- a/bin/xbps-install/transaction.c +++ b/bin/xbps-install/transaction.c @@ -64,12 +64,12 @@ show_actions(xbps_object_iterator_t iter) xbps_dictionary_get_cstring_nocopy(obj, "architecture", &arch); if (repoloc && arch) printf(" %s %s", arch, repoloc); + else + printf(" - -"); xbps_dictionary_get_uint64(obj, "installed_size", &isize); xbps_dictionary_get_uint64(obj, "filename-size", &dsize); - if (isize) - printf(" %ju", isize); - if (dsize) - printf(" %ju", dsize); + printf(" %ju", isize); + printf(" %ju", dsize); printf("\n"); }