commit:     4402fa44a4a01dc6ba6f782533b380d4a096fe58
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 03:51:53 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Dec 16 16:01:28 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4402fa44

targets: Make ${buildpkgs} an array

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
(cherry picked from commit 0a0efebb7834f00cea0bb35d708a56ad635627a8)

 targets/stage1/stage1-chroot.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
index 0f2c0869..df86487e 100755
--- a/targets/stage1/stage1-chroot.sh
+++ b/targets/stage1/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="${clst_myfeatures} nodoc noman noinfo -news"
 
 ## 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.
 #

Reply via email to