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 852141382C5 for ; Mon, 24 May 2021 04:37:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 974E4E0827; Mon, 24 May 2021 04:37:26 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 8075DE0827 for ; Mon, 24 May 2021 04:37:26 +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 CFE5B335D1E for ; Mon, 24 May 2021 04:37:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8A15A632 for ; Mon, 24 May 2021 04:37:23 +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: <1621830928.9ea780739f2489611da13223acf87ce3780bef6a.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/eapi.sh bin/phase-helpers.sh X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 9ea780739f2489611da13223acf87ce3780bef6a X-VCS-Branch: master Date: Mon, 24 May 2021 04:37:23 +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: 5249e94e-2e4d-42f8-a9bb-81e32485b0cb X-Archives-Hash: 0d4ec45469dc6f5068bf8ad65c8afd98 commit: 9ea780739f2489611da13223acf87ce3780bef6a Author: Michał Górny gentoo org> AuthorDate: Wed May 12 12:19:15 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon May 24 04:35:28 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9ea78073 Remove unpack support for 7z, lha and rar in EAPI 8 Bug: https://bugs.gentoo.org/690968 Signed-off-by: Michał Górny gentoo.org> Signed-off-by: Zac Medico gentoo.org> bin/eapi.sh | 12 ++++++++++++ bin/phase-helpers.sh | 26 +++++++++++++++++++------- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/bin/eapi.sh b/bin/eapi.sh index b03871690..a999c68e6 100644 --- a/bin/eapi.sh +++ b/bin/eapi.sh @@ -186,6 +186,18 @@ ___eapi_unpack_supports_txz() { [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]] } +___eapi_unpack_supports_7z() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + +___eapi_unpack_supports_lha() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + +___eapi_unpack_supports_rar() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + ___eapi_econf_passes_--disable-dependency-tracking() { [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3)$ ]] } diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 7a82dad20..6294f6a5c 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -429,11 +429,15 @@ unpack() { __unpack_tar "${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d}" ;; 7z) - local my_output - my_output="$(7z x -y "${srcdir}${x}")" - if [ $? -ne 0 ]; then - echo "${my_output}" >&2 - die "$myfail" + if ___eapi_unpack_supports_7z; then + local my_output + my_output="$(7z x -y "${srcdir}${x}")" + if [ $? -ne 0 ]; then + echo "${my_output}" >&2 + die "$myfail" + fi + else + __vecho "unpack ${x}: file format not recognized. Ignoring." fi ;; rar) @@ -443,7 +447,11 @@ unpack() { "suffix '${suffix}' which is unofficially supported" \ "with EAPI '${EAPI}'. Instead use 'rar' or 'RAR'." fi - unrar x -idq -o+ "${srcdir}${x}" || die "$myfail" + if ___eapi_unpack_supports_rar; then + unrar x -idq -o+ "${srcdir}${x}" || die "$myfail" + else + __vecho "unpack ${x}: file format not recognized. Ignoring." + fi ;; lha|lzh) if ___eapi_unpack_is_case_sensitive && \ @@ -453,7 +461,11 @@ unpack() { "with EAPI '${EAPI}'." \ "Instead use 'LHA', 'LHa', 'lha', or 'lzh'." fi - lha xfq "${srcdir}${x}" || die "$myfail" + if ___eapi_unpack_supports_lha; then + lha xfq "${srcdir}${x}" || die "$myfail" + else + __vecho "unpack ${x}: file format not recognized. Ignoring." + fi ;; a) if ___eapi_unpack_is_case_sensitive && \