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 BCA761382C5 for ; Mon, 24 May 2021 04:34:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F141EE07FE; Mon, 24 May 2021 04:34:02 +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 D4F04E07FE for ; Mon, 24 May 2021 04:34:02 +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 DFDD7335D1E for ; Mon, 24 May 2021 04:34:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9B52D632 for ; Mon, 24 May 2021 04:34:00 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1621830829.7c8edfbb8001d447c6f02695954ed9e348dbd088.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/eapi.sh bin/isolated-functions.sh bin/phase-helpers.sh X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 7c8edfbb8001d447c6f02695954ed9e348dbd088 X-VCS-Branch: master Date: Mon, 24 May 2021 04:34:00 +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: 11c1e9cd-17f9-4fa6-920b-c4b2e5eeda44 X-Archives-Hash: e76f0849940d96c73f6f579248b79d27 commit: 7c8edfbb8001d447c6f02695954ed9e348dbd088 Author: Michał Górny gentoo org> AuthorDate: Wed May 12 12:06:06 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon May 24 04:33:49 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=7c8edfbb Ban hasq, hasv and useq in EAPI 8 Bug: https://bugs.gentoo.org/199722 Signed-off-by: Michał Górny gentoo.org> Signed-off-by: Zac Medico gentoo.org> bin/eapi.sh | 14 +++++++++++++- bin/isolated-functions.sh | 6 +++++- bin/phase-helpers.sh | 4 +++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/bin/eapi.sh b/bin/eapi.sh index e2b6f62a0..b03871690 100644 --- a/bin/eapi.sh +++ b/bin/eapi.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2012-2018 Gentoo Foundation +# Copyright 2012-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # PHASES @@ -128,6 +128,18 @@ ___eapi_has_version_functions() { [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]] } +___eapi_has_hasq() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + +___eapi_has_hasv() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + +___eapi_has_useq() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + ___eapi_has_master_repositories() { [[ ${1-${EAPI-0}} =~ ^(5-progress)$ ]] } diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index ba224b96f..b495ae6c7 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH}/eapi.sh" || exit 1 @@ -475,11 +475,15 @@ ___parallel_xargs() { } hasq() { + ___eapi_has_hasq || die "'${FUNCNAME}' banned in EAPI ${EAPI}" + eqawarn "QA Notice: The 'hasq' function is deprecated (replaced by 'has')" has "$@" } hasv() { + ___eapi_has_hasv || die "'${FUNCNAME}' banned in EAPI ${EAPI}" + if has "$@" ; then echo "$1" return 0 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 116c233fb..7a82dad20 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 if ___eapi_has_DESTTREE_INSDESTTREE; then @@ -190,6 +190,8 @@ dostrip() { } useq() { + ___eapi_has_useq || die "'${FUNCNAME}' banned in EAPI ${EAPI}" + eqawarn "QA Notice: The 'useq' function is deprecated (replaced by 'use')" use ${1} }