Skip to content

Commit

Permalink
(SIMP-3748) Obsoletes must be '>=' (#96)
Browse files Browse the repository at this point in the history
Discovered that the Obsoletes in the generated spec file was only '>'
not '>=' as it should have been.

It was causing upgrades to break.

SIMP-3748 #comment Fix Obsoletes in RPM spec files

* update test
  • Loading branch information
trevor-vaughan authored and lnemsick-simp committed Oct 6, 2017
1 parent 28ad3c2 commit 55e17c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/simp/rake/build/rpmdeps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def self.generate_custom_rpm_obsoletes(obsoletes_hash, module_metadata)
if Gem::Version.new(module_version) >
Gem::Version.new(version.split('-').first)

rpm_metadata_content << "Obsoletes: #{pkg} > #{version}"
rpm_metadata_content << "Obsoletes: #{pkg} >= #{version}"
else
puts "Ignoring 'obsoletes' for #{pkg}: module version" +
" #{module_version} from metadata.json is not >" +
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/simp/rake/build/rpmdeps_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
requires_file = File.join(mod_dir, 'build', 'rpm_metadata', 'requires')
expect(File.exist?(requires_file)).to be true
expected = <<EOM
Obsoletes: pupmod-oldowner-changed_name_mod > 2.5.0-2016.1
Obsoletes: pupmod-oldowner-changed_name_mod >= 2.5.0-2016.1
Requires: pupmod-foo1-bar1 = 1.0.0
Requires: pupmod-foo2-bar2 > 2.0.0
Requires: pupmod-foo3-bar3 < 3.0.0
Expand Down

0 comments on commit 55e17c6

Please sign in to comment.