commit:     f5a89a542d5355496d0ac1dde6faeda00c5eaa9c
Author:     Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Mon Jun 14 20:22:34 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Jun 15 06:56:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f5a89a54

scripts/setup-and-run-repoman.sh: use 'sort -V' to get latest tag

Without the -V flag to enable version sort, 'sort' can falsely identify
a version string like 3.0.9 to be greater than 3.0.10.  This can be
shown by running 'git tag | grep portage | sort -u' in the Portage Git
tree.  This issue is not so prominent for repoman yet because the latest
version of repoman as of now is 3.0.3, but it will surface when repoman
3.0.10 is released.

Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
Closes: https://github.com/gentoo/sci/pull/1094
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 scripts/setup-and-run-repoman.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/setup-and-run-repoman.sh b/scripts/setup-and-run-repoman.sh
index f9e45a9cf..471a05181 100755
--- a/scripts/setup-and-run-repoman.sh
+++ b/scripts/setup-and-run-repoman.sh
@@ -16,7 +16,7 @@ git clone https://github.com/gentoo/portage.git
 cd portage
 
 # Get all versions, and read into array
-mapfile -t RM_VERSIONS < <( git tag | grep repoman | sort -u )
+mapfile -t RM_VERSIONS < <( git tag | grep repoman | sort -uV )
 
 # Select latests version (last element in array)
 RM_VERS="${RM_VERSIONS[-1]}"

Reply via email to