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 fedora-copr#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 committed Aug 11, 2023
1 parent 447bb4a commit c2aa300
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

0 comments on commit c2aa300

Please sign in to comment.