#65 Add ruby-default-gems dependency on irb.
Merged 3 years ago by vondruch. Opened 3 years ago by jaruga.

file modified
+7
@@ -311,6 +311,9 @@

  Version:    %{irb_version}

  Requires:   ruby(release)

  Requires:   ruby(rubygems) >= %{rubygems_version}

+ # ruby-default-gems is required to run irb.

+ # https://bugs.ruby-lang.org/issues/16951

+ Requires:   ruby-default-gems >= %{ruby_version}

  Provides:   irb = %{version}-%{release}

  Provides:   rubygem(irb) = %{version}-%{release}

  # Obsoleted by Ruby 2.6 in F30 timeframe.
@@ -1290,6 +1293,10 @@

  

  

  %changelog

+ * Wed Jun 24 2020 Jun Aruga <jaruga@redhat.com> - 2.7.1-132

+ - Add ruby-default-gems dependency on irb.

+   Resolves: rhbz#1850541

+ 

  * Wed Jun 24 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.1-132

  - Fix `require` behavior allowing to load libraries multiple times.

    Resolves: rhbz#1835836

Resolves: rhbz#1850541

  • Install: ok
  • Test on mock: ok (irb command is executed without error).

ruby-default-gems >= 2.7.1 is added.

<mock-chroot> sh-5.0# rpm -q -R rubygem-irb
/usr/bin/ruby
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1
ruby(release)
ruby(rubygems) >= 3.1.2
ruby-default-gems >= 2.7.1

I thought you would reference the upstream ticket, i.e. https://bugs.ruby-lang.org/issues/16951

The BZ ticket will still be referenced in changelog and commit message, that should be enough.

This is minor nit, but I am not sure about the %{name}, is there any additional value? Wouldn't be the plain ruby-default-gems more readable? Or perhaps you foresee this useful for RHSCL?

I thought you would reference the upstream ticket, i.e. https://bugs.ruby-lang.org/issues/16951

Sure, I will change it.

This is minor nit, but I am not sure about the %{name}, is there any additional value? Wouldn't be the plain ruby-default-gems more readable? Or perhaps you foresee this useful for RHSCL?

I agree on that the current code is not so readable.

This is the result to align with the following other parts where ruby- subpackages or main package are used as %{name}.

Line 177:

Requires: %{name}-libs%{?_isa} = %{version}-%{release}

Line 218

Requires:   %{name}%{?_isa} = %{version}-%{release}

But I noticed the parts where ruby- is directly used.

%package -n rubygem-irb
...
Provides:   ruby-irb = %{ruby_version}-%{release}
Obsoletes:  ruby-irb < %{ruby_version}-%{release}

So, I will change the part with the way you suggested.

rebased onto 064a051

3 years ago

I rebased after testing it again.

This is minor nit, but I am not sure about the %{name}, is there any additional value? Wouldn't be the plain ruby-default-gems more readable? Or perhaps you foresee this useful for RHSCL?

I agree on that the current code is not so readable.
This is the result to align with the following other parts where ruby- subpackages or main package are used as %{name}.

Ah, good point 🤦‍♂️ Maybe we should do something about it one day to be more consistent. The guidelines suggest to use macro everywhere, but I don't personally think it is good ideal.

Ah, good point 🤦‍♂️ Maybe we should do something about it one day to be more consistent. The guidelines suggest to use macro everywhere, but I don't personally think it is good ideal.

I personally would prefer using %{name} for that. Because %{name} is used not only for a part of a subpackage name, but also for other parts in ruby.spec.
When Requires: %{name}-default-gems >= %{ruby_version} is not so readable, the other parts using %{name} are also not so readable.

I agree on doing something about it one day.
I am okay for any choice of either using %{name} or not using %{name}. Because the consistency is more important, as you said.

I rebased after testing it again.

Sorry, I am not sure I correctly understood this. Have you tested the PR and is it ready for merge from your side? Or is there anything else to do?

Sorry, I am not sure I correctly understood this. Have you tested the PR and is it ready for merge from your side? Or is there anything else to do?

The rebase is for 2 points you mentioned.

  • I changed the comment URL from the bugzilla URL to https://bugs.ruby-lang.org/issues/16951 .
  • I changed from Requires: %{name}-default-gems >= %{ruby_version} to Requires: ruby-default-gems >= %{ruby_version}.

Yes I tested. And nothing else to do.

Pull-Request has been merged by vondruch

3 years ago