From 808a773f53612021b72a39ad4d3c7c8eb1a3edf4 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 8 Mar 2024 14:25:12 +0200 Subject: [PATCH] Add extra srpm counter --- source-container-build/app/source_build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source-container-build/app/source_build.py b/source-container-build/app/source_build.py index 50684f0b..a5034524 100644 --- a/source-container-build/app/source_build.py +++ b/source-container-build/app/source_build.py @@ -340,14 +340,15 @@ def _find_prefetch_srpm_archives(): shutil.copy(src, dest) sib_dirs.extra_src_dirs.append(f"{prepared_sources_dir}/{src_dir}") + srpm_counter = itertools.count() for root, filename in _find_prefetch_srpm_archives(): - next(source_counter) + next(srpm_counter) src = f"{root}/{filename}" dest = sib_dirs.rpm_dir log.debug("copy prefetched rpm source %s to %s", src, dest) shutil.copy(src, dest) - gathered = next(source_counter) > 0 + gathered = next(source_counter) + next(srpm_counter) > 0 if not gathered: log.info("There is no prefetched source archive.")