enable logs in general

This commit is contained in:
Louis Abel 2022-06-27 00:26:42 -07:00
parent 436caefcbd
commit 8302604f7d
Signed by: label
GPG Key ID: B37E62D143879B36
2 changed files with 21 additions and 14 deletions

View File

@ -2,27 +2,23 @@
set -ex set -ex
{% if extra_iso_mode == "podman" %} {% if extra_iso_mode == "podman" %}
{{ lorax_pkg_cmd }} {{ lorax_pkg_cmd }} | tee -a {{ log_path }}
mkdir /builddir mkdir -p {{ compose_work_iso_dir }}/{{ arch }}
cd {{ compose_work_iso_dir }}/{{ arch }}
{% else %}
cd /builddir
{% endif %} {% endif %}
cd /builddir
if ! TEMPLATE="$($(head -n1 $(which lorax) | cut -c3-) -c 'import pylorax; print(pylorax.find_templates())')"; then if ! TEMPLATE="$($(head -n1 $(which lorax) | cut -c3-) -c 'import pylorax; print(pylorax.find_templates())')"; then
TEMPLATE="/usr/share/lorax" TEMPLATE="/usr/share/lorax"
fi fi
{{ make_image }} {{ make_image }} | tee -a {{ log_path }}
{{ isohybrid }} {{ isohybrid }} | tee -a {{ log_path }}
{{ implantmd5 }} {{ implantmd5 }} | tee -a {{ log_path }}
{{ make_manifest }} {{ make_manifest }} | tee -a {{ log_path }}
{% if extra_iso_mode == "podman" %}
mkdir -p {{ compose_work_iso_dir }}/{{ arch }}
cp /builddir/*.iso {{ compose_work_iso_dir }}/{{ arch }}
cp /builddir/*.iso.manifest {{ compose_work_iso_dir }}/{{ arch }}
#cp /builddir/*.log {{ compose_work_iso_dir }}/{{ arch }}
{% endif %}

View File

@ -933,7 +933,6 @@ class IsoBuild:
if self.extra_iso_mode == 'local': if self.extra_iso_mode == 'local':
self._extra_iso_local_run(a, y, work_root) self._extra_iso_local_run(a, y, work_root)
print()
elif self.extra_iso_mode == 'podman': elif self.extra_iso_mode == 'podman':
continue continue
else: else:
@ -965,6 +964,17 @@ class IsoBuild:
iso_template_path = '{}/buildExtraImage-{}-{}.sh'.format(entries_dir, arch, image) iso_template_path = '{}/buildExtraImage-{}-{}.sh'.format(entries_dir, arch, image)
xorriso_template_path = '{}/xorriso-{}-{}.txt'.format(entries_dir, arch, image) xorriso_template_path = '{}/xorriso-{}-{}.txt'.format(entries_dir, arch, image)
log_root = os.path.join(
work_root,
"logs",
self.date_stamp
)
if not os.path.exists(log_root):
os.makedirs(log_root, exist_ok=True)
log_path = '{}/{}-{}.log'.format(log_root, arch, image)
# This is kind of a hack. Installing xorrisofs sets the alternatives to # This is kind of a hack. Installing xorrisofs sets the alternatives to
# it, so backwards compatibility is sort of guaranteed. But we want to # it, so backwards compatibility is sort of guaranteed. But we want to
# emulate as close as possible to what pungi does, so unless we # emulate as close as possible to what pungi does, so unless we
@ -1052,6 +1062,7 @@ class IsoBuild:
implantmd5=implantmd5, implantmd5=implantmd5,
make_manifest=make_manifest, make_manifest=make_manifest,
lorax_pkg_cmd=lorax_pkg_cmd, lorax_pkg_cmd=lorax_pkg_cmd,
log_path=log_path,
) )
if opts['use_xorrisofs']: if opts['use_xorrisofs']: