Skip to content

Commit

Permalink
frontend: skip ExcludeArch and ExclusiveArch for resubmitted builds
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Aug 11, 2023
1 parent 727b40b commit 59262eb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frontend/coprs_frontend/coprs/logic/builds_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,18 @@ def create_new_from_other_build(cls, user, copr, source_build,
build.pkg_version = source_build.pkg_version
build.resubmitted_from_id = source_build.id

# Skip previously skipped chroots (ExcludeArch, ExclusiveArch, etc)
# We need this only for "SRPM upload" builds because they completely
# skip the SRPM build phase. Other build methods build SRPM pacakge
# again and send the parsed results to backend and frontend. Therefore
# from this point of view, there is no difference between resubmitted
# and not-resubmitted builds.
skipped = [ch.name for ch in source_build.build_chroots
if ch.status == StatusEnum("skipped")]
for chroot in build.build_chroots:
if chroot.name in skipped:
chroot.status = StatusEnum("skipped")

return build

@classmethod
Expand Down

0 comments on commit 59262eb

Please sign in to comment.