Bug 2024409 - weak-modules:Changing the sorting mode of rpmsort
Summary: weak-modules:Changing the sorting mode of rpmsort
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kmod
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: kmod development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-18 03:16 UTC by yangyanchao
Modified: 2023-05-25 17:22 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-25 17:22:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Possible patch (1.14 KB, application/mbox)
2021-11-18 03:16 UTC, yangyanchao
no flags Details

Description yangyanchao 2021-11-18 03:16:18 UTC
Created attachment 1842464 [details]
Possible patch

Created attachment 1842464 [details]
Possible patch

Description of problem:

When the kernel version number contains a mixture of letters and numbers, the original sorting method has a problem. For example:
[root@localhost kmod]# cat test
4.19.90-vhulk2108.6.0.h803
4.19.90-2109.1.0.0108
4.19.90-vhulk2109.1.0.h813
[root@localhost kmod]# ./test.sh
+ cat test
+ sed -e s/-/../g
+ sort -n -t. -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 -k6,6 -k7,7 -k8,8 -k9,9 -k10,10
+ sed -e's/\.\./-/g'
4.19.90-vhulk2109.1.0.h813
4.19.90-vhulk2108.6.0.h803
4.19.90-2109.1.0.0108

Even if this sort isn't helpful, maybe sort with "sort -V", instead of using "-" replace with ".." would make the code more readable?


Version-Release number of selected component (if applicable):
29-6.fc36

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Ben Cotton 2022-02-08 21:27:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Ben Cotton 2023-04-25 16:46:08 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Ludek Smid 2023-05-25 17:22:48 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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