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 6824F1382C5 for ; Thu, 4 Mar 2021 09:14:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B8378E088B; Thu, 4 Mar 2021 09:14:08 +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 9F1E6E088B for ; Thu, 4 Mar 2021 09:14:08 +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 533E0340F6C for ; Thu, 4 Mar 2021 09:14:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA106478 for ; Thu, 4 Mar 2021 09:14:05 +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: <1614848344.cec73041df583bfd46e1fa9739286a74a2e85b18.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/chmod-lite bin/ebuild-ipc bin/ebuild-pyhelper X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: cec73041df583bfd46e1fa9739286a74a2e85b18 X-VCS-Branch: master Date: Thu, 4 Mar 2021 09:14:05 +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: 82d0e709-d422-433f-bb77-df156709c92c X-Archives-Hash: 1513c547f1c28214a34736617e04186b commit: cec73041df583bfd46e1fa9739286a74a2e85b18 Author: Zac Medico gentoo org> AuthorDate: Thu Mar 4 08:34:43 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Mar 4 08:59:04 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cec73041 bin/ebuild-pyhelper: wrapper for portage python helpers Merge the shell script wrappers for chmod-lite and ebuild-ipc into a single ebuild-pyhelper script. Signed-off-by: Zac Medico gentoo.org> bin/chmod-lite | 11 +---------- bin/ebuild-ipc | 9 +-------- bin/ebuild-pyhelper | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/bin/chmod-lite b/bin/chmod-lite deleted file mode 100755 index ffa8d4d23..000000000 --- a/bin/chmod-lite +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Copyright 2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -export __PORTAGE_HELPER_CWD=${PWD} - -# Use safe cwd, avoiding unsafe import for bug #469338. -cd "${PORTAGE_PYM_PATH}" || exit 1 -PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \ - exec "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/chmod-lite.py" "$@" diff --git a/bin/chmod-lite b/bin/chmod-lite new file mode 120000 index 000000000..d64cd615b --- /dev/null +++ b/bin/chmod-lite @@ -0,0 +1 @@ +ebuild-pyhelper \ No newline at end of file diff --git a/bin/ebuild-ipc b/bin/ebuild-ipc deleted file mode 100755 index e77b94b2c..000000000 --- a/bin/ebuild-ipc +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# Copyright 2010-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Use safe cwd, avoiding unsafe import for bug #469338. -cd "${PORTAGE_PYM_PATH}" || exit 1 -PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \ - exec "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/ebuild-ipc.py" "$@" diff --git a/bin/ebuild-ipc b/bin/ebuild-ipc new file mode 120000 index 000000000..d64cd615b --- /dev/null +++ b/bin/ebuild-ipc @@ -0,0 +1 @@ +ebuild-pyhelper \ No newline at end of file diff --git a/bin/ebuild-pyhelper b/bin/ebuild-pyhelper new file mode 100755 index 000000000..d32bc6f6f --- /dev/null +++ b/bin/ebuild-pyhelper @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2010-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +export __PORTAGE_HELPER_CWD=${PWD} + +if [[ ${0##*/} == "ebuild-pyhelper" ]]; then + echo "ebuild-pyhelper: must be called via symlink" &>2 + exit 1 +fi + +# Use safe cwd, avoiding unsafe import for bug #469338. +cd "${PORTAGE_PYM_PATH}" || exit 1 +for path in "${PORTAGE_BIN_PATH}/${0##*/}"{.py,}; do + if [[ -x "${path}" ]]; then + PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \ + exec "${PORTAGE_PYTHON:-/usr/bin/python}" "${path}" "$@" + fi +done +echo "File not found: ${path}" >&2 +exit 1