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