From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-catalyst] [PATCH 4/5] targets: Use interpreter with portage module for build.py
Date: Tue, 15 Dec 2020 22:01:30 -0500 [thread overview]
Message-ID: <20201216030131.14158-4-mattst88@gentoo.org> (raw)
In-Reply-To: <20201216030131.14158-1-mattst88@gentoo.org>
Closes: https://bugs.gentoo.org/759685
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
targets/stage1/chroot.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index 83cd084d..6b9bfb3e 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/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
--
2.26.2
next prev parent reply other threads:[~2020-12-16 3:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 3:01 [gentoo-catalyst] [PATCH 1/5] targets: Rename clst_buildpkgs -> buildpkgs Matt Turner
2020-12-16 3:01 ` [gentoo-catalyst] [PATCH 2/5] targets: Make ${buildpkgs} an array Matt Turner
2020-12-16 3:01 ` [gentoo-catalyst] [PATCH 3/5] targets: Move ${buildpkgs} error checking closer Matt Turner
2020-12-16 3:01 ` Matt Turner [this message]
2020-12-16 3:01 ` [gentoo-catalyst] [PATCH 5/5] catalyst: Remove dead comment Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201216030131.14158-4-mattst88@gentoo.org \
--to=mattst88@gentoo.org \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox