Skip to content

Commit

Permalink
Add extra srpm counter
Browse files Browse the repository at this point in the history
  • Loading branch information
skabashnyuk committed Mar 8, 2024
1 parent a23e642 commit 808a773
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source-container-build/app/source_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit 808a773

Please sign in to comment.