diff --git a/pungi/phases/buildinstall.py b/pungi/phases/buildinstall.py index f175bec1..6240730f 100644 --- a/pungi/phases/buildinstall.py +++ b/pungi/phases/buildinstall.py @@ -669,9 +669,16 @@ class BuildinstallThread(WorkerThread): return None compose.log_info("Loading old BUILDINSTALL phase metadata: %s", old_metadata) - with open(old_metadata, "rb") as f: - old_result = pickle.load(f) - return old_result + try: + with open(old_metadata, "rb") as f: + old_result = pickle.load(f) + return old_result + except Exception as e: + compose.log_debug( + "Failed to load old BUILDINSTALL phase metadata %s : %s" + % (old_metadata, str(e)) + ) + return None def _reuse_old_buildinstall_result(self, compose, arch, variant, cmd, pkgset_phase): """ diff --git a/pungi/phases/gather/__init__.py b/pungi/phases/gather/__init__.py index 0474411b..5d2b3c40 100644 --- a/pungi/phases/gather/__init__.py +++ b/pungi/phases/gather/__init__.py @@ -193,9 +193,16 @@ def load_old_gather_result(compose, arch, variant): return None compose.log_info("Loading old GATHER phase results: %s", old_gather_result) - with open(old_gather_result, "rb") as f: - old_result = pickle.load(f) - return old_result + try: + with open(old_gather_result, "rb") as f: + old_result = pickle.load(f) + return old_result + except Exception as e: + compose.log_debug( + "Failed to load old GATHER phase results %s : %s" + % (old_gather_result, str(e)) + ) + return None def reuse_old_gather_packages(compose, arch, variant, package_sets, methods): diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py index 1219677c..90a81019 100644 --- a/pungi/phases/pkgset/sources/source_koji.py +++ b/pungi/phases/pkgset/sources/source_koji.py @@ -819,11 +819,16 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event): compose.paths.work.pkgset_file_cache(compose_tag) ) if old_cache_path: - pkgset.set_old_file_cache( - pungi.phases.pkgset.pkgsets.KojiPackageSet.load_old_file_cache( - old_cache_path + try: + pkgset.set_old_file_cache( + pungi.phases.pkgset.pkgsets.KojiPackageSet.load_old_file_cache( + old_cache_path + ) + ) + except Exception as e: + compose.log_debug( + "Failed to load old cache file %s : %s" % (old_cache_path, str(e)) ) - ) is_traditional = compose_tag in compose.conf.get("pkgset_koji_tag", []) should_inherit = inherit if is_traditional else inherit_modules