Bug 1397790 - [RFE] Shorten/Invert history list
Summary: [RFE] Shorten/Invert history list
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-23 11:09 UTC by Vít Ondruch
Modified: 2016-11-28 13:16 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-28 13:16:43 UTC
Type: Bug


Attachments (Terms of Use)

Description Vít Ondruch 2016-11-23 11:09:49 UTC
Description of problem:
DNF history on my computer has already 552 records. If I want to list the history, the most recent changes, which I am most interested scrolls out of the screen, so I have to use something like "dnf history list | head". It would be more convenient, if the list is inverted, i.e. the oldest entries are on top and the most recent are on the bottom.

Also, it would be nice if the default list is shortened. E.g. one screen (30 lines?) of transactions should be enough. Or if it is paged? Probably similarly to journalctl?

Version-Release number of selected component (if applicable):
$ rpm -q dnf
dnf-2.0.0-0.rc1.4.fc26.noarch


How reproducible:


Steps to Reproduce:
1. dnf history list
2.
3.

Actual results:
The most recent entries are listed on the top and goes probably out of the screen.

Expected results:
The most recent entries are at the bottom of the list so I can review the latest changes immediately. The list might be shortened by default ...


Additional info:
BTW the output of the 552 entries is starting to feel slow ...

Comment 1 Michael Mráka 2016-11-24 09:10:32 UTC
Once https://github.com/rpm-software-management/dnf/pull/659 is merged you can use

  dnf history list last-10..last

Comment 2 Vít Ondruch 2016-11-24 11:29:14 UTC
Thx for the tip, but while I appreciate that I'll be able to use the ranges, this is about usability and sensible default behavior.

Comment 3 Jaroslav Mracek 2016-11-28 12:19:20 UTC
We think there are several way how to format output of dnf using limits like in comment 1, or externally like with ``more``. At the present time, we have different priority, therefore I am closing it as wontfix. Anyway thank you very much for your report.

Comment 4 Vít Ondruch 2016-11-28 12:35:34 UTC
(In reply to Jaroslav Mracek from comment #3)
While you focus on shortening the output, the main request was inverting the order, i.e. the most recent history entries should be listed as last so they stay on the screen. Thank you for reconsidering.

Comment 5 Michael Mráka 2016-11-28 13:16:43 UTC
Hi Vit,

current output order (newest first) won't likely change in a foreseeable future because it would break compatibility with yum.

For shortening output use either
  dnf history list | head
or
  dnf history list last-20..last


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