Skip to content

Commit

Permalink
bin/xbps-install/transaction: print consistently for dry run
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
classabbyamp committed Dec 10, 2024
1 parent e82437f commit 6afe4f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/xbps-install/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 6afe4f8

Please sign in to comment.