Bug 1120898 - _mri_ is not the default runtime
Summary: _mri_ is not the default runtime
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rubypick
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-18 00:00 UTC by Michael Schwendt
Modified: 2014-07-21 07:41 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-18 12:59:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Schwendt 2014-07-18 00:00:58 UTC
File /usr/share/doc/rubypick/README.md claims the default runtime would be _mri_.

On the contrary, java is spawned by default for a spam filter script with a /usr/bin/ruby shebang, slowing down its execution a lot. Verifying the invocation:

$ ruby /bin/bsfilter 
LoadError: no such file to load -- sdbm
      require at org/jruby/RubyKernel.java:1027
      require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55
  get_options at /bin/bsfilter:3179
        setup at /bin/bsfilter:3341
       (root) at /bin/bsfilter:3492

And:

$ ruby _mri_ /bin/bsfilter 
Couldn't find /usr/bin/ruby-mri, use 'yum install /usr/bin/ruby-mri' to install it.

Version-Release number of selected component (if applicable):
$ rpm -q rubypick
rubypick-1.1.1-1.fc20.noarch

Something's not right here, and it hasn't been like that before.

Comment 1 Vít Ondruch 2014-07-18 12:59:19 UTC
Yes, it is default runtime in case it is installed. Since you have not installed ruby package, it can't be used. Once you'll do what is suggested, then it will be preferred.

Not sure how jruby get installed onto your system, but if you had no ruby implementation installed before, then yum/dnf decides what will be installed, if package depends on ruby(release) virtual provide. It would be nice, if yum/dnf could somehow prioritize packages, which provides the same provide.

Comment 2 Michael Schwendt 2014-07-19 22:44:18 UTC
> Not sure how jruby get installed onto your system

Something may have pulled it in as there are many hundreds of packages that depend on jruby somehow whereas only 120 packages depend on ruby:

# repoquery --whatprovides '/usr/bin/ruby'
rubypick-0:1.1.1-1.fc20.noarch
rubypick-0:1.1.0-2.fc20.noarch

# repoquery --whatprovides 'ruby(runtime_executable)'
ruby-0:2.0.0.247-15.fc20.i686
ruby-0:2.0.0.247-15.fc20.x86_64
jruby-0:1.7.2-5.fc20.noarch
ruby-0:2.0.0.353-16.fc20.i686
ruby-0:2.0.0.353-16.fc20.x86_64

# repoquery --whatrequires ruby|wc -l
120

# repoquery --whatrequires jruby|wc -l
680

# repoquery --exactdeps --whatrequires jruby
jruby-devel-0:1.7.2-5.fc20.noarch
jruby-javadoc-0:1.7.2-5.fc20.noarch
jruby-yecht-0:1.7.2-5.fc20.noarch

Comment 3 Vít Ondruch 2014-07-21 07:41:35 UTC
Well, I opened this ticket:

https://bugzilla.redhat.com/show_bug.cgi?id=1121538

This could help to narrow the issue. I'd say that jruby is preferred just because 'j' comes earlier in alphabet then 'r' and that is quite poor reason to prefer some package over other :/


Note You need to log in before you can comment on or make changes to this bug.