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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6B62B158089 for ; Thu, 26 Oct 2023 15:53:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A231B2BC02C; Thu, 26 Oct 2023 15:53:14 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7F33F2BC02C for ; Thu, 26 Oct 2023 15:53:14 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 57DFE335C39 for ; Thu, 26 Oct 2023 15:53:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AEE7B12C0 for ; Thu, 26 Oct 2023 15:53:11 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1698335422.ef59ea9a89cfb8bcec388c7ea1a962a4ca0940b6.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch sys-apps/portage/portage-3.0.54-r1.ebuild sys-apps/portage/portage-3.0.54.ebuild X-VCS-Directories: sys-apps/portage/files/ sys-apps/portage/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: ef59ea9a89cfb8bcec388c7ea1a962a4ca0940b6 X-VCS-Branch: master Date: Thu, 26 Oct 2023 15:53:11 +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: 3aafbaaf-5882-4d0c-9762-5f1f8a323c43 X-Archives-Hash: decf14b0eab70de89374cd3a5043f6cf commit: ef59ea9a89cfb8bcec388c7ea1a962a4ca0940b6 Author: Mike Gilbert gentoo org> AuthorDate: Thu Oct 26 15:50:22 2023 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Thu Oct 26 15:50:22 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef59ea9a sys-apps/portage: backport portageq fix Closes: https://bugs.gentoo.org/916287 Closes: https://bugs.gentoo.org/916296 Signed-off-by: Mike Gilbert gentoo.org> ....54-Convert-portageq-helper-to-a-function.patch | 65 ++++++++++++++++++++++ ...tage-3.0.54.ebuild => portage-3.0.54-r1.ebuild} | 3 + 2 files changed, 68 insertions(+) diff --git a/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch b/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch new file mode 100644 index 000000000000..970f49d6a001 --- /dev/null +++ b/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch @@ -0,0 +1,65 @@ +From 27952b1d753ef4ea9bbd2307f8a9a315ad94557d Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Thu, 26 Oct 2023 10:42:00 -0400 +Subject: [PATCH] Convert portageq helper to a function +To: gentoo-portage-dev@lists.gentoo.org + +This keeps it out of PATH in ebuilds to avoid breaking external +utilities that call portageq. + +Bug: https://bugs.gentoo.org/906129 +Bug: https://bugs.gentoo.org/916287 +Bug: https://bugs.gentoo.org/916296 +Signed-off-by: Mike Gilbert +--- + NEWS | 4 +++- + bin/ebuild-helpers/portageq | 8 -------- + bin/phase-helpers.sh | 4 ++++ + bin/portageq-wrapper | 1 - + 4 files changed, 7 insertions(+), 10 deletions(-) + delete mode 100755 bin/ebuild-helpers/portageq + +diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq +deleted file mode 100755 +index bd9d6b044..000000000 +--- a/bin/ebuild-helpers/portageq ++++ /dev/null +@@ -1,8 +0,0 @@ +-#!/usr/bin/env bash +-# Copyright 2009-2023 Gentoo Authors +-# Distributed under the terms of the GNU General Public License v2 +- +-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 +- +-die "'${0##*/}' is not allowed in ebuild scope" +-exit 1 +diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh +index 3f12b3707..6c2ecf0bc 100644 +--- a/bin/phase-helpers.sh ++++ b/bin/phase-helpers.sh +@@ -1006,6 +1006,10 @@ best_version() { + ___best_version_and_has_version_common "$@" + } + ++portageq() { ++ die "portageq is not allowed in ebuild scope" ++} ++ + if ___eapi_has_get_libdir; then + get_libdir() { + local libdir_var="LIBDIR_${ABI}" +diff --git a/bin/portageq-wrapper b/bin/portageq-wrapper +index afa2defe1..047d1d826 100755 +--- a/bin/portageq-wrapper ++++ b/bin/portageq-wrapper +@@ -9,7 +9,6 @@ IFS=":" + set -f # in case ${PATH} contains any shell glob characters + + for path in "${PORTAGE_BIN_PATH}" ${PATH}; do +- [[ ${path} == */portage/*/ebuild-helpers* ]] && continue + [[ -x ${path}/portageq ]] || continue + PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \ + exec "${PORTAGE_PYTHON:-/usr/bin/python}" "${path}/portageq" "$@" +-- +2.42.0 + diff --git a/sys-apps/portage/portage-3.0.54.ebuild b/sys-apps/portage/portage-3.0.54-r1.ebuild similarity index 98% rename from sys-apps/portage/portage-3.0.54.ebuild rename to sys-apps/portage/portage-3.0.54-r1.ebuild index 5bf30b190b87..e117706672e2 100644 --- a/sys-apps/portage/portage-3.0.54.ebuild +++ b/sys-apps/portage/portage-3.0.54-r1.ebuild @@ -111,6 +111,9 @@ pkg_pretend() { } src_prepare() { + local PATCHES=( + "${FILESDIR}/portage-3.0.54-Convert-portageq-helper-to-a-function.patch" + ) default if use prefix-guest; then