Skip to content

Commit

Permalink
fix reinstall show the same version twice
Browse files Browse the repository at this point in the history
  • Loading branch information
long-walk committed Feb 11, 2024
1 parent e5e6628 commit 246b0a6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions include/libdnf5-cli/output/transaction_table.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,13 +592,15 @@ bool print_transaction_table(Transaction & transaction) {

// print Version
if (pkg.get_name() == replaced.get_name()) {
if (termwidth < single_line_min) {
scols_line_set_data(ln, COL_EVR, pkg.get_evr().c_str());
scols_line_set_data(ln_pre, COL_EVR, replaced.get_evr().c_str());
} else {
auto cl_evr = scols_line_get_cell(ln, COL_EVR);
scols_cell_set_data(
cl_evr, fmt::format("{:20s}{}{}", pkg.get_evr(), arrow, replaced.get_evr()).c_str());
if (pkg.get_evr() != replaced.get_evr()) {
if (termwidth < single_line_min) {
scols_line_set_data(ln, COL_EVR, pkg.get_evr().c_str());
scols_line_set_data(ln_pre, COL_EVR, replaced.get_evr().c_str());
} else {
auto cl_evr = scols_line_get_cell(ln, COL_EVR);
scols_cell_set_data(
cl_evr, fmt::format("{:20s}{}{}", pkg.get_evr(), arrow, replaced.get_evr()).c_str());
}
}
} else { // print replacing versions
struct libscols_line * ln_replaced = scols_table_new_line(tb, ln);
Expand Down

0 comments on commit 246b0a6

Please sign in to comment.