From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0BC9B1580EB for ; Fri, 30 May 2025 07:31:02 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id EC17E3430A6 for ; Fri, 30 May 2025 07:31:01 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id EAF3F1104A8; Fri, 30 May 2025 07:30:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id E10A41104A8 for ; Fri, 30 May 2025 07:30:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9AE843430A6 for ; Fri, 30 May 2025 07:30:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C41E828F1 for ; Fri, 30 May 2025 07:30:43 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1748590236.e9992f0e5c94bd23f9d4effec8600bb4d0be1a8c.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild.sh bin/estrip bin/isolated-functions.sh bin/phase-functions.sh bin/phase-helpers.sh bin/save-ebuild-env.sh X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e9992f0e5c94bd23f9d4effec8600bb4d0be1a8c X-VCS-Branch: master Date: Fri, 30 May 2025 07:30:43 +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: 2ae17339-3c4f-457c-9159-f428febce309 X-Archives-Hash: 6d8a3145263d8515339c004b4e063d28 commit: e9992f0e5c94bd23f9d4effec8600bb4d0be1a8c Author: Kerin Millar plushkava net> AuthorDate: Wed May 28 01:31:35 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 30 07:30:36 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e9992f0e isolated-functions.sh: drop the __bashpid() function Given a target of bash-4.2, it's no longer needed. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/ebuild.sh | 2 +- bin/estrip | 4 ++-- bin/isolated-functions.sh | 11 ++--------- bin/phase-functions.sh | 2 +- bin/phase-helpers.sh | 2 +- bin/save-ebuild-env.sh | 2 +- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 63ca68c8c4..832a85affa 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -549,7 +549,7 @@ if [[ -n ${QA_INTERCEPTORS} ]] ; then fi # Subshell/helper die support (must export for the die helper). -export EBUILD_MASTER_PID=${BASHPID:-$(__bashpid)} +export EBUILD_MASTER_PID=${BASHPID} trap 'exit 1' SIGTERM if [[ ${EBUILD_PHASE} != @(clean|cleanrm|depend) ]] && ! [[ ${EBUILD_PHASE} == setup && ${EMERGE_FROM} == ebuild ]] && [[ -f ${T}/environment ]] diff --git a/bin/estrip b/bin/estrip index 592aee24f7..136615eaaa 100755 --- a/bin/estrip +++ b/bin/estrip @@ -234,7 +234,7 @@ save_elf_sources() { buildid=$("${debugedit}" -i \ -b "${WORKDIR}" \ -d "${prepstrip_sources_dir}" \ - -l "${tmpdir}/sources/${x##*/}.${BASHPID:-$(__bashpid)}" \ + -l "${tmpdir}/sources/${x##*/}.${BASHPID}" \ "${x}") } @@ -389,7 +389,7 @@ process_elf() { # See if we can split & strip at the same time if ${splitdebug} && [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then local shortname="${x##*/}.debug" - local splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID:-$(__bashpid)}" + local splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID}" ${already_stripped} || \ ${STRIP} ${strip_flags} \ diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 18ee80597d..7ce43541c1 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -109,13 +109,6 @@ nonfatal() { PORTAGE_NONFATAL=1 "$@" } -__bashpid() { - # The BASHPID variable is new to bash-4.0, so add a hack for older - # versions. This must be used like so: - # ${BASHPID:-$(__bashpid)} - sh -c 'echo ${PPID}' -} - __helpers_die() { if ___eapi_helpers_can_die && [[ ${PORTAGE_NONFATAL} != 1 ]]; then die "$@" @@ -242,8 +235,8 @@ die() { [[ -n ${PORTAGE_IPC_DAEMON} ]] && "${PORTAGE_BIN_PATH}"/ebuild-ipc exit 1 # subshell die support - if [[ -n ${EBUILD_MASTER_PID} && ${BASHPID:-$(__bashpid)} != ${EBUILD_MASTER_PID} ]] ; then - kill -s SIGTERM ${EBUILD_MASTER_PID} + if [[ -n ${EBUILD_MASTER_PID} && ${BASHPID} != "${EBUILD_MASTER_PID}" ]] ; then + kill -s SIGTERM "${EBUILD_MASTER_PID}" fi exit 1 } diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index fa824b99d5..830ba451cf 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -963,7 +963,7 @@ __ebuild_main() { # setup EBUILD_MASTER_PID to refer to the current ${BASHPID}, # which seems to give the best results when further # nested subshells call die. - export EBUILD_MASTER_PID=${BASHPID:-$(__bashpid)} + export EBUILD_MASTER_PID=${BASHPID} trap 'exit 1' SIGTERM if [[ -v PORTAGE_EBUILD_EXTRA_SOURCE && diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index a4bf8328d9..26f8c6f903 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -490,7 +490,7 @@ unpack() { econf() { local x - local pid=${BASHPID:-$(__bashpid)} + local pid=${BASHPID} if ! ___eapi_has_prefix_variables; then local EPREFIX= diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index 25f885f961..98f03bd000 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -79,7 +79,7 @@ __save_ebuild_env() { __ebuild_arg_to_phase __ebuild_phase_funcs default \ __unpack_tar __unset_colors \ __source_env_files __try_source __check_bash_version \ - __bashpid __start_distcc \ + __start_distcc \ __eqaquote __eqatag \ __eapi7_ver_parse_range __eapi7_ver_split \ __eapi7_ver_compare_int __eapi7_ver_compare \