Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 18 Feb 2020 14:32:07
Message-Id: 1582036305.1a05e3a4ad8c8948465e22509b356e191b90789a.slyfox@gentoo
1 commit: 1a05e3a4ad8c8948465e22509b356e191b90789a
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 18 14:30:43 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 18 14:31:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a05e3a4
7
8 portability.eclass: avoid lexicographic number comparison, bug #705250
9
10 Closes: https://bugs.gentoo.org/705250
11 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
12
13 eclass/portability.eclass | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16 diff --git a/eclass/portability.eclass b/eclass/portability.eclass
17 index c56f03fb876..1402c0420cb 100644
18 --- a/eclass/portability.eclass
19 +++ b/eclass/portability.eclass
20 @@ -67,8 +67,8 @@ seq() {
21
22 # Screw it, do the output ourselves
23 while :; do
24 - [[ $max < $min && $step > 0 ]] && break
25 - [[ $min < $max && $step < 0 ]] && break
26 + [[ $max -lt $min && $step -gt 0 ]] && break
27 + [[ $min -lt $max && $step -gt 0 ]] && break
28 echo $min
29 : $(( min += step ))
30 done