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 41AB01382C5 for ; Wed, 12 May 2021 20:55:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68ED8E09C6; Wed, 12 May 2021 20:55:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 4BF5FE09C6 for ; Wed, 12 May 2021 20:55:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 C2B6F335C77 for ; Wed, 12 May 2021 20:55:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 18B394C3 for ; Wed, 12 May 2021 20:55:17 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1620852896.b13d8ea802f395645a7364088a1a74738e7aecda.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/tests/tests-common.sh X-VCS-Directories: eclass/tests/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: b13d8ea802f395645a7364088a1a74738e7aecda X-VCS-Branch: master Date: Wed, 12 May 2021 20:55:17 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 013303c7-839a-4e17-9f56-14e535929001 X-Archives-Hash: 27aa6e6cdb3e87899e1a41c5168dbe1e commit: b13d8ea802f395645a7364088a1a74738e7aecda Author: Mike Gilbert gentoo org> AuthorDate: Wed May 12 20:12:03 2021 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Wed May 12 20:54:56 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b13d8ea8 eclass/tests: eat optional arguments passed to has_version portageq has_version does not understand arguments like -b or --host-root. This fixes tests for autotools.eclass. Signed-off-by: Mike Gilbert gentoo.org> eclass/tests/tests-common.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/tests/tests-common.sh b/eclass/tests/tests-common.sh index 2fc849cb69a..a677842b6ac 100644 --- a/eclass/tests/tests-common.sh +++ b/eclass/tests/tests-common.sh @@ -61,6 +61,9 @@ die() { } has_version() { + while [[ $1 == -* ]]; do + shift + done portageq has_version / "$@" }