Skip to content

Upgrade summary output too wide (> 80 cols) #785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rwmjones opened this issue Aug 1, 2023 · 17 comments · May be fixed by #2181
Open

Upgrade summary output too wide (> 80 cols) #785

rwmjones opened this issue Aug 1, 2023 · 17 comments · May be fixed by #2181
Labels
downstream Originally reported in Jira or Bugzilla Priority: LOW Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@rwmjones
Copy link

rwmjones commented Aug 1, 2023

# dnf install wine --enablerepo=rawhide
Updating and loading repositories:
Repositories loaded.
Package                                      Arch   Version                 Repository      Size
Downgrading:                                                                                    
 openssl                                     x86_64 1:3.0.8-4.fc39          rawhide      1.6 MiB
  replacing openssl                          x86_64 1:3.0.9-1.fc38          updates      1.6 MiB
 openssl-devel                               x86_64 1:3.0.8-4.fc39          rawhide      4.1 MiB
  replacing openssl-devel                    x86_64 1:3.0.9-1.fc38          updates      4.1 MiB
 openssl-libs                                x86_64 1:3.0.8-4.fc39          rawhide      6.4 MiB
   replacing openssl-libs                    x86_64 1:3.0.9-1.fc38          updates      6.4 MiB
Upgrading:                                                                                      
 SDL2                                        x86_64 2.26.5-2.fc39           rawhide      1.8 MiB
  replacing SDL2                             x86_64 2.26.5-1.fc39           <unknown>    1.8 MiB
 SDL2-devel                                  x86_64 2.26.5-2.fc39           rawhide      2.7 MiB
  replacing SDL2-devel                       x86_64 2.26.5-1.fc39           <unknown>    2.8 MiB
 alsa-lib                                    x86_64 1.2.9-4.fc39            rawhide      1.4 MiB
  replacing alsa-lib                         x86_64 1.2.9-3.fc39            <unknown>    1.4 MiB
[etc]

This is wider than 80 columns.

@rwmjones
Copy link
Author

rwmjones commented Aug 1, 2023

(Apparently you cannot put a screenshot here)

It looks like this: http://oirase.annexia.org/tmp/Screenshot_2023-08-01_11-34-49.png

@kontura
Copy link
Contributor

kontura commented Aug 7, 2023

If there is an interactive terminal dnf5 is trying to use the full width it has available so yes it can be wider than 80. I believe this is consistent with old dnf as well.

But it shouldn't be stretching the outputs over multiple lines like in your screenshot (unless you first print the transaction table and then resize the window).
In my testing if there is not enough space it cuts off the too long elements rather than spilling over the lines.

@rwmjones
Copy link
Author

rwmjones commented Aug 7, 2023

I didn't resize the terminal. Everything would fit into 80 columns fine if there wasn't so much whitespace.

@kontura
Copy link
Contributor

kontura commented Aug 7, 2023

Interesting, do you have a reproducer for this?
Does it happen on every dnf5 command?

@rwmjones
Copy link
Author

rwmjones commented Aug 7, 2023

It happens with any install command that needs to install a significant number of packages. For example just now I did:

# dnf install libreoffice --enablerepo=rawhide
Updating and loading repositories:
Repositories loaded.
Package                             Arch   Version                 Repository      Size
Upgrading:                                                                             
 gpgme                              x86_64 1.20.0-5.fc39           rawhide    577.5 KiB
  replacing gpgme                   x86_64 1.20.0-4.fc39           fedora     577.8 KiB
 javapackages-filesystem            noarch 6.1.0-10.fc39           rawhide      1.9 KiB
  replacing javapackages-filesystem noarch 6.1.0-9.fc39            <unknown>    1.9 KiB
 python3-gpg                        x86_64 1.20.0-5.fc39           rawhide      1.5 MiB
   replacing python3-gpg            x86_64 1.20.0-4.fc39           fedora       1.5 MiB
Installing:                                                                            
 libreoffice                        x86_64 1:7.5.5.2-1.fc39        rawhide      0.0   B
Installing dependencies:                                                               
 Box2D                              x86_64 2.4.1-11.fc39           rawhide    242.3 KiB
 autocorr-en                        noarch 1:7.5.5.2-1.fc39        rawhide    286.1 KiB
 clucene-contribs-lib               x86_64 2.3.3.4-46.20130812.e8e rawhide    385.0 KiB
 clucene-core                       x86_64 2.3.3.4-46.20130812.e8e rawhide      2.0 MiB
 firebird                           x86_64 4.0.2.2816-5.fc39       rawhide     32.6 MiB
 firebird-utils                     x86_64 4.0.2.2816-5.fc39       rawhide     17.4 MiB
 flute                              noarch 1.3.0-34.OOo31.fc39     rawhide     63.6 KiB
 google-carlito-fonts               noarch 1.103-0.22.20130920.fc3 rawhide      2.6 MiB
 google-crosextra-caladea-fonts     noarch 1:1.002-0.16.20130214.f rawhide    251.1 KiB
 gpgmepp                            x86_64 1.20.0-5.fc39           rawhide    416.1 KiB
 hyphen-en                          noarch 2.8.8-21.fc39           rawhide    103.9 KiB
 javapackages-tools                 noarch 6.1.0-10.fc39           rawhide     68.1 KiB
 libabw                             x86_64 0.1.3-13.fc39           rawhide    269.4 KiB
 libbase                            noarch 1.1.3-39.fc39           rawhide    153.1 KiB
 libcdr                             x86_64 0.1.7-14.fc39           rawhide    849.5 KiB
 libcmis                            x86_64 0.5.2-22.fc39           rawhide      1.1 MiB
 libe-book                          x86_64 0.1.3-32.fc39           rawhide    486.1 KiB
 libeot                             x86_64 0.01-29.fc39            rawhide     77.0 KiB
 libepubgen                         x86_64 0.1.1-16.fc39           rawhide    387.9 KiB
 libetonyek                         x86_64 0.1.10-10.fc39          rawhide      2.5 MiB
 libexttextcat                      x86_64 3.4.6-7.fc39            rawhide    457.8 KiB
 libfbclient2                       x86_64 4.0.2.2816-5.fc39       rawhide      3.3 MiB
 libfonts                           noarch 1.1.3-43.fc39           rawhide    222.0 KiB
 libformula                         noarch 1.1.3-40.fc39           rawhide    441.0 KiB
 libfreehand                        x86_64 0.1.2-21.fc39           rawhide    441.5 KiB
 libib-util                         x86_64 4.0.2.2816-5.fc39       rawhide     15.1 KiB
 liblangtag                         x86_64 0.6.4-5.fc39            rawhide    217.3 KiB
 liblangtag-data                    noarch 0.6.4-5.fc39            rawhide      2.1 MiB
 liblayout                          noarch 0.2.10-33.fc39          rawhide    840.1 KiB
 libloader                          noarch 1.1.3-41.fc39           rawhide    164.0 KiB
 libmspub                           x86_64 0.1.4-29.fc39           rawhide    408.4 KiB
 libmwaw                            x86_64 0.3.21-7.fc39           rawhide      6.7 MiB
 libnumbertext                      x86_64 1.0.11-4.fc39           rawhide    756.7 KiB
 libodfgen                          x86_64 0.1.8-9.fc39            rawhide    753.1 KiB
 liborcus                           x86_64 0.17.2-11.fc39          rawhide      1.6 MiB
 libpagemaker                       x86_64 0.0.4-21.fc39           rawhide    162.7 KiB
 libqxp                             x86_64 0.0.2-23.fc39           rawhide    324.3 KiB
 libreoffice-base                   x86_64 1:7.5.5.2-1.fc39        rawhide      5.7 MiB
 libreoffice-calc                   x86_64 1:7.5.5.2-1.fc39        rawhide     26.4 MiB
 libreoffice-core                   x86_64 1:7.5.5.2-1.fc39        rawhide    301.9 MiB
 libreoffice-data                   x86_64 1:7.5.5.2-1.fc39        rawhide      3.2 MiB
 libreoffice-draw                   x86_64 1:7.5.5.2-1.fc39        rawhide     14.0 KiB
 libreoffice-emailmerge             x86_64 1:7.5.5.2-1.fc39        rawhide     25.0 KiB
 libreoffice-graphicfilter          x86_64 1:7.5.5.2-1.fc39        rawhide      1.0 MiB
 libreoffice-impress                x86_64 1:7.5.5.2-1.fc39        rawhide      1.7 MiB
 libreoffice-langpack-en            x86_64 1:7.5.5.2-1.fc39        rawhide    171.5 KiB
 libreoffice-math                   x86_64 1:7.5.5.2-1.fc39        rawhide     11.2 KiB
 libreoffice-ogltrans               x86_64 1:7.5.5.2-1.fc39        rawhide    324.9 KiB
 libreoffice-opensymbol-fonts       noarch 1:7.5.5.2-1.fc39        rawhide    437.5 KiB
 libreoffice-pdfimport              x86_64 1:7.5.5.2-1.fc39        rawhide    586.2 KiB
 libreoffice-pyuno                  x86_64 1:7.5.5.2-1.fc39        rawhide      1.7 MiB
 libreoffice-ure                    x86_64 1:7.5.5.2-1.fc39        rawhide      6.7 MiB
 libreoffice-ure-common             x86_64 1:7.5.5.2-1.fc39        rawhide      2.4 MiB
 libreoffice-writer                 x86_64 1:7.5.5.2-1.fc39        rawhide     12.2 MiB
 libreoffice-x11                    x86_64 1:7.5.5.2-1.fc39        rawhide    609.3 KiB
 librepository                      noarch 1.1.3-40.fc39           rawhide     86.8 KiB
 librevenge                         x86_64 0.0.5-5.fc39            rawhide    752.6 KiB
 libserializer                      noarch 1.1.2-39.fc39           rawhide     50.0 KiB
 libstaroffice                      x86_64 0.0.7-11.fc39           rawhide      2.3 MiB
 libvisio                           x86_64 0.1.7-20.fc39           rawhide    676.4 KiB
 libwpd                             x86_64 0.10.3-17.fc39          rawhide    725.8 KiB
 libwpg                             x86_64 0.3.3-16.fc39           rawhide    165.1 KiB
 libwps                             x86_64 0.4.13-3.fc39           rawhide      2.1 MiB
 libzmf                             x86_64 0.0.2-31.fc39           rawhide    184.9 KiB
 lpsolve                            x86_64 5.5.2.11-3.fc39         rawhide    716.4 KiB
 mythes                             x86_64 1.2.5-4.fc39            rawhide     27.3 KiB
 mythes-en                          noarch 3.0-37.fc39             rawhide     20.7 MiB
 ongres-scram                       noarch 2.1-10.fc39             rawhide     74.0 KiB
 ongres-scram-client                noarch 2.1-10.fc39             rawhide     20.0 KiB
 ongres-stringprep                  noarch 1.1-8.fc39              rawhide     52.1 KiB
 pentaho-libxml                     noarch 1.1.3-39.fc39           rawhide    125.2 KiB
 pentaho-reporting-flow-engine      noarch 1:0.9.4-32.fc39         rawhide    431.8 KiB
 postgresql-jdbc                    noarch 42.6.0-3.fc39           rawhide    944.7 KiB
 raptor2                            x86_64 2.0.15-39.fc39          rawhide    575.4 KiB
 rasqal                             x86_64 0.9.33-25.fc39          rawhide    886.6 KiB
 redland                            x86_64 1.0.17-35.fc39          rawhide    514.1 KiB
 sac                                noarch 1.3-44.fc39             rawhide     18.5 KiB
 xmlsec1                            x86_64 1:1.2.37-5.fc39         rawhide    559.2 KiB
 xmlsec1-nss                        x86_64 1:1.2.37-5.fc39         rawhide    204.7 KiB
 zxing-cpp                          x86_64 2.0.0-5.fc39            rawhide      1.2 MiB
Installing weak dependencies:                                                          
 libreoffice-gtk4                   x86_64 1:7.5.5.2-1.fc39        rawhide      2.1 MiB
 libreoffice-help-en                x86_64 1:7.5.5.2-1.fc39        rawhide     27.3 MiB

Transaction Summary:
 Installing:       83 packages
 Upgrading:         3 packages
 Replacing:         3 packages

Total size of inbound packages is 176 MiB. Need to download 176 MiB.
After this operation 509 MiB will be used (install 511 MiB, remove 2 MiB).
Is this ok [y/N]: 

This happens to be with dnf5-5.0.15-4.fc39.x86_64

@rwmjones
Copy link
Author

rwmjones commented Aug 7, 2023

(which is wider than 80 columns and appears wrapped)

@kontura
Copy link
Contributor

kontura commented Aug 7, 2023

Right, as you can see in the output you provided there is really no way to make it smaller and keep the columns aligned.
There is always at least on entry in each column that is fully using it.
It is already cutting the Version column: noarch 1:1.002-0.16.20130214.f should be noarch 1:1.002-0.16.20130214.f39.

We could also look into cutting the packages names if too long but it might make the output even more confusing.

There is this other issue to make the output smaller/configurable #326 that I think is related to your request.

@rwmjones
Copy link
Author

rwmjones commented Aug 7, 2023

Old dnf does this:

# dnf install javapackages-filesystem google-crosextra-caladea-fonts pentaho-reporting-flow-engine --releasever=39 --best
Last metadata expiration check: 0:01:49 ago on Mon 07 Aug 2023 11:48:07 BST.
Package javapackages-filesystem-6.1.0-7.fc38.noarch is already installed.
Package google-crosextra-caladea-fonts-1:1.002-0.15.20130214.fc38.noarch is already installed.
Package pentaho-reporting-flow-engine-1:0.9.4-29.fc38.noarch is already installed.
Dependencies resolved.
================================================================================
 Package                        Arch   Version                     Repo    Size
================================================================================
Upgrading:
 google-crosextra-caladea-fonts noarch 1:1.002-0.16.20130214.fc39  fedora  98 k
 javapackages-filesystem        noarch 6.1.0-10.fc39               fedora  12 k
 javapackages-tools             noarch 6.1.0-10.fc39               fedora  37 k
 pentaho-reporting-flow-engine  noarch 1:0.9.4-32.fc39             fedora 285 k

Transaction Summary
================================================================================
Upgrade  4 Packages

Total download size: 432 k
Is this ok [y/N]: n
Operation aborted.

where the summary part is all nicely under 80 columns.

@kontura kontura added Priority: LOW Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Aug 7, 2023
@kontura
Copy link
Contributor

kontura commented Aug 8, 2023

Ok, so if I understand correctly the core of this issue is that dnf5 transaction output is wider because:

  • it uses Repository instead of Repo heading
  • it uses the replacing keyword during upgrades (this is still being discussed when/if it should be printed).

@rwmjones
Copy link
Author

rwmjones commented Aug 8, 2023

The issue is that the output is wider than 80 columns on an 80 column terminal, when it doesn't need to be.

@ppisar
Copy link
Contributor

ppisar commented Nov 28, 2024

@ppisar ppisar added the downstream Originally reported in Jira or Bugzilla label Nov 28, 2024
@ferdnyc
Copy link
Contributor

ferdnyc commented Jan 2, 2025

So, this is still happening, but:

  1. It's only happening in the transaction summary.
  2. It's only over by one column

In my 80-column terminal:

image

Then, later, during the actual transaction:

image

(And as you can see, there's plenty of room to narrow the output. The longest name string is replacing ibus-typing-booster which the Package column is sized to, and the widest Arch+Version is noarch 2024.12.0-1.fc41 from python3-fsspec... after which there are 8 columns of whitespace before the start of the Reposit column. (I have the whitespace selected in the following screenshot.)

image

(Edit: This is with Fedora 41's dnf5-5.2.8.1-2.fc41.x86_64.)

@ferdnyc
Copy link
Contributor

ferdnyc commented Jan 12, 2025

In looking at this more, a few things strike me:

  1. The width of the first column is often really blown out not so much by the <package_name> itself, but by the "␣␣replacing <old_name>" line that follows it, which is (obviously) significantly longer than "<package_name>".
  2. In theory, in narrower terminals, that line could be wrapped at the space, so that it contains, on two lines:

    ␣␣replacing
    ␣␣<old_name>

  3. For very, very many cases, there is only one such line, and <package_name> and <old_name> are one and the same.
  4. When there is only one such line, the <old_name> is arguably redundant. The output could instead be:
    <package_name>           <arch> <new_version>   <repo>  <size>
      replacing                     <old_version>
    
    (It seems largely irrelevant to display the size, repo, and arch of the old version as well — listed in decreasing order of relevance. Though I acknowledge that for <arch> and <size>, the column width is fixed so it's not like they take up extra space, and for <repo> it's highly unlikely the old-version repo will be the widest entry in the column.)

Just cutting down on the number of extra-long "␣␣replacing <old_name>" strings the first column has to accommodate could really help rein in the width.

@EverardB
Copy link

Would love to see the 'replacing' line removed when it is the same package name.

Upgrading:                                                                             
 gpgme                              x86_64 1.20.0-5.fc39           rawhide    577.5 KiB
  replacing gpgme                   x86_64 1.20.0-4.fc39           fedora     577.8 KiB

The last line does not hold any interesting information for most users and makes the the output twice as long

@ferdnyc
Copy link
Contributor

ferdnyc commented Jan 17, 2025

@EverardB There's discussion in PR #1574 about possible approaches to that.

Personally, I don't mind the extra length (vertical space is free, the terminal scrolls), I just want each line to fit on a single line. Everything wrapping ALSO makes the output twice-again as long. 😀 (Not to mention, a pain to read.)

@alimirjamali
Copy link
Contributor

alimirjamali commented Apr 5, 2025

I have a proposal to solve this issue. First of all, here is the draft diff:

draft diff for upgrade summary on small displays
diff --git a/libdnf5-cli/output/.search.cpp.swp b/libdnf5-cli/output/.search.cpp.swp
deleted file mode 100644
index a0ad3340..00000000
Binary files a/libdnf5-cli/output/.search.cpp.swp and /dev/null differ
diff --git a/libdnf5-cli/output/transaction_table.cpp b/libdnf5-cli/output/transaction_table.cpp
index 468add94..06ef2ab2 100644
--- a/libdnf5-cli/output/transaction_table.cpp
+++ b/libdnf5-cli/output/transaction_table.cpp
@@ -274,25 +274,25 @@ TransactionTable::Impl::Impl(ITransaction & transaction) {
     scols_table_enable_noheadings(*tb, 1);
     struct libscols_line * header_ln = scols_table_new_line(*tb, NULL);
 
-    auto column = scols_table_new_column(*tb, _("Package"), 0.3, 0);
+    auto column = scols_table_new_column(*tb, _("Package"), 0.3, SCOLS_FL_TRUNC);
     auto header = scols_column_get_header(column);
     auto cell = scols_line_get_cell(header_ln, COL_NAME);
     scols_cell_set_data(cell, scols_cell_get_data(header));
     scols_cell_set_color(cell, "bold");
 
-    column = scols_table_new_column(*tb, _("Arch"), 6, 0);
+    column = scols_table_new_column(*tb, _("Arch"), 0.05, 0);
     header = scols_column_get_header(column);
     cell = scols_line_get_cell(header_ln, COL_ARCH);
     scols_cell_set_data(cell, scols_cell_get_data(header));
     scols_cell_set_color(cell, "bold");
 
-    column = scols_table_new_column(*tb, _("Version"), 0.3, SCOLS_FL_TRUNC);
+    column = scols_table_new_column(*tb, _("Version"), 0.05, 0);
     header = scols_column_get_header(column);
     cell = scols_line_get_cell(header_ln, COL_EVR);
     scols_cell_set_data(cell, scols_cell_get_data(header));
     scols_cell_set_color(cell, "bold");
 
-    column = scols_table_new_column(*tb, _("Repository"), 0.1, SCOLS_FL_TRUNC);
+    column = scols_table_new_column(*tb, _("Repository"), 0.05, 0);
     header = scols_column_get_header(column);
     cell = scols_line_get_cell(header_ln, COL_REPO);
     scols_cell_set_data(cell, scols_cell_get_data(header));

And here are my rationale for the suggested changes:

  1. On small screens, we have to sacrifice some data and truncate a column. I suggest this to be the Package column. If this proposal is approved, I will write a custom wrap/trunc function. To truncate very-long-package-name-here to something like very-long-package-h> or very-long-package... see next post.
  2. For the Arch column, the current fixed 6 characters width contradicts with Fedora policy to support Aarch64 and ppc64le architectures. To my understanding, the Arch column will be truncated badly for those architectures with current whint and flag values regardless of the terminal emulator size.
  3. For the Version column, the current value for its whint is equal to the Package column (i.e.30%). This results with lots of white space after Version column data. While it has SCOLS_FL_TRUNC flag, it is truncated too late because of its large whint value.
  4. For the Repository column, as it is pointed out in repository column overly truncated in transaction summary #1785, it is truncated to Reposit in that case while there was lot's of unused space after Version column. And it was impossible to distinguish updates from updates-testing.

I did not submit the PR yet since this is relatively a complex issue and needs some brainstorming on what would be the most appropriate solution.

Here are the snapshots before and after my draft patch:

Image

Image

@alimirjamali
Copy link
Contributor

alimirjamali commented Apr 5, 2025

I did some consultation on Fedora Devel matrix group and they suggested mimicking the dnf4 behavior of printing very long package names on their own line. The PR output turns to be like this:

Image

cc. @decathorpe

alimirjamali added a commit to alimirjamali/dnf5 that referenced this issue Apr 5, 2025
@alimirjamali alimirjamali linked a pull request Apr 5, 2025 that will close this issue
alimirjamali added a commit to alimirjamali/dnf5 that referenced this issue Apr 11, 2025
On small displays (e.g. 80 chars width term), The 1st column (i.e.
`Package` Name) is printed on its dedicated line if necessary. This is
similar to dnf4 behavior. A `libsmartcols` iterator is used to print
output line-by-line and decide if the package name should be printed on
its dedicated line.

The `Arch` column width should not be fixed. The previous setting of `6`
characters resulted on truncation of `Aarch64` & `ppc64le` at all conditions.

`Repository` column is allowed to be wider as the previous `whint`
value resulted on truncation of `updates-testing` on small displays,
making it indistinguishable from `updates`. (reported in issue 785).

resolves: rpm-software-management#785
resolves: rpm-software-management#1785

Examples of output behavior are available at CI/CD changes here:
alimirjamali added a commit to alimirjamali/dnf5 that referenced this issue Apr 11, 2025
On small displays (e.g. 80 chars width term), The 1st column (i.e.
`Package` Name) is printed on its dedicated line if necessary. This is
similar to dnf4 behavior. A `libsmartcols` iterator is used to print
output line-by-line and decide if the package name should be printed on
its dedicated line.

The `Arch` column width should not be fixed. The previous setting of `6`
characters resulted on truncation of `Aarch64` & `ppc64le` at all conditions.

`Repository` column is allowed to be wider as the previous `whint`
value resulted on truncation of `updates-testing` on small displays,
making it indistinguishable from `updates` (reported in issue 1785).

resolves: rpm-software-management#785
resolves: rpm-software-management#1785

Examples of output behavior are available at CI/CD changes here:
alimirjamali added a commit to alimirjamali/dnf5 that referenced this issue Apr 11, 2025
On small displays (e.g. 80 chars width term), The 1st column (i.e.
`Package` Name) is printed on its dedicated line if necessary. This is
similar to dnf4 behavior. A `libsmartcols` iterator is used to print
output line-by-line and decide if the package name should be printed on
its dedicated line.

The `Arch` column width should not be fixed. The previous setting of `6`
characters resulted on truncation of `Aarch64` & `ppc64le` at all conditions.

`Repository` column is allowed to be wider as the previous `whint`
value resulted on truncation of `updates-testing` on small displays,
making it indistinguishable from `updates` (reported in issue 1785).

resolves: rpm-software-management#785
resolves: rpm-software-management#1785

From CI/CD point of view (piped output), nothing changes. No need to
update the existing unittests. Below are the example output on 80
character width terminal:

Output of `install python3-mkdocs-git*plugin --assumeno` before patch:
```
Updating and loading repositories:
Repositories loaded.
Package                                            Arch   Version
  Reposit      Size
Installing:
 python3-mkdocs-git-authors-plugin                 noarch 0.9.2-1.fc42
  fedora  131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin noarch 1.3.0-1.fc42
  fedora  109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                             noarch 1:6.7.2-2.fc42
  fedora   22.2 MiB
 mkdocs                                            noarch 1.6.1-3.fc4
  fedora    6.5 MiB
...
```

Output of `install python3-mkdocs-git*plugin --assumeno` after patch:
```
Updating and loading repositories:
Repositories loaded.
Package                               Arch   Version        Repository      Size
Installing:
 python3-mkdocs-git-authors-plugin    noarch 0.9.2-1.fc42   fedora     131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin
                                      noarch 1.3.0-1.fc42   fedora     109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                noarch 1:6.7.2-2.fc42 fedora      22.2 MiB
 mkdocs                               noarch 1.6.1-3.fc42   fedora       6.5 MiB
...
```
alimirjamali added a commit to alimirjamali/dnf5 that referenced this issue Apr 11, 2025
On small displays (e.g. 80 chars width term), The 1st column (i.e.
`Package` Name) is printed on its dedicated line if necessary. This is
similar to dnf4 behavior. A `libsmartcols` iterator is used to print
output line-by-line and decide if the package name should be printed on
its dedicated line.

The `Arch` column width should not be fixed. The previous setting of `6`
characters resulted on truncation of `Aarch64` & `ppc64le` at all conditions.

`Repository` column is allowed to be wider as the previous `whint`
value resulted on truncation of `updates-testing` on small displays,
making it indistinguishable from `updates` (reported in issue 1785).

resolves: rpm-software-management#785
resolves: rpm-software-management#1785

From CI/CD point of view (piped output), nothing changes. No need to
update the existing unittests. Below are the example output on 80
character width terminal:

Output of `install python3-mkdocs-git*plugin --assumeno` before patch:
```
Updating and loading repositories:
Repositories loaded.
Package                                            Arch   Version
  Reposit      Size
Installing:
 python3-mkdocs-git-authors-plugin                 noarch 0.9.2-1.fc42
  fedora  131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin noarch 1.3.0-1.fc42
  fedora  109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                             noarch 1:6.7.2-2.fc42
  fedora   22.2 MiB
 mkdocs                                            noarch 1.6.1-3.fc4
  fedora    6.5 MiB
...
```

Output of `install python3-mkdocs-git*plugin --assumeno` after patch:
```
Updating and loading repositories:
Repositories loaded.
Package                               Arch   Version        Repository      Size
Installing:
 python3-mkdocs-git-authors-plugin    noarch 0.9.2-1.fc42   fedora     131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin
                                      noarch 1.3.0-1.fc42   fedora     109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                noarch 1:6.7.2-2.fc42 fedora      22.2 MiB
 mkdocs                               noarch 1.6.1-3.fc42   fedora       6.5 MiB
...
```
alimirjamali added a commit to alimirjamali/dnf5 that referenced this issue Apr 11, 2025
On small displays (e.g. 80 chars width term), The 1st column (i.e.
`Package` Name) is printed on its dedicated line if necessary. This is
similar to dnf4 behavior. A `libsmartcols` iterator is used to print
output line-by-line and decide if the package name should be printed on
its dedicated line.

The `Arch` column width should not be fixed. The previous setting of `6`
characters resulted on truncation of `Aarch64` & `ppc64le` at all conditions.

`Repository` column is allowed to be wider as the previous `whint`
value resulted on truncation of `updates-testing` on small displays,
making it indistinguishable from `updates` (reported in issue 1785).

resolves: rpm-software-management#785
resolves: rpm-software-management#1785

From CI/CD point of view (piped output), nothing changes. No need to
update the existing unittests. Below are the example output on 80
character width terminal:

Output of `install python3-mkdocs-git*plugin --assumeno` before patch:
```
Updating and loading repositories:
Repositories loaded.
Package                                            Arch   Version
  Reposit      Size
Installing:
 python3-mkdocs-git-authors-plugin                 noarch 0.9.2-1.fc42
  fedora  131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin noarch 1.3.0-1.fc42
  fedora  109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                             noarch 1:6.7.2-2.fc42
  fedora   22.2 MiB
 mkdocs                                            noarch 1.6.1-3.fc4
  fedora    6.5 MiB
...
```

Output of `install python3-mkdocs-git*plugin --assumeno` after patch:
```
Updating and loading repositories:
Repositories loaded.
Package                               Arch   Version        Repository      Size
Installing:
 python3-mkdocs-git-authors-plugin    noarch 0.9.2-1.fc42   fedora     131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin
                                      noarch 1.3.0-1.fc42   fedora     109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                noarch 1:6.7.2-2.fc42 fedora      22.2 MiB
 mkdocs                               noarch 1.6.1-3.fc42   fedora       6.5 MiB
...
```
alimirjamali added a commit to alimirjamali/dnf5 that referenced this issue Apr 11, 2025
On small displays (e.g. 80 chars width term), The 1st column (i.e.
`Package` Name) is printed on its dedicated line if necessary. This is
similar to dnf4 behavior. A `libsmartcols` iterator is used to print
output line-by-line and decide if the package name should be printed on
its dedicated line.

The `Arch` column width should not be fixed. The previous setting of `6`
characters resulted on truncation of `Aarch64` & `ppc64le` at all conditions.

`Repository` column is allowed to be wider as the previous `whint`
value resulted on truncation of `updates-testing` on small displays,
making it indistinguishable from `updates` (reported in issue 1785).

resolves: rpm-software-management#785
resolves: rpm-software-management#1785

From CI/CD point of view (piped output), nothing changes. No need to
update the existing unittests. Below are the example output on 80
character width terminal:

Output of `install python3-mkdocs-git*plugin --assumeno` before patch:
```
Updating and loading repositories:
Repositories loaded.
Package                                            Arch   Version
  Reposit      Size
Installing:
 python3-mkdocs-git-authors-plugin                 noarch 0.9.2-1.fc42
  fedora  131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin noarch 1.3.0-1.fc42
  fedora  109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                             noarch 1:6.7.2-2.fc42
  fedora   22.2 MiB
 mkdocs                                            noarch 1.6.1-3.fc4
  fedora    6.5 MiB
...
```

Output of `install python3-mkdocs-git*plugin --assumeno` after patch:
```
Updating and loading repositories:
Repositories loaded.
Package                               Arch   Version        Repository      Size
Installing:
 python3-mkdocs-git-authors-plugin    noarch 0.9.2-1.fc42   fedora     131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin
                                      noarch 1.3.0-1.fc42   fedora     109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                noarch 1:6.7.2-2.fc42 fedora      22.2 MiB
 mkdocs                               noarch 1.6.1-3.fc42   fedora       6.5 MiB
...
```
alimirjamali added a commit to alimirjamali/dnf5 that referenced this issue Apr 11, 2025
On small displays (e.g. 80 chars width term), The 1st column (i.e.
`Package` Name) is printed on its dedicated line if necessary. This is
similar to dnf4 behavior. A `libsmartcols` iterator is used to print
output line-by-line and decide if the package name should be printed on
its dedicated line.

The `Arch` column width should not be fixed. The previous setting of `6`
characters resulted on truncation of `Aarch64` & `ppc64le` at all conditions.

`Repository` column is allowed to be wider as the previous `whint`
value resulted on truncation of `updates-testing` on small displays,
making it indistinguishable from `updates` (reported in issue 1785).

resolves: rpm-software-management#785
resolves: rpm-software-management#1785

From CI/CD point of view (piped output), nothing changes. No need to
update the existing unittests. Below are the example output on 80
character width terminal:

Output of `install python3-mkdocs-git*plugin --assumeno` before patch:
```
Updating and loading repositories:
Repositories loaded.
Package                                            Arch   Version
  Reposit      Size
Installing:
 python3-mkdocs-git-authors-plugin                 noarch 0.9.2-1.fc42
  fedora  131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin noarch 1.3.0-1.fc42
  fedora  109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                             noarch 1:6.7.2-2.fc42
  fedora   22.2 MiB
 mkdocs                                            noarch 1.6.1-3.fc4
  fedora    6.5 MiB
...
```

Output of `install python3-mkdocs-git*plugin --assumeno` after patch:
```
Updating and loading repositories:
Repositories loaded.
Package                               Arch   Version        Repository      Size
Installing:
 python3-mkdocs-git-authors-plugin    noarch 0.9.2-1.fc42   fedora     131.3 KiB
 python3-mkdocs-git-revision-date-localized-plugin
                                      noarch 1.3.0-1.fc42   fedora     109.3 KiB
Installing dependencies:
 fontawesome-fonts-web                noarch 1:6.7.2-2.fc42 fedora      22.2 MiB
 mkdocs                               noarch 1.6.1-3.fc42   fedora       6.5 MiB
...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
downstream Originally reported in Jira or Bugzilla Priority: LOW Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

6 participants