Bug 1794856
| Summary: | DNF sometimes produces hard to parse/hard to read output when not running in an interactive terminal | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Frank Hirtz <fhirtz> | ||||
| Component: | dnf | Assignee: | Jaroslav Mracek <jmracek> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Jan Blazek <jblazek> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 8.4 | CC: | amatej, james.antill, nsella, swm-qe | ||||
| Target Milestone: | rc | Keywords: | Triaged | ||||
| Target Release: | 8.0 | Flags: | jblazek:
needinfo-
pm-rhel: mirror+ |
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | dnf-4.2.17-3.el8 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-04-28 16:49:13 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
The issue is fixed by https://github.com/rpm-software-management/dnf/pull/1548/commits/f91207191587234585ff50f563b5e3666373291b. The commit was required for tests https://github.com/rpm-software-management/ci-dnf-stack/pull/728 for bug https://bugzilla.redhat.com/show_bug.cgi?id=1781769. I have created a dedicated test for this bug: https://github.com/rpm-software-management/ci-dnf-stack/pull/792 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:1823 |
Created attachment 1655154 [details] Reverts the colum handling for 'arch' to default Description of problem: dnf, when not running inside a real terminal, assumes output should be 80 characters long. This causes problems when the package names/versions are long, resulting in not having any whitespace left between the architecture and the package version: Last metadata expiration check: 0:00:05 ago on Tue Nov 5 20:49:31 2019. Dependencies resolved. ================================================================================ Package ArchVersion Repository Size ================================================================================ Installing: ccm noarch18.12.0-rc9_SNAPSHOT20191105091101 bootstrap 133 k ms-systemd_persistent_eth noarch2-1ms5.el8 bootstrap 12 k ncm-cdispd noarch18.12.0-rc9_SNAPSHOT20191030222418 bootstrap 31 k ncm-ncd noarch18.12.0-rc7_SNAPSHOT20191030222534 bootstrap 52 k ncm-spma noarch18.6.1-SNAPSHOT20191030140314 bootstrap 47 k afsclient x86_641234567890:1.8.5-c1.msdw.rh8.el8 afs 14 k kmod-openafs-4.18.0-80.11.2 x86_641.8.5-c1.msdw.rh8.el8 afs 390 k man-pages-overrides noarch8.0.0-1.el8 appstream 7.9 k hunspell-en noarch0.20140811.1-12.el8 appstream 200 k ipmitool x86_641.8.18-10.el8 appstream 393 k nmap-ncat x86_642:7.70-4.el8 appstream 236 k tuned-utils noarch2.10.0-15.el8 appstream 40 k ... Such an output is hard to read for humans, but even harder to parse from scripts. I'd expect dnf to ensure at least one space between the columns. Version-Release number of selected component (if applicable): dnf-4.2.7-7.el8_1.noarch How reproducible: Do an install and pipe the output through something. If there are packages with long names/versions the arch loses its seperation and is just part of the string Steps to Reproduce: [root@lab-rhel8-1 fmhirtz]# yum remove --assumeno bind-utils | grep -v fhoihf | head -15 Updating Subscription Management repositories. Dependencies resolved. ================================================================================ Package ArchVersion Repository Size ================================================================================ Removing: bind-utils x86_6432:9.11.4-26.P2.el8 @rhel-8-for-x86_64-appstream-rpms 1.4 M Removing dependent packages: ipa-client x86_644.8.0-10.module+el8.1.0+4107+4a66eb87 @rhel-8-for-x86_64-appstream-rpms 345 k Removing unused dependencies: augeas-libs x86_641.12.0-2.el8 @rhel-8-for-x86_64-baseos-rpms 1.5 M autofs x86_641:5.1.4-35.el8 @rhel-8-for-x86_64-baseos-rpms 4.0 M bind-libs x86_6432:9.11.4-26.P2.el8 @rhel-8-for-x86_64-appstream-rpms 267 k bind-libs-lite x86_6432:9.11.4-26.P2.el8 @rhel-8-for-x86_64-appstream-rpms 3.6 M bind-license noarch32:9.11.4-26.P2.el8 @rhel-8-for-x86_64-appstream-rpms 29 k Operation aborted. </control> Expected results: <test> [root@lab-rhel8-1 ~]# rpm -q dnf dnf-4.2.7-7test2.el8_1.noarch [root@lab-rhel8-1 ~]# yum remove --assumeno bind-utils | grep -v fhoihf | head -15 Updating Subscription Management repositories. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Removing: bind-utils x86_64 32:9.11.4-26.P2.el8 @rhel-8-for-x86_64-appstream-rpms 1.4 M Removing dependent packages: ipa-client x86_64 4.8.0-10.module+el8.1.0+4107+4a66eb87 @rhel-8-for-x86_64-appstream-rpms 345 k Removing unused dependencies: augeas-libs x86_64 1.12.0-2.el8 @rhel-8-for-x86_64-baseos-rpms 1.5 M autofs x86_64 1:5.1.4-35.el8 @rhel-8-for-x86_64-baseos-rpms 4.0 M bind-libs x86_64 32:9.11.4-26.P2.el8 @rhel-8-for-x86_64-appstream-rpms 267 k bind-libs-lite x86_64 32:9.11.4-26.P2.el8 @rhel-8-for-x86_64-appstream-rpms 3.6 M bind-license noarch 32:9.11.4-26.P2.el8 @rhel-8-for-x86_64-appstream-rpms 29 k Operation aborted. Additional info: I worked up a quick patch which removes the special handling for the arch here and thus it's padded as all other fields are, but that might not be the best approach. I'll attach it as an option.