db.eclass: Fixed version sort
authorLars Wendler <polynomial-c@gentoo.org>
Thu, 18 Jul 2019 07:27:20 +0000 (09:27 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Thu, 18 Jul 2019 07:52:00 +0000 (09:52 +0200)
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

index 5227601c456f68feee1d5a63df917a6cb33d0d3d..8de3a63ea8a780f0d6f7d26d2c2fccc9f9d2c63e 100644 (file)
@@ -30,7 +30,7 @@ db_fix_so() {
        # now rebuild all the correct ones
        for ext in so a; do
                for name in libdb libdb_{cxx,tcl,java,sql,stl}; do
-                       target=`find . -maxdepth 1 -type f -name "${name}-*.${ext}" |sort -n |tail -n 1`
+                       target=$(find . -maxdepth 1 -type f -name "${name}-*.${ext}" |sort -V |tail -n 1)
                        [ -n "${target}" ] && ln -sf ${target//.\//} ${name}.${ext}
                done;
        done;