Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690118 - db.eclass uses wrong sort option
Summary: db.eclass uses wrong sort option
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-18 02:33 UTC by Daniel Robbins
Modified: 2019-07-18 07:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Robbins 2019-07-18 02:33:37 UTC
A "sort -n" command in db.eclass is not functioning properly resulting in
symlinks in /usr/lib being messed up. The problem line is:

target=`find . -maxdepth 1 -type f -name "${name}-*.${ext}" |sort -n |tail -n 1`

"sort -n" should be changed to "sort -V" -- otherwise it will sort completely wrong and not do the right thing.

With sort -V, it will properly handle db-18.x and understand that it's newer than db-6.x.
Comment 1 Larry the Git Cow gentoo-dev 2019-07-18 07:54:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43e83e8d56f14bde00be2994995c5191a7a5ca88

commit 43e83e8d56f14bde00be2994995c5191a7a5ca88
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2019-07-18 07:27:20 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-07-18 07:52:00 +0000

    db.eclass: Fixed version sort
    
    Thanks-to: Daniel Robbins <drobbins@funtoo.org>
    Closes: https://bugs.gentoo.org/690118
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 eclass/db.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)