Skip to content

Commit

Permalink
Add hack to fall back to earlier simp-release-community package
Browse files Browse the repository at this point in the history
  • Loading branch information
silug committed Sep 17, 2024
1 parent 1f37dee commit ac164ad
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions lib/simp/beaker_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1555,17 +1555,28 @@ def install_simp_repos(suts, disable = [])

os = fact_on(sut, 'os.name')
release = fact_on(sut, 'os.release.major')
real_release = release.to_i

# Work around Amazon 2 compatibility
if (( os == 'Amazon' ) && ( "#{release}" == '2' ))
release = '7'
end

install_package_unless_present_on(
sut,
'simp-release-community',
"https://download.simp-project.com/simp-release-community.el#{release}.rpm"
)
begin
install_package_unless_present_on(
sut,
'simp-release-community',
"https://download.simp-project.com/simp-release-community.el#{release}.rpm"
)
rescue
# Hack to temporarily support new OS releases
release = (release.to_i - 1).to_s
if release.to_i - real_release > 3
retry
else
raise "Unsupported OS #{os} #{real_release}"
end
end

# TODO: Remove this hack-around when there's a version for AL2
if ( os == 'Amazon' )
Expand Down

0 comments on commit ac164ad

Please sign in to comment.