Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ruby-common for openSUSE:Factory 
checked in at 2023-05-14 16:31:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ruby-common (Old)
 and      /work/SRC/openSUSE:Factory/.ruby-common.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ruby-common"

Sun May 14 16:31:32 2023 rev:25 rq:1086831 version:3.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ruby-common/ruby-common.changes  2023-05-08 
17:23:48.888528815 +0200
+++ /work/SRC/openSUSE:Factory/.ruby-common.new.1533/ruby-common.changes        
2023-05-14 16:33:56.911843213 +0200
@@ -1,0 +2,23 @@
+Fri May 12 21:28:54 UTC 2023 - Marcus Rueckert <mrueck...@suse.de>
+
+- bump the version so we can require the new version to make it
+  easier to depend on the new functionality
+
+-------------------------------------------------------------------
+Fri May 12 14:21:14 UTC 2023 - Marcus Rueckert <mrueck...@suse.de>
+
+- Support runtime dependencies for the generated subpackages:
+  syntax:
+
+  Requires: rubygem(gemname)
+  Recommends: rubygem(gemname:x) >= x.y
+
+  This will be transformed into
+
+  Requires: rubygem(ruby:<rubyabi>:gemname)
+  Recommends: rubygem(ruby:<rubyabi>:gemname:x) >= x.y
+
+  That way we ensure that every package only requires rubygems for
+  the current ruby version.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ruby-common.spec ++++++
--- /var/tmp/diff_new_pack.eZKD3k/_old  2023-05-14 16:33:57.515846133 +0200
+++ /var/tmp/diff_new_pack.eZKD3k/_new  2023-05-14 16:33:57.523846172 +0200
@@ -22,7 +22,7 @@
 %endif
 
 Name:           ruby-common
-Version:        3.2
+Version:        3.2.1
 Release:        0
 # ruby-macros and ruby-common version
 %define rpm_macros_version 5

++++++ gem_packages.spec.erb ++++++
--- /var/tmp/diff_new_pack.eZKD3k/_old  2023-05-14 16:33:57.631846694 +0200
+++ /var/tmp/diff_new_pack.eZKD3k/_new  2023-05-14 16:33:57.639846733 +0200
@@ -61,7 +61,21 @@
     custom_pkgs
   end
 
-  rb_pkg_abi         = "#{RUBY_ENGINE}:#{RUBY_ENGINE_VERSION}:#{spec.name}"
+  def self.fix_up_rubygem_requires_with_rb_api(rb_api, preamble_text)
+    STDERR.puts(preamble_text)
+    preamble_text.lines.map do |line|
+      if mo = 
/^(?<pre_text>\s*\S+\s*:\s+rubygem\()(?<pkg_info>[^\)]+)(?<post_text>\).*)?$/.match(line)
+        if not(mo[:pkg_info] =~ /^ruby:\d\.\d\.\d/)
+          line = "#{mo[:pre_text]}#{rb_api}:#{mo[:pkg_info]}#{mo[:post_text]}"
+        end
+      end
+      line
+    end.join("\n")
+  end
+
+  rb_api             = "#{RUBY_ENGINE}:#{RbConfig::CONFIG['ruby_version']}"
+
+  rb_pkg_abi         = "#{rb_api}:#{spec.name}"
 
   rb_suffix          = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby/, '')
   rb_pkgname         = RbConfig::CONFIG['ruby_install_name'].gsub(/^ruby\./, 
'')
@@ -104,7 +118,7 @@
 %package -n <%= pkg_basename %><%= config[:version_suffix] %>
 # MANUAL
 <% if config[:main] && config[:main][:preamble] -%>
-<%= config[:main][:preamble] %>
+<%= fix_up_rubygem_requires_with_rb_api(rb_api, config[:main][:preamble]) %>
 <% end -%>
 # /MANUAL
 Summary:        <%= config[:summary] or spec.summary %>

Reply via email to