rpm-software-management / dnf

Package manager based on libdnf and libsolv. Replaces YUM.
GNU General Public License v2.0
1.23k stars 409 forks source link

Table Formatting #2069

Closed RokeJulianLockhart closed 4 months ago

RokeJulianLockhart commented 6 months ago

Per https://discussion.fedoraproject.org/t/how-to-get-table-output-in-dnf-search/109718:

I've just installed https://download.fedoraproject.org/pub/fedora/linux/releases/test/40_Beta/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-40_Beta-1.10.iso after using openSUSE Tumbleweed for some years. Having used `zypper` for so long, I am surprised at how unreadable `dnf`'s output appears to be by default: ```sh dnf search nextcloud ```
```log Last metadata expiration check: 0:03:44 ago on Tue 26 Mar 2024 19:20:59 GMT. ============================================================================================================================================= Name Exactly Matched: nextcloud ============================================================================================================================================== nextcloud.noarch : Private file sync and share server ============================================================================================================================================ Name & Summary Matched: nextcloud ============================================================================================================================================= nextcloud-client.x86_64 : The Nextcloud Client nextcloud-client-debuginfo.x86_64 : Debug information for package nextcloud-client nextcloud-client-debugsource.x86_64 : Debug sources for package nextcloud-client nextcloud-client-devel.x86_64 : Development files for nextcloud-client nextcloud-client-devel-debuginfo.x86_64 : Debug information for package nextcloud-client-devel nextcloud-client-dolphin-debuginfo.x86_64 : Debug information for package nextcloud-client-dolphin nextcloud-client-libs.x86_64 : Common files for nextcloud-client nextcloud-client-libs-debuginfo.x86_64 : Debug information for package nextcloud-client-libs nextcloud-client-nautilus.x86_64 : nextcloud client nautilus extension nextcloud-httpd.noarch : Httpd integration for NextCloud nextcloud-mysql.noarch : MySQL database support for NextCloud nextcloud-nginx.noarch : Nginx integration for NextCloud nextcloud-postgresql.noarch : PostgreSQL database support for NextCloud nextcloud-sqlite.noarch : SQLite 3 database support for NextCloud ================================================================================================================================================= Name Matched: nextcloud ================================================================================================================================================== nextcloud-client-caja.x86_64 : Caja overlay icons nextcloud-client-dolphin.x86_64 : Dolphin overlay icons nextcloud-client-nemo.x86_64 : Nemo overlay icons ================================================================================================================================================ Summary Matched: nextcloud ================================================================================================================================================ merkuro.x86_64 : A calendar application using Akonadi to sync with external services (Nextcloud, GMail, ...) qownnotes.x86_64 : Plain-text file markdown note taking with Nextcloud integration ```
The ` : ` delimination seems markedly inferior to https://download.opensuse.org/repositories/openSUSE:/Factory/standard/x86_64/zypper-1.14.70-1.1.x86_64.rpm's table output: ```PS1 zypper search zypper ```
```log Loading repository data... Reading installed packages... S | Name | Summary | Type ---+------------------------------+---------------------------------------------+-------- | microos_base_zypper | openSUSE MicroOS using Zypper | pattern | monitoring-plugins-zypper | Check for software updates via zypper | package | patterns-microos-base-zypper | openSUSE MicroOS using Zypper | package i+ | zypper | Command line software manager using libzypp | package | zypper-aptitude | aptitude compatibility with zypper | package | zypper-changelog-plugin | Changelog listing tool | package | zypper-keys-plugin | Zypper plugin to manage RPM keys | package | zypper-lifecycle-plugin | Zypper subcommand for lifecycle information | package i+ | zypper-log | CLI for accessing the zypper logfile | package i+ | zypper-needs-restarting | needs-restarting compatibility with zypper | package ```

I consequently request that a table-based (rather than list-based) output be considered, at least behind a flag, if not the default. It's currently unusable for me due to the strain it places upon my eyes when reading long query outputs.

jan-kolarik commented 4 months ago

Hello and thank you for the report. We do not have any plans to make further breaking changes in the dnf component. The dnf5 package is the successor as the provider of the dnf command, and it's already deployed in Fedora Rawhide. There's an ongoing discussion about the transaction table output happening here: https://github.com/rpm-software-management/dnf5/issues/326. Feel free to join and share your thoughts and ideas there. Thanks!