Bug 1773436 - dnf update no longer sorts the list of rpms being updated. [NEEDINFO]
Summary: dnf update no longer sorts the list of rpms being updated.
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.1
Hardware: All
OS: Linux
Target Milestone: rc
: 8.0
Assignee: Jaroslav Rohel
QA Contact: Radek Bíba
Depends On:
TreeView+ depends on / blocked
Reported: 2019-11-18 07:29 UTC by John
Modified: 2020-07-07 21:17 UTC (History)
8 users (show)

Fixed In Version: dnf-4.2.17-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-28 16:49:06 UTC
Type: Bug
Target Upstream Version:
redhat-bugzilla: needinfo? (jrohel)

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5211001 None None None 2020-07-07 21:17:44 UTC
Red Hat Product Errata RHBA-2020:1823 None None None 2020-04-28 16:49:17 UTC

Description John 2019-11-18 07:29:27 UTC
Description of problem:

Dnf update used to generate a sorted list of available updates, which was shown before asking for confirmation. This made it easy to scan down the list, and see what was included and what was not, eg I could scan down to packages beginning with "k", to see if new kernels were going in, or "o" to see if new openjdk packages were going in - and then I very quickly knew there whether there were some, or none.

Now, if there are anything more than a few updates - with dnf obscenely vomiting out an unsorted list, it's impossible know what is being installed without piping through grep.

The output of "dnf update" *MUST* be a sorted list.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Go to a system which is missing a number of updates.
2. Run "dnf update"
3. Stare in horror at the unsorted list of updates.

Actual results:
Unsorted list of updates, useless.

Expected results:
Sorted list, very easy to scan thrpugh to see if particular packages are being updated.

Additional info:

Comment 1 Jaroslav Rohel 2019-12-03 08:00:45 UTC
Please, can you send example of non-sorted output?
In my tests packages are grouped according to action (Installing, Upgrading, Removing, ...). Packages in each group are grouped according to the repository. The result groups are sorted.

Comment 2 John 2019-12-10 13:37:19 UTC
Do i exist in some sort of bizarro world where i see bugs that don't exist?

Please. Take a look at this, and tell me if this is a sorted list:

[root@rhel8-c1n1 ~]# yum update
Updating Subscription Management repositories.
Last metadata expiration check: 1:57:12 ago on Tue 10 Dec 2019 22:36:25 AEDT.
Dependencies resolved.
 Package              Arch   Version               Repository                        Size
 kernel-core          x86_64 4.18.0-147.0.3.el8_1  rhel-8-for-x86_64-baseos-rpms     25 M
 kernel               x86_64 4.18.0-147.0.3.el8_1  rhel-8-for-x86_64-baseos-rpms    1.5 M
 kernel-modules       x86_64 4.18.0-147.0.3.el8_1  rhel-8-for-x86_64-baseos-rpms     22 M
 netcf-libs           x86_64 0.2.8-12.module+el8.1.0+4066+0f1aadab
                                                   rhel-8-for-x86_64-appstream-rpms  77 k
 libXt                x86_64 1.1.5-12.el8          rhel-8-for-x86_64-appstream-rpms 185 k
 udisks2-iscsi        x86_64 2.8.3-2.el8           rhel-8-for-x86_64-appstream-rpms  46 k
                      x86_64 4.5.0-35.module+el8.1.0+4227+b2722cb3
                                                   rhel-8-for-x86_64-appstream-rpms  83 k
 qemu-img             x86_64 15:2.12.0-88.module+el8.1.0+4233+bc44be3f
                                                   rhel-8-for-x86_64-appstream-rpms 1.7 M
                      x86_64 4.5.0-35.module+el8.1.0+4227+b2722cb3
                                                   rhel-8-for-x86_64-appstream-rpms  77 k
                      x86_64 4.5.0-35.module+el8.1.0+4227+b2722cb3
and so on.

look at that.

netcdf - begins wit an "n"
then libXt, begins with an "l". 
then udisks, with a "u"
Oh! now libvirt, another "l".

That's not alphabetically sorted, is it...

Comment 3 John 2019-12-10 13:39:26 UTC
just realised i ran yum update there, but the result is the same with dnf update.

Comment 4 John 2019-12-10 13:42:40 UTC
And note:

for the sequence:


They are all from repo, rhel-8-for-x86_64-appstream-rpms.

So the rpms are not even sorted within the group from each repo.

Comment 5 Jaroslav Rohel 2019-12-16 06:43:46 UTC
Thanks for reply. Your output seems unsorted. I will fix it.
We also discussed the problem in team and agreed on a change. I will remove grouping according to repository. The packages will be sorted according to nevra.

Comment 7 John 2019-12-16 13:02:12 UTC
Thanks Jaroslav,
yeah i think it's also best to remove the grouping by repository too.
Thank you very much, & cheers.

Comment 9 Jaroslav Rohel 2019-12-20 11:26:09 UTC
I made PR: https://github.com/rpm-software-management/dnf/pull/1551

1. The packages in the transaction table are sorted according to nevra (and grouping according repository was removed).
2. In addition, the final list of actually updated/installed/... packages (when the transaction is complete) is sorted too.

Comment 12 John 2019-12-23 23:52:33 UTC
Awsm, ty Jaroslav, I will look forward to that fix becoming available!

Comment 13 Jaroslav Rohel 2020-01-08 08:44:37 UTC
PR https://github.com/rpm-software-management/dnf/pull/1551 was merged to upstream.

Comment 14 amatej 2020-02-11 12:38:03 UTC
I have created a test which is part of this PR: https://github.com/rpm-software-management/ci-dnf-stack/pull/784

Comment 15 Robert Scheck 2020-02-18 15:16:10 UTC
When will a fix land in a release? See the horror from a pristine RHEL 8.1 below ;-)

[root@tux ~]# dnf update
Updating Subscription Management repositories.
Last metadata expiration check: 0:26:19 ago on Tue Feb 18 15:44:26 2020.
Dependencies resolved.
 Package                                                               Architecture                                    Version                                                                 Repository                                                                 Size
 kernel                                                                x86_64                                          4.18.0-147.5.1.el8_1                                                    rhel-8-for-x86_64-baseos-rpms                                             1.5 M
 kernel-core                                                           x86_64                                          4.18.0-147.5.1.el8_1                                                    rhel-8-for-x86_64-baseos-rpms                                              25 M
 kernel-modules                                                        x86_64                                          4.18.0-147.5.1.el8_1                                                    rhel-8-for-x86_64-baseos-rpms                                              22 M
 SDL                                                                   x86_64                                          1.2.15-36.el8_1                                                         rhel-8-for-x86_64-appstream-rpms                                          218 k
 wget                                                                  x86_64                                          1.19.5-8.el8_1.1                                                        rhel-8-for-x86_64-appstream-rpms                                          735 k
 dnf                                                                   noarch                                          4.2.7-7.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             490 k
 setup                                                                 noarch                                          2.12.2-2.el8_1.1                                                        rhel-8-for-x86_64-baseos-rpms                                             180 k
 NetworkManager-libnm                                                  x86_64                                          1:1.20.0-5.el8_1                                                        rhel-8-for-x86_64-baseos-rpms                                             1.7 M
 libdnf                                                                x86_64                                          0.35.1-9.el8_1                                                          rhel-8-for-x86_64-baseos-rpms                                             606 k
 hwdata                                                                noarch                                          0.314-8.2.el8_1                                                         rhel-8-for-x86_64-baseos-rpms                                             1.6 M
 NetworkManager-tui                                                    x86_64                                          1:1.20.0-5.el8_1                                                        rhel-8-for-x86_64-baseos-rpms                                             308 k
 sos                                                                   noarch                                          3.7-8.el8_1                                                             rhel-8-for-x86_64-baseos-rpms                                             510 k
 libmodulemd1                                                          x86_64                                          1.8.11-4.el8_1                                                          rhel-8-for-x86_64-baseos-rpms                                             179 k
 python3-hawkey                                                        x86_64                                          0.35.1-9.el8_1                                                          rhel-8-for-x86_64-baseos-rpms                                              96 k
 ca-certificates                                                       noarch                                          2019.2.32-80.0.el8_1                                                    rhel-8-for-x86_64-baseos-rpms                                             407 k
 microcode_ctl                                                         x86_64                                          4:20190618-1.20191115.3.el8_1                                           rhel-8-for-x86_64-baseos-rpms                                             2.5 M
 NetworkManager                                                        x86_64                                          1:1.20.0-5.el8_1                                                        rhel-8-for-x86_64-baseos-rpms                                             2.1 M
 dracut                                                                x86_64                                          049-27.git20190906.el8_1.1                                              rhel-8-for-x86_64-baseos-rpms                                             364 k
 dnf-data                                                              noarch                                          4.2.7-7.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             139 k
 python3-libdnf                                                        x86_64                                          0.35.1-9.el8_1                                                          rhel-8-for-x86_64-baseos-rpms                                             689 k
 python3-dnf                                                           noarch                                          4.2.7-7.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             506 k
 dnf-automatic                                                         noarch                                          4.2.7-7.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             136 k
 yum                                                                   noarch                                          4.2.7-7.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             181 k
 dracut-config-rescue                                                  x86_64                                          049-27.git20190906.el8_1.1                                              rhel-8-for-x86_64-baseos-rpms                                              53 k
 libarchive                                                            x86_64                                          3.3.2-8.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             359 k
 sqlite                                                                x86_64                                          3.26.0-4.el8_1                                                          rhel-8-for-x86_64-baseos-rpms                                             666 k
 sqlite-libs                                                           x86_64                                          3.26.0-4.el8_1                                                          rhel-8-for-x86_64-baseos-rpms                                             579 k
 python3-policycoreutils                                               noarch                                          2.9-3.el8_1.1                                                           rhel-8-for-x86_64-baseos-rpms                                             2.2 M
 grub2-efi-x64                                                         x86_64                                          1:2.02-78.el8_1.1                                                       rhel-8-for-x86_64-baseos-rpms                                             400 k
 glibc-langpack-en                                                     x86_64                                          2.28-72.el8_1.1                                                         rhel-8-for-x86_64-baseos-rpms                                             818 k
 grub2-pc-modules                                                      noarch                                          1:2.02-78.el8_1.1                                                       rhel-8-for-x86_64-baseos-rpms                                             859 k
 glibc-langpack-de                                                     x86_64                                          2.28-72.el8_1.1                                                         rhel-8-for-x86_64-baseos-rpms                                             500 k
 openssh-clients                                                       x86_64                                          8.0p1-4.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             704 k
 glibc-common                                                          x86_64                                          2.28-72.el8_1.1                                                         rhel-8-for-x86_64-baseos-rpms                                             836 k
 openldap                                                              x86_64                                          2.4.46-11.el8_1                                                         rhel-8-for-x86_64-baseos-rpms                                             352 k
 systemd-pam                                                           x86_64                                          239-18.el8_1.2                                                          rhel-8-for-x86_64-baseos-rpms                                             230 k
 kernel-tools-libs                                                     x86_64                                          4.18.0-147.5.1.el8_1                                                    rhel-8-for-x86_64-baseos-rpms                                             1.5 M
 glibc                                                                 x86_64                                          2.28-72.el8_1.1                                                         rhel-8-for-x86_64-baseos-rpms                                             3.7 M
 grub2-pc                                                              x86_64                                          1:2.02-78.el8_1.1                                                       rhel-8-for-x86_64-baseos-rpms                                              36 k
 grub2-tools-extra                                                     x86_64                                          1:2.02-78.el8_1.1                                                       rhel-8-for-x86_64-baseos-rpms                                             1.1 M
 openssh-server                                                        x86_64                                          8.0p1-4.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             485 k
 systemd-udev                                                          x86_64                                          239-18.el8_1.2                                                          rhel-8-for-x86_64-baseos-rpms                                             1.3 M
 policycoreutils                                                       x86_64                                          2.9-3.el8_1.1                                                           rhel-8-for-x86_64-baseos-rpms                                             378 k
 grub2-common                                                          noarch                                          1:2.02-78.el8_1.1                                                       rhel-8-for-x86_64-baseos-rpms                                             882 k
 grub2-tools-minimal                                                   x86_64                                          1:2.02-78.el8_1.1                                                       rhel-8-for-x86_64-baseos-rpms                                             201 k
 systemd-libs                                                          x86_64                                          239-18.el8_1.2                                                          rhel-8-for-x86_64-baseos-rpms                                             560 k
 grub2-tools                                                           x86_64                                          1:2.02-78.el8_1.1                                                       rhel-8-for-x86_64-baseos-rpms                                             2.0 M
 kernel-tools                                                          x86_64                                          4.18.0-147.5.1.el8_1                                                    rhel-8-for-x86_64-baseos-rpms                                             1.7 M
 systemd                                                               x86_64                                          239-18.el8_1.2                                                          rhel-8-for-x86_64-baseos-rpms                                             3.5 M
 policycoreutils-python-utils                                          noarch                                          2.9-3.el8_1.1                                                           rhel-8-for-x86_64-baseos-rpms                                             250 k
 openssh                                                               x86_64                                          8.0p1-4.el8_1                                                           rhel-8-for-x86_64-baseos-rpms                                             496 k
 sudo                                                                  x86_64                                          1.8.25p1-8.el8_1.1                                                      rhel-8-for-x86_64-baseos-rpms                                             875 k
Installing dependencies:
 xkeyboard-config                                                      noarch                                          2.24-3.el8                                                              rhel-8-for-x86_64-appstream-rpms                                          828 k
 grub2-tools-efi                                                       x86_64                                          1:2.02-78.el8_1.1                                                       rhel-8-for-x86_64-baseos-rpms                                             465 k
Installing weak dependencies:
 libxkbcommon                                                          x86_64                                          0.8.2-1.el8                                                             rhel-8-for-x86_64-appstream-rpms                                          116 k

Transaction Summary
Install   6 Packages
Upgrade  49 Packages

Total download size: 91 M
Is this ok [y/N]:

Comment 16 Robert Scheck 2020-02-18 15:19:18 UTC
Cross-filed ticket 02588357 at the Red Hat customer portal.

Comment 24 errata-xmlrpc 2020-04-28 16:49:06 UTC
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.


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