From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3388E1396D2 for ; Thu, 21 Sep 2017 07:04:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02B9EE0D33; Thu, 21 Sep 2017 07:04:51 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D4DC31FC048 for ; Thu, 21 Sep 2017 07:04:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4DE0B33BE69 for ; Thu, 21 Sep 2017 07:04:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E55819083 for ; Thu, 21 Sep 2017 07:04:47 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1505977467.dacc65a567e8d2fe9fd553e69160131054e41717.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:eapi7-ver commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/eapi7-ver.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: dacc65a567e8d2fe9fd553e69160131054e41717 X-VCS-Branch: eapi7-ver Date: Thu, 21 Sep 2017 07:04:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: dbe163e5-5875-43a2-90bc-c1acab9610c9 X-Archives-Hash: 36da3c59f28e84e4eb6e767226e0fc0f commit: dacc65a567e8d2fe9fd553e69160131054e41717 Author: Michał Górny gentoo org> AuthorDate: Thu Sep 21 06:33:07 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Sep 21 07:04:27 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dacc65a5 eapi7-ver.eclass: Special-case -r0 eclass/eapi7-ver.eclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eclass/eapi7-ver.eclass b/eclass/eapi7-ver.eclass index aeb9dedd78b..e833835a56e 100644 --- a/eclass/eapi7-ver.eclass +++ b/eclass/eapi7-ver.eclass @@ -207,6 +207,10 @@ ver_test() { *) die "${FUNCNAME}: invalid operator: ${op}" ;; esac + # explicitly strip -r0[00000...] to avoid overcomplexifying the algo + [[ ${va} == *-r0* && 10#${va#*-r} -eq 0 ]] && va=${va%-r*} + [[ ${vb} == *-r0* && 10#${vb#*-r} -eq 0 ]] && vb=${vb%-r*} + local comp compb _ver_split "${vb}" compb=( "${comp[@]}" )