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 433311382C5 for ; Sat, 6 Mar 2021 22:28:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 93590E0843; Sat, 6 Mar 2021 22:28:40 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 795C7E0843 for ; Sat, 6 Mar 2021 22:28:40 +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 88F61340DE9 for ; Sat, 6 Mar 2021 22:28:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0CE4347 for ; Sat, 6 Mar 2021 22:28:38 +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: <1615069648.ca1b7b3d12cfe74d5a0238d138094cd404b12ad0.zmedico@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/portage/portage-3.0.16.ebuild X-VCS-Directories: sys-apps/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ca1b7b3d12cfe74d5a0238d138094cd404b12ad0 X-VCS-Branch: master Date: Sat, 6 Mar 2021 22:28:38 +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: 8c73dd2f-dfe7-484f-b4ba-276bdc248e4c X-Archives-Hash: fde8208820d72738fa8d2ecec17f0965 commit: ca1b7b3d12cfe74d5a0238d138094cd404b12ad0 Author: Zac Medico gentoo org> AuthorDate: Sat Mar 6 22:06:07 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Mar 6 22:27:28 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca1b7b3d sys-apps/portage: batch EPREFIX shebang sed calls with xargs Batch EPREFIX shebang sed calls with xargs, and also use find -executable since we only care about executables. Package-Manager: Portage-3.0.16, Repoman-3.0.2 Signed-off-by: Zac Medico gentoo.org> sys-apps/portage/portage-3.0.16.ebuild | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys-apps/portage/portage-3.0.16.ebuild b/sys-apps/portage/portage-3.0.16.ebuild index 0c20c537626..0a278512cac 100644 --- a/sys-apps/portage/portage-3.0.16.ebuild +++ b/sys-apps/portage/portage-3.0.16.ebuild @@ -137,13 +137,17 @@ python_prepare_all() { -w "/_BINARY/" lib/portage/const.py einfo "Prefixing shebangs ..." + > "${T}/shebangs" || die while read -r -d $'\0' ; do local shebang=$(head -n1 "$REPLY") if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then - sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ - die "sed failed" + echo "${REPLY}" >> "${T}/shebangs" || die fi - done < <(find . -type f ! -name etc-update -print0) + done < <(find . -type f -executable ! -name etc-update -print0) + + if [[ -s ${T}/shebangs ]]; then + xargs sed -i -e "1s:^#!:#!${EPREFIX}:" < "${T}/shebangs" || die "sed failed" + fi einfo "Adjusting make.globals, repos.conf and etc-update ..." hprefixify cnf/{make.globals,repos.conf} bin/etc-update