1 |
Closes: https://bugs.gentoo.org/759685 |
2 |
Signed-off-by: Matt Turner <mattst88@g.o> |
3 |
--- |
4 |
targets/stage1/chroot.sh | 9 +++++++-- |
5 |
1 file changed, 7 insertions(+), 2 deletions(-) |
6 |
|
7 |
diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh |
8 |
index 83cd084d..6b9bfb3e 100755 |
9 |
--- a/targets/stage1/chroot.sh |
10 |
+++ b/targets/stage1/chroot.sh |
11 |
@@ -2,8 +2,13 @@ |
12 |
|
13 |
source /tmp/chroot-functions.sh |
14 |
|
15 |
-# We do this first, so we know our package list for --debug |
16 |
-buildpkgs=($(/tmp/build.py)) |
17 |
+for module_path in /usr/lib/*/site-packages/portage/__init__.py; do |
18 |
+ # Find the python interpreter |
19 |
+ interpreter=$(echo $module_path | cut -d/ -f4) |
20 |
+ |
21 |
+ buildpkgs=($($interpreter /tmp/build.py 2>/dev/null)) |
22 |
+ [[ $? == 0 ]] && break |
23 |
+done |
24 |
|
25 |
## Sanity check profile |
26 |
if [[ ${#buildpkgs[@]} -eq 0 ]]; then |
27 |
-- |
28 |
2.26.2 |