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 182371382C5 for ; Wed, 16 Dec 2020 16:02:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4A0DDE0905; Wed, 16 Dec 2020 16:02:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 213E4E0905 for ; Wed, 16 Dec 2020 16:02:38 +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 DD7B8340DAE for ; Wed, 16 Dec 2020 16:02:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7EC29C8 for ; Wed, 16 Dec 2020 16:02:35 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1608134546.e9d00e2627bb9bc5376761f6ef26935123aa9479.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: targets/stage1/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/stage1/stage1-chroot.sh X-VCS-Directories: targets/stage1/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: e9d00e2627bb9bc5376761f6ef26935123aa9479 X-VCS-Branch: catalyst-3.0-stable Date: Wed, 16 Dec 2020 16:02:35 +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: 1e5502a0-a5d6-4dba-aedc-613e9f97a571 X-Archives-Hash: 38806cbed774c76523dc7ea4f8c60c47 commit: e9d00e2627bb9bc5376761f6ef26935123aa9479 Author: Matt Turner gentoo org> AuthorDate: Tue Dec 15 03:29:56 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed Dec 16 16:02:26 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e9d00e26 targets: Use interpreter with portage module for build.py Closes: https://bugs.gentoo.org/759685 Signed-off-by: Matt Turner gentoo.org> (cherry picked from commit 37cabf5c536fe8eef16532f18790c1da566aae15) targets/stage1/stage1-chroot.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 4cd0f29f..99539886 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -2,8 +2,13 @@ source /tmp/chroot-functions.sh -# We do this first, so we know our package list for --debug -buildpkgs=($(/tmp/build.py)) +for module_path in /usr/lib/*/site-packages/portage/__init__.py; do + # Find the python interpreter + interpreter=$(echo $module_path | cut -d/ -f4) + + buildpkgs=($($interpreter /tmp/build.py 2>/dev/null)) + [[ $? == 0 ]] && break +done ## Sanity check profile if [[ ${#buildpkgs[@]} -eq 0 ]]; then