Skip to content

Commit

Permalink
hasCompat simplify
Browse files Browse the repository at this point in the history
Fedora case was always false (was only comparing one char), but
given that we're only doing 38+ it doesn't matter any more.

Compact on rejections.
  • Loading branch information
grooverdan committed May 23, 2024
1 parent 2795826 commit b9a9c26
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,11 @@ def hasEco(props):
def hasCompat(step):
builderName = str(step.getProperty("buildername"))

# For s390x there are no compat files
if "s390x" in builderName:
# For s390x and the listed distros there are no compat files
if any(builderName.find(sub) != -1 for sub in {"s390x", "fedora", "alma", "rocky"}):
return False
if "rhel" in builderName or "centos" in builderName:
return step.getProperty("rpm_type")[-1] in ["7", "8"]
if "fedora" in builderName:
return step.getProperty("rpm_type")[-1] in ["35", "36"]
if "alma" in builderName or "rocky" in builderName:
return False
return True


Expand Down

0 comments on commit b9a9c26

Please sign in to comment.