Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1846692 - dnf should offer a 'history list' in reverse order
Summary: dnf should offer a 'history list' in reverse order
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 32
Hardware: Unspecified
OS: Linux
low
unspecified
Target Milestone: ---
Assignee: nsella
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-12 17:39 UTC by slartibart70
Modified: 2020-10-27 01:20 UTC (History)
11 users (show)

Fixed In Version: dnf-4.4.0-1.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-18 15:49:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description slartibart70 2020-06-12 17:39:24 UTC
Hi,
previously (in fc31) you could simply do

dnf history list | tac

to get the history in a suitable (for me) output. Now, in fc32, you can still do that, but the output looks kind of messy and is absolutely unusable.
The same happens if you pipe the history output into less.

The tabular output of 'history list' is nice to see in reverse directly supported by dnf, then we wouldn't need to mangle it with 'tac'

(or, if that solution is better, fix the output of 'history list' so we can process if further with tools like less, tac, ...)

Comment 2 nsella 2020-06-25 14:49:13 UTC
Now it is possible to call dnf history list --reverse to get the output in reverse order.
The reason why piping to tac printed the output bad formatted is that the behaviour was changed in [1] and [2] to obtain a nice trimmed rows output for terminal and not trimmed rows to file or pagers like less.

[1] https://github.com/rpm-software-management/dnf/commit/fc31c508fb24730ae4f44f9cf9da9f8ffb9359f9
[2] https://github.com/rpm-software-management/dnf/commit/86d741f442f4da2125e6a6ea2f85cd022e29ce5a

Comment 3 thedatum+bz 2020-08-31 18:50:23 UTC
The --reverse option is a good change, but as of dnf v4.2.23 it does not work even though it is mentioned in the documentation. 
Perhaps the changes have not been released yet?

https://dnf.readthedocs.io/en/latest/command_ref.html#history-command-label

dnf history [list] [--reverse] [<spec>...]
--reverse
    The order of history list output is printed in reverse order. 


$ dnf history list --reverse
usage: dnf history [-c [config file]] [-q] [-v] [--version]
                   [--installroot [path]] [--nodocs] [--noplugins]
                   [--enableplugin [plugin]] [--disableplugin [plugin]]
                   [--releasever RELEASEVER] [--setopt SETOPTS]
                   [--skip-broken] [-h] [--allowerasing] [-b | --nobest] [-C]
                   [-R [minutes]] [-d [debug level]] [--debugsolver]
                   [--showduplicates] [-e ERRORLEVEL] [--obsoletes]
                   [--rpmverbosity [debug level name]] [-y] [--assumeno]
                   [--enablerepo [repo]] [--disablerepo [repo] | --repo
                   [repo]] [--enable | --disable] [-x [package]]
                   [--disableexcludes [repo]] [--repofrompath [repo,path]]
                   [--noautoremove] [--nogpgcheck] [--color COLOR] [--refresh]
                   [-4] [-6] [--destdir DESTDIR] [--downloadonly]
                   [--comment COMMENT] [--bugfix] [--enhancement]
                   [--newpackage] [--security] [--advisory ADVISORY]
                   [--bz BUGZILLA] [--cve CVES]
                   [--sec-severity {Critical,Important,Moderate,Low}]
                   [--forcearch ARCH]
                   [COMMAND] [TRANSACTION [TRANSACTION ...]]
dnf history: error: unrecognized arguments: --reverse

Comment 4 Fedora Update System 2020-10-08 11:59:35 UTC
FEDORA-2020-b40fc174b5 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

Comment 5 Fedora Update System 2020-10-08 12:00:32 UTC
FEDORA-2020-5d9f0ce2b3 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5d9f0ce2b3

Comment 6 Fedora Update System 2020-10-08 22:19:47 UTC
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b40fc174b5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-10-12 21:16:00 UTC
FEDORA-2020-b40fc174b5 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

Comment 8 Fedora Update System 2020-10-12 21:23:35 UTC
FEDORA-2020-5d9f0ce2b3 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5d9f0ce2b3

Comment 9 Fedora Update System 2020-10-12 22:45:18 UTC
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b40fc174b5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-10-13 20:18:15 UTC
FEDORA-2020-5d9f0ce2b3 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5d9f0ce2b3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5d9f0ce2b3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2020-10-18 15:49:20 UTC
FEDORA-2020-5d9f0ce2b3 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2020-10-19 16:53:36 UTC
FEDORA-2020-b40fc174b5 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

Comment 13 Fedora Update System 2020-10-20 14:22:52 UTC
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b40fc174b5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2020-10-27 01:20:51 UTC
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.