From 0ac1b0ba9610b36882fb7c7281c0614acab1f9d5 Mon Sep 17 00:00:00 2001 From: nazunalika Date: Mon, 27 Jun 2022 00:40:28 -0700 Subject: [PATCH] try logging some stuff --- .../empanadas/templates/buildExtraImage.tmpl.sh | 10 +++++----- iso/empanadas/empanadas/util/iso_utils.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/iso/empanadas/empanadas/templates/buildExtraImage.tmpl.sh b/iso/empanadas/empanadas/templates/buildExtraImage.tmpl.sh index 91631b2..0fedfca 100644 --- a/iso/empanadas/empanadas/templates/buildExtraImage.tmpl.sh +++ b/iso/empanadas/empanadas/templates/buildExtraImage.tmpl.sh @@ -2,7 +2,7 @@ set -ex {% if extra_iso_mode == "podman" %} -{{ lorax_pkg_cmd }} | tee -a {{ log_path }} +{{ lorax_pkg_cmd }} mkdir -p {{ compose_work_iso_dir }}/{{ arch }} cd {{ compose_work_iso_dir }}/{{ arch }} {% else %} @@ -14,11 +14,11 @@ fi {% endif %} -{{ make_image }} | tee -a {{ log_path }} +{{ make_image }} -{{ isohybrid }} | tee -a {{ log_path }} +{{ isohybrid }} -{{ implantmd5 }} | tee -a {{ log_path }} +{{ implantmd5 }} -{{ make_manifest }} | tee -a {{ log_path }} +{{ make_manifest }} diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index 48255fd..29d5dfd 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -973,7 +973,7 @@ class IsoBuild: if not os.path.exists(log_root): os.makedirs(log_root, exist_ok=True) - log_path = '{}/{}-{}.log'.format(log_root, arch, image) + log_path_command = '| tee -a {}/{}-{}.log'.format(log_root, arch, image) # This is kind of a hack. Installing xorrisofs sets the alternatives to # it, so backwards compatibility is sort of guaranteed. But we want to @@ -1008,8 +1008,9 @@ class IsoBuild: image ) - lorax_pkg_cmd = '/usr/bin/dnf install {} -y'.format( - ' '.join(required_pkgs) + lorax_pkg_cmd = '/usr/bin/dnf install {} -y {}'.format( + ' '.join(required_pkgs), + log_path_command ) mock_iso_template_output = mock_iso_template.render( @@ -1045,7 +1046,7 @@ class IsoBuild: 'iso_level': self.iso_map['iso_level'], } - make_image = self._get_make_image_cmd(opts) + make_image = '{} {}'.format(self._get_make_image_cmd(opts), log_path_command) isohybrid = self._get_isohybrid_cmd(opts) implantmd5 = self._get_implantisomd5_cmd(opts) make_manifest = self._get_manifest_cmd(opts) @@ -1059,7 +1060,6 @@ class IsoBuild: implantmd5=implantmd5, make_manifest=make_manifest, lorax_pkg_cmd=lorax_pkg_cmd, - log_path=log_path, ) if opts['use_xorrisofs']: