Skip to content

Commit

Permalink
rpmbuild: more reliable SRPM vs RPM build check
Browse files Browse the repository at this point in the history
Fix #2841

The previous check worked for all SRPM methods except for custom
method. It uses `self.chroot` to specify "what chroot to run the
script in". Checking `source_type` should be more reliable.
  • Loading branch information
FrostyX authored and praiskup committed Aug 14, 2023
1 parent 29456e5 commit 26c70e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rpmbuild/copr_rpmbuild/automation/rpm_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def enabled(self):
"""
Do this for every RPM build
"""
return self.chroot is not None
return self.task["source_type"] is None

def run(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions rpmbuild/copr_rpmbuild/automation/srpm_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class SRPMResults(AutomationTool):
@property
def enabled(self):
"""
Do this for every RPM build
Do this for every SRPM build
"""
return not self.chroot
return self.task["source_type"] is not None

def run(self):
"""
Expand Down

1 comment on commit 26c70e4

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RPMs were built successfully.

Please sign in to comment.