public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [PATCH 1/5] targets: Rename clst_buildpkgs -> buildpkgs
@ 2020-12-16  3:01 Matt Turner
  2020-12-16  3:01 ` [gentoo-catalyst] [PATCH 2/5] targets: Make ${buildpkgs} an array Matt Turner
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-16  3:01 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Matt Turner

And remove the unnecessary export.

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 targets/stage1/chroot.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index 2a8dc59b..dac52dfc 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/stage1/chroot.sh
@@ -3,7 +3,7 @@
 source /tmp/chroot-functions.sh
 
 # We do this first, so we know our package list for --debug
-export clst_buildpkgs="$(/tmp/build.py)"
+buildpkgs="$(/tmp/build.py)"
 
 # Setup our environment
 [ -n "${clst_BINDIST}" ] && BINDIST="bindist"
@@ -12,7 +12,7 @@ BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)"
 FEATURES="${FEATURES} nodoc noman noinfo"
 
 ## Sanity check profile
-if [ -z "${clst_buildpkgs}" ]
+if [ -z "${buildpkgs}" ]
 then
 	echo "Your profile seems to be broken."
 	echo "Could not build a list of build packages."
@@ -72,7 +72,7 @@ if [ -e ${clst_make_conf} ]; then
 	done
 fi
 
-run_merge "--oneshot ${clst_buildpkgs}"
+run_merge "--oneshot ${buildpkgs}"
 
 # TODO: Drop this when locale-gen in stable glibc supports ROOT.
 #
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-catalyst] [PATCH 2/5] targets: Make ${buildpkgs} an array
  2020-12-16  3:01 [gentoo-catalyst] [PATCH 1/5] targets: Rename clst_buildpkgs -> buildpkgs Matt Turner
@ 2020-12-16  3:01 ` Matt Turner
  2020-12-16  3:01 ` [gentoo-catalyst] [PATCH 3/5] targets: Move ${buildpkgs} error checking closer Matt Turner
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-16  3:01 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Matt Turner

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 targets/stage1/chroot.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index dac52dfc..7e8d5b4e 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/stage1/chroot.sh
@@ -3,7 +3,7 @@
 source /tmp/chroot-functions.sh
 
 # We do this first, so we know our package list for --debug
-buildpkgs="$(/tmp/build.py)"
+buildpkgs=($(/tmp/build.py))
 
 # Setup our environment
 [ -n "${clst_BINDIST}" ] && BINDIST="bindist"
@@ -12,8 +12,7 @@ BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)"
 FEATURES="${FEATURES} nodoc noman noinfo"
 
 ## Sanity check profile
-if [ -z "${buildpkgs}" ]
-then
+if [[ ${#buildpkgs[@]} -eq 0 ]]; then
 	echo "Your profile seems to be broken."
 	echo "Could not build a list of build packages."
 	echo "Double check your ${clst_port_conf}/make.profile link and the 'packages' files."
@@ -72,7 +71,7 @@ if [ -e ${clst_make_conf} ]; then
 	done
 fi
 
-run_merge "--oneshot ${buildpkgs}"
+run_merge "--oneshot ${buildpkgs[@]}"
 
 # TODO: Drop this when locale-gen in stable glibc supports ROOT.
 #
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-catalyst] [PATCH 3/5] targets: Move ${buildpkgs} error checking closer
  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 ` Matt Turner
  2020-12-16  3:01 ` [gentoo-catalyst] [PATCH 4/5] targets: Use interpreter with portage module for build.py Matt Turner
  2020-12-16  3:01 ` [gentoo-catalyst] [PATCH 5/5] catalyst: Remove dead comment Matt Turner
  3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-16  3:01 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Matt Turner

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 targets/stage1/chroot.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index 7e8d5b4e..83cd084d 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/stage1/chroot.sh
@@ -5,12 +5,6 @@ source /tmp/chroot-functions.sh
 # We do this first, so we know our package list for --debug
 buildpkgs=($(/tmp/build.py))
 
-# Setup our environment
-[ -n "${clst_BINDIST}" ] && BINDIST="bindist"
-BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)"
-
-FEATURES="${FEATURES} nodoc noman noinfo"
-
 ## Sanity check profile
 if [[ ${#buildpkgs[@]} -eq 0 ]]; then
 	echo "Your profile seems to be broken."
@@ -19,6 +13,12 @@ if [[ ${#buildpkgs[@]} -eq 0 ]]; then
 	exit 1
 fi
 
+# Setup our environment
+[ -n "${clst_BINDIST}" ] && BINDIST="bindist"
+BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)"
+
+FEATURES="${FEATURES} nodoc noman noinfo"
+
 # We need to ensure the base stage3 has USE="bindist"
 # if BINDIST is set to avoid issues with openssl / openssh
 [ -e ${clst_make_conf} ] && echo "USE=\"${BINDIST} ${USE}\"" >> ${clst_make_conf}
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-catalyst] [PATCH 4/5] targets: Use interpreter with portage module for build.py
  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
  2020-12-16  3:01 ` [gentoo-catalyst] [PATCH 5/5] catalyst: Remove dead comment Matt Turner
  3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-16  3:01 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Matt Turner

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-catalyst] [PATCH 5/5] catalyst: Remove dead comment
  2020-12-16  3:01 [gentoo-catalyst] [PATCH 1/5] targets: Rename clst_buildpkgs -> buildpkgs Matt Turner
                   ` (2 preceding siblings ...)
  2020-12-16  3:01 ` [gentoo-catalyst] [PATCH 4/5] targets: Use interpreter with portage module for build.py Matt Turner
@ 2020-12-16  3:01 ` Matt Turner
  3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-16  3:01 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Matt Turner

Fixes: 220df6a5d255 ("catalyst: Drop ancient portage support")
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 targets/stage1/build.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/stage1/build.py b/targets/stage1/build.py
index fec1162c..85675511 100755
--- a/targets/stage1/build.py
+++ b/targets/stage1/build.py
@@ -9,7 +9,6 @@ from portage.util import grabfile_package, stack_lists
 # this loads files from the profiles ...
 # wrap it here to take care of the different
 # ways portage handles stacked profiles
-# last case is for portage-2.1_pre*
 
 
 def scan_profile(path):
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-16  3:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [gentoo-catalyst] [PATCH 4/5] targets: Use interpreter with portage module for build.py Matt Turner
2020-12-16  3:01 ` [gentoo-catalyst] [PATCH 5/5] catalyst: Remove dead comment Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox