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 F1964138334 for ; Fri, 14 Sep 2018 05:40:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9C1EE0DCC; Fri, 14 Sep 2018 05:40:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 93B2AE0DCC for ; Fri, 14 Sep 2018 05:40:51 +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 37FCA335D0A for ; Fri, 14 Sep 2018 05:40:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7846E3C3 for ; Fri, 14 Sep 2018 05:40:46 +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: <1536903195.8c58b6b1221a1b8d990a30dd8e2be18c5725ef76.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/kmerge.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 8c58b6b1221a1b8d990a30dd8e2be18c5725ef76 X-VCS-Branch: master Date: Fri, 14 Sep 2018 05:40:46 +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-Archives-Salt: a6569464-b512-42bb-8ef3-b96b58e24cdd X-Archives-Hash: ac6ca7852cdee8913ef0e4bc85a152cf commit: 8c58b6b1221a1b8d990a30dd8e2be18c5725ef76 Author: Matt Turner gentoo org> AuthorDate: Fri Sep 14 05:33:15 2018 +0000 Commit: Matt Turner gentoo org> CommitDate: Fri Sep 14 05:33:15 2018 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8c58b6b1 kmerge.sh: Convert GK_ARGS to a bash array Cleaner in my opinion and is also necessary for the next patch. targets/support/kmerge.sh | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh index dfdb637c..029b2a33 100755 --- a/targets/support/kmerge.sh +++ b/targets/support/kmerge.sh @@ -9,32 +9,34 @@ PKGDIR=/tmp/kerncache/${clst_kname}/ebuilds setup_gk_args() { # default genkernel args - GK_ARGS="${clst_gk_mainargs} \ - ${clst_kernel_gk_kernargs} \ - --cachedir=/tmp/kerncache/${clst_kname}-genkernel_cache-${clst_version_stamp} \ - --no-mountboot \ - --kerneldir=/usr/src/linux \ - --modulespackage=/tmp/kerncache/${clst_kname}-modules-${clst_version_stamp}.tar.bz2 \ - --minkernpackage=/tmp/kerncache/${clst_kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all" + GK_ARGS=( + "${clst_gk_mainargs}" + "${clst_kernel_gk_kernargs[@]}" + --cachedir=/tmp/kerncache/${clst_kname}-genkernel_cache-${clst_version_stamp} + --no-mountboot + --kerneldir=/usr/src/linux + --modulespackage=/tmp/kerncache/${clst_kname}-modules-${clst_version_stamp}.tar.bz2 + --minkernpackage=/tmp/kerncache/${clst_kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all + ) # extra genkernel options that we have to test for if [ -n "${clst_KERNCACHE}" ] then - GK_ARGS="${GK_ARGS} --kerncache=/tmp/kerncache/${clst_kname}-kerncache-${clst_version_stamp}.tar.bz2" + GK_ARGS+=(--kerncache=/tmp/kerncache/${clst_kname}-kerncache-${clst_version_stamp}.tar.bz2) fi if [ -e /var/tmp/${clst_kname}.config ] then - GK_ARGS="${GK_ARGS} --kernel-config=/var/tmp/${clst_kname}.config" + GK_ARGS+=(--kernel-config=/var/tmp/${clst_kname}.config) fi if [ -n "${clst_splash_theme}" ] then - GK_ARGS="${GK_ARGS} --splash=${clst_splash_theme}" + GK_ARGS+=(--splash=${clst_splash_theme}) # Setup case structure for livecd_type case ${clst_livecd_type} in gentoo-release-minimal|gentoo-release-universal) case ${clst_hostarch} in amd64|x86) - GK_ARGS="${GK_ARGS} --splash-res=1024x768" + GK_ARGS+=(--splash-res=1024x768) ;; esac ;; @@ -43,36 +45,36 @@ setup_gk_args() { if [ -d "/tmp/initramfs_overlay/${clst_initramfs_overlay}" ] then - GK_ARGS="${GK_ARGS} --initramfs-overlay=/tmp/initramfs_overlay/${clst_initramfs_overlay}" + GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${clst_initramfs_overlay}) fi if [ -n "${clst_CCACHE}" ] then - GK_ARGS="${GK_ARGS} --kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc" + GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc) fi if [ -n "${clst_linuxrc}" ] then - GK_ARGS="${GK_ARGS} --linuxrc=/tmp/linuxrc" + GK_ARGS+=(--linuxrc=/tmp/linuxrc) fi if [ -n "${clst_busybox_config}" ] then - GK_ARGS="${GK_ARGS} --busybox-config=/tmp/busy-config" + GK_ARGS+=(--busybox-config=/tmp/busy-config) fi if [ "${clst_target}" == "netboot2" ] then - GK_ARGS="${GK_ARGS} --netboot" + GK_ARGS+=(--netboot) if [ -n "${clst_merge_path}" ] then - GK_ARGS="${GK_ARGS} --initramfs-overlay=\"${clst_merge_path}\"" + GK_ARGS+=(--initramfs-overlay="${clst_merge_path}") fi fi if [[ "${clst_VERBOSE}" == "true" ]] then - GK_ARGS="${GK_ARGS} --loglevel=2" + GK_ARGS+=(--loglevel=2) fi } @@ -82,7 +84,7 @@ genkernel_compile(){ setup_gk_args #echo "The GK_ARGS are" - #echo ${GK_ARGS} + #echo ${GK_ARGS[@]} export clst_kernel_merge export clst_initramfs_overlay # Build our list of kernel packages @@ -115,9 +117,9 @@ genkernel_compile(){ if [ "${clst_kernel_merge}" != "" ] then genkernel --callback="emerge ${gk_callback_opts} ${clst_kernel_merge}" \ - ${GK_ARGS} || exit 1 + "${GK_ARGS[@]}" || exit 1 else - genkernel ${GK_ARGS} || exit 1 + genkernel "${GK_ARGS[@]}" || exit 1 fi if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${clst_kname}.config ] then