From f308e87b15f306ab6f17f64b1e7e8295667f61da Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Sun, 3 Jul 2022 23:42:35 -0700 Subject: [PATCH] add more logging --- iso/empanadas/empanadas/util/dnf_utils.py | 4 ++-- iso/empanadas/empanadas/util/iso_utils.py | 2 +- iso/empanadas/empanadas/util/shared.py | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/iso/empanadas/empanadas/util/dnf_utils.py b/iso/empanadas/empanadas/util/dnf_utils.py index 3bd6af4..ab46555 100644 --- a/iso/empanadas/empanadas/util/dnf_utils.py +++ b/iso/empanadas/empanadas/util/dnf_utils.py @@ -1255,7 +1255,7 @@ class RepoSync: } try: - Shared.treeinfo_modify_write(data, imagemap) + Shared.treeinfo_modify_write(data, imagemap, self.log) except Exception as e: self.log.error( '[' + Color.BOLD + Color.RED + 'FAIL' + Color.END + '] ' + @@ -1279,7 +1279,7 @@ class RepoSync: ksdata.clear() try: - Shared.treeinfo_modify_write(ksdata, imagemap) + Shared.treeinfo_modify_write(ksdata, imagemap, self.log) except Exception as e: self.log.error( '[' + Color.BOLD + Color.RED + 'FAIL' + Color.END + '] ' + diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index c61e0fe..f571ba6 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -813,7 +813,7 @@ class IsoBuild: } try: - Shared.treeinfo_modify_write(data, imagemap) + Shared.treeinfo_modify_write(data, imagemap, self.log) except Exception as e: self.log.error( '[' + Color.BOLD + Color.RED + 'FAIL' + Color.END + '] ' + diff --git a/iso/empanadas/empanadas/util/shared.py b/iso/empanadas/empanadas/util/shared.py index 93aa986..8993f1d 100644 --- a/iso/empanadas/empanadas/util/shared.py +++ b/iso/empanadas/empanadas/util/shared.py @@ -107,7 +107,7 @@ class Shared: ti.dump(file_path) @staticmethod - def treeinfo_modify_write(data, imagemap): + def treeinfo_modify_write(data, imagemap, logger): """ Modifies a specific treeinfo with already available data. This is in the case of modifying treeinfo for primary repos or images. @@ -211,10 +211,13 @@ class Shared: del vari # Set default variant + logger.info('Writing treeinfo') ti.dump(treeinfo, main_variant=primary) # Set discinfo + logger.info('Writing discinfo') Shared.discinfo_write(timestamp, fullname, arch, discinfo) # Set media.repo + logger.info('Writing media.repo') Shared.media_repo_write(timestamp, fullname, mediarepo) @staticmethod