Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

Leo3418
Copy link
Contributor

@Leo3418 Leo3418 commented Jun 14, 2021

The scripts/setup-and-run-repoman.sh script uses the sort program to get the latest repoman release from the Portage Git tree, but without the -V option, it can falsely identify versions like 2.3.9 to be newer than 2.3.10:

$ git tag | grep repoman | sort -u
repoman-2.3.0
repoman-2.3.1
repoman-2.3.10
repoman-2.3.11
repoman-2.3.12
repoman-2.3.13
repoman-2.3.14
repoman-2.3.15
repoman-2.3.16
repoman-2.3.17
repoman-2.3.18
repoman-2.3.19
repoman-2.3.2
repoman-2.3.20
repoman-2.3.21
repoman-2.3.22
repoman-2.3.23
repoman-2.3.3
repoman-2.3.5
repoman-2.3.6
repoman-2.3.7
repoman-2.3.8
repoman-2.3.9
repoman-3.0.0
repoman-3.0.1
repoman-3.0.2
repoman-3.0.3

The script should still work fine now because it might take a while for repoman to get to 3.0.10, but once that happens, it will become a minor issue.

Note that the copy of this script under gentoo/guru has this issue too. If you would like me to submit another pull request for that one as well, please let me know!

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@gmail.com>
gentoo-bot pushed a commit to gentoo/guru that referenced this pull request Jun 15, 2021
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@gmail.com>
Closes: gentoo/sci#1094
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
@Nowa-Ammerlaan
Copy link
Member

Thanks, good catch,

I went ahead and applied the same patch to ::guru as well.

Nowa-Ammerlaan pushed a commit to Nowa-Ammerlaan/natinst that referenced this pull request Jun 15, 2021
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@gmail.com>
Closes: gentoo/sci#1094
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants