Skip to content

Commit 6afe4f8

Browse files
committed
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.
1 parent e82437f commit 6afe4f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/xbps-install/transaction.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ show_actions(xbps_object_iterator_t iter)
6464
xbps_dictionary_get_cstring_nocopy(obj, "architecture", &arch);
6565
if (repoloc && arch)
6666
printf(" %s %s", arch, repoloc);
67+
else
68+
printf(" - -");
6769
xbps_dictionary_get_uint64(obj, "installed_size", &isize);
6870
xbps_dictionary_get_uint64(obj, "filename-size", &dsize);
69-
if (isize)
70-
printf(" %ju", isize);
71-
if (dsize)
72-
printf(" %ju", dsize);
71+
printf(" %ju", isize);
72+
printf(" %ju", dsize);
7373

7474
printf("\n");
7575
}

0 commit comments

Comments
 (0)