public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/, catalyst/base/
Date: Wed, 20 May 2020 02:29:31 +0000 (UTC)	[thread overview]
Message-ID: <1589941763.759584b0ea8c9adac497a1141ac26080ba8ab8a4.mattst88@gentoo> (raw)

commit:     759584b0ea8c9adac497a1141ac26080ba8ab8a4
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 02:22:11 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 02:29:23 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=759584b0

catalyst: Emit bool envars as str(var)

This just capitalizes the values of the environemnt variables, since the
Python literals are capitalized.

Enables the next commit to use this path for other types as well.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py          | 5 +----
 targets/support/chroot-functions.sh | 4 ++--
 targets/support/kmerge.sh           | 4 ++--
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9410f151..e87f181d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1281,10 +1281,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
             elif isinstance(self.settings[x], list):
                 self.env[varname] = ' '.join(self.settings[x])
             elif isinstance(self.settings[x], bool):
-                if self.settings[x]:
-                    self.env[varname] = "true"
-                else:
-                    self.env[varname] = "false"
+                self.env[varname] = str(self.settings[x])
             # This handles a dictionary of objects just one level deep and no deeper!
             # Its currently used only for USE_EXPAND flags which are dictionaries of
             # lists in arch/amd64.py and friends.  If we wanted self.settigs[var]

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index b6e221af..47239b96 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -117,7 +117,7 @@ setup_emerge_opts() {
 	emerge_opts=()
 	bootstrap_opts=()
 
-	if [[ "${clst_VERBOSE}" == "true" ]]
+	if [[ "${clst_VERBOSE}" == "True" ]]
 	then
 		emerge_opts+=(--verbose)
 		bootstrap_opts+=(-v)
@@ -256,7 +256,7 @@ run_merge() {
 	export EPAUSE_IGNORE=0
 	[[ $CONFIG_PROTECT != "-*"* ]] && export CONFIG_PROTECT="-*"
 
-	if [[ "${clst_VERBOSE}" == "true" ]]
+	if [[ "${clst_VERBOSE}" == "True" ]]
 	then
 		echo "ROOT=${ROOT} emerge ${emerge_opts[@]} -pt $@" || exit 1
 		emerge ${emerge_opts[@]} -pt $@ || exit 3

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6b589493..1a5fb458 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -58,7 +58,7 @@ setup_gk_args() {
 		fi
 	fi
 
-	if [[ "${clst_VERBOSE}" == "true" ]]
+	if [[ "${clst_VERBOSE}" == "True" ]]
 	then
 		GK_ARGS+=(--loglevel=2)
 	fi
@@ -85,7 +85,7 @@ genkernel_compile(){
 	esac
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues
-	if [[ "${clst_VERBOSE}" == "true" ]]
+	if [[ "${clst_VERBOSE}" == "True" ]]
 	then
 		gk_callback_opts=(-vN)
 	else


             reply	other threads:[~2020-05-20  2:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20  2:29 Matt Turner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-05-27  6:20 [gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/, catalyst/base/ Matt Turner
2020-05-27  6:22 Matt Turner
2020-10-30 22:41 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-12-19 19:56 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-01-18 19:38 Matt Turner
2021-01-28  1:54 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2021-01-29 23:50 ` [gentoo-commits] proj/catalyst:wip/mattst88 " 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=1589941763.759584b0ea8c9adac497a1141ac26080ba8ab8a4.mattst88@gentoo \
    --to=mattst88@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@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