Skip to content

Commit

Permalink
cli: Split transaction table into sections
Browse files Browse the repository at this point in the history
libsmartcols does not support spanning cells. Currently, the intertitles
in the transaction table (e.g., "Installing:", "Upgrading:",...) are
placed into the first column. Unfortunately, these titles for skipped
packages are quite long ("Skipping packages with conflicts:" and
"Skipping packages with broken dependencies:") and cause the first
column to become unnecessarily wide, breaking the transaction table.

To resolve this issue, this patch splits the transaction table into
several sections and keeps intertitles out of the table. Each section
of the table is then printed one at a time with respective titles using
the scols_table_print_range() function.

However, there are several issues with this approach:

- cannot utilize libsmartcols to print table headers. This is
  workarounded by adding the header manually as the first section of the
  table.
- cannot use the SCOLS_FL_TREE flag for tree-like indentation. This
  is workarounded by creating indentation manually using spaces.
  • Loading branch information
m-blaha committed May 6, 2024
1 parent 23dccdf commit 8eefdf8
Showing 1 changed file with 275 additions and 255 deletions.
Loading

0 comments on commit 8eefdf8

Please sign in to comment.