Skip to content

Commit

Permalink
Use the opensuse template on all openSUSE variants
Browse files Browse the repository at this point in the history
At the moment you have to manually specify the template file name on Leap, as
gem2rpm tries to use the opensuse-leap template on Leap, which does not
exist. Therefore we fallback to the opensuse template instead.

(cherry picked from commit 2f34876)
  • Loading branch information
dcermak committed Jun 20, 2023
1 parent 8f728f6 commit adf719b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/gem2rpm
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if template_file.nil? && File.exist?('/etc/os-release')
File.read('/etc/os-release').each_line(chomp: true) do |line|
line.match(%r{^ID=(.*)$}) { |m| template_file = m[1] }
end
if template_file.eql? '"opensuse-tumbleweed"'
$stderr.puts 'Using template opensuse on Tumbleweed'
if template_file.match? '^"opensuse'
$stderr.puts 'Using template opensuse on openSUSE variant'
template_file = 'opensuse'
end
end
Expand Down

0 comments on commit adf719b

Please sign in to comment.