@@ -201,6 +201,8 @@ show_transaction_sizes(struct transaction *trans, int cols)
201201 & trans -> rm_pkgcnt );
202202 xbps_dictionary_get_uint32 (trans -> d , "total-hold-pkgs" ,
203203 & trans -> hold_pkgcnt );
204+ xbps_dictionary_get_uint32 (trans -> d , "total-replaced-pkgs" ,
205+ & trans -> repl_pkgcnt );
204206
205207 if (!print_trans_colmode (trans , cols )) {
206208 /*
@@ -242,6 +244,12 @@ show_transaction_sizes(struct transaction *trans, int cols)
242244 show_package_list (trans , XBPS_TRANS_HOLD , cols );
243245 printf ("\n" );
244246 }
247+ if (trans -> repl_pkgcnt ) {
248+ printf ("%u package%s will be replaced:\n" ,
249+ trans -> repl_pkgcnt , trans -> repl_pkgcnt == 1 ? "" : "s" );
250+ show_package_list (trans , XBPS_TRANS_REPLACED , cols );
251+ printf ("\n" );
252+ }
245253 }
246254 /*
247255 * Show total download/installed/removed size for all required packages.
@@ -493,12 +501,13 @@ exec_transaction(struct xbps_handle *xhp, unsigned int maxcols, bool yes, bool d
493501 */
494502 if ((rv = xbps_transaction_commit (xhp )) == 0 ) {
495503 printf ("\n%u downloaded, %u installed, %u updated, "
496- "%u configured, %u removed, %u on hold.\n" ,
504+ "%u configured, %u removed, %u on hold, %u replaced .\n" ,
497505 trans -> dl_pkgcnt , trans -> inst_pkgcnt ,
498506 trans -> up_pkgcnt ,
499507 trans -> cf_pkgcnt + trans -> inst_pkgcnt + trans -> up_pkgcnt ,
500508 trans -> rm_pkgcnt ,
501- trans -> hold_pkgcnt );
509+ trans -> hold_pkgcnt ,
510+ trans -> repl_pkgcnt );
502511 } else {
503512 xbps_error_printf ("Transaction failed! see above for errors.\n" );
504513 }
0 commit comments