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 BC384138334 for ; Mon, 5 Nov 2018 22:10:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E50EE0BF1; Mon, 5 Nov 2018 22:10:32 +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 495CBE0BF1 for ; Mon, 5 Nov 2018 22:10:31 +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 4CEB9335C38 for ; Mon, 5 Nov 2018 22:10:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 24BC643E for ; Mon, 5 Nov 2018 22:10:27 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1541455748.beb317e71c2d88e20c4dd95217737274d00c145e.ulm@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild.sh bin/isolated-functions.sh X-VCS-Directories: bin/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: beb317e71c2d88e20c4dd95217737274d00c145e X-VCS-Branch: master Date: Mon, 5 Nov 2018 22:10:27 +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: 5a5a2b25-263c-4583-8906-363c7be085d9 X-Archives-Hash: e09d3ead8e14bc73713ff91de8ceb9cd commit: beb317e71c2d88e20c4dd95217737274d00c145e Author: Ulrich Müller gentoo org> AuthorDate: Mon Nov 5 20:12:50 2018 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Mon Nov 5 22:09:08 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=beb317e7 isolated-functions.sh: Do not define any aliases. save_IFS and restore_IFS are the only aliases that Portage defines, and they are used exactly once. Rewrite __source_all_bashrcs() not to depend on them, and remove their definitions. The intention is to drop the expand_aliases shell option at some time in the future. Acked-by: Zac Medico gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> bin/ebuild.sh | 8 ++------ bin/isolated-functions.sh | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 5491c4f58..00524d019 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -421,13 +421,9 @@ __source_all_bashrcs() { if [[ $EBUILD_PHASE != depend ]] ; then # source the existing profile.bashrcs. - save_IFS - IFS=$'\n' - local bashenv_files=($PORTAGE_BASHRC_FILES) - restore_IFS - for x in "${bashenv_files[@]}" ; do + while read -r x; do __try_source "${x}" - done + done <<<"${PORTAGE_BASHRC_FILES}" fi # The user's bashrc is the ONLY non-portage bit of code diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 39b0ad344..22a6dbb0f 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -11,8 +11,6 @@ fi # We need this next line for "die" and "assert". It expands # It _must_ preceed all the calls to die and assert. shopt -s expand_aliases -alias save_IFS='[ "${IFS:-unset}" != "unset" ] && old_IFS="${IFS}"' -alias restore_IFS='if [ "${old_IFS:-unset}" != "unset" ]; then IFS="${old_IFS}"; unset old_IFS; else unset IFS; fi' assert() { local x pipestatus=${PIPESTATUS[*]}