Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 863605 - dev-lang/ruby-3.1.2-r1: irb requires dev-ruby/rdoc unconditionally
Summary: dev-lang/ruby-3.1.2-r1: irb requires dev-ruby/rdoc unconditionally
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-04 12:01 UTC by James Le Cuirot
Modified: 2023-07-08 20:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2022-08-04 12:01:34 UTC
The ruby ebuild has a conditional dependency on dev-ruby/rdoc, but it is required by irb unconditionally.

$ irb
<internal:/usr/lib64/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- rdoc (LoadError)
        from <internal:/usr/lib64/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /usr/lib64/ruby/3.1.0/irb/input-method.rb:17:in `<top (required)>'
        from /usr/lib64/ruby/3.1.0/irb/context.rb:14:in `require_relative'
        from /usr/lib64/ruby/3.1.0/irb/context.rb:14:in `<top (required)>'
        from /usr/lib64/ruby/3.1.0/irb.rb:16:in `require_relative'
        from /usr/lib64/ruby/3.1.0/irb.rb:16:in `<top (required)>'
        from <internal:/usr/lib64/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/usr/lib64/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /usr/lib64/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:9:in `<top (required)>'
        from /usr/bin/irb:25:in `load'
        from /usr/bin/irb:25:in `<main>'

$ head -n20 /usr/lib64/ruby/3.1.0/irb/input-method.rb
# frozen_string_literal: false
#
#   irb/input-method.rb - input methods used irb
#       $Release Version: 0.9.6$
#       $Revision$
#       by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require_relative 'src_encoding'
require_relative 'magic-file'
require_relative 'completion'
require 'io/console'
require 'reline'
require 'rdoc'

module IRB
  STDIN_FILE_NAME = "(line)" # :nodoc:
Comment 1 Hans de Graaff gentoo-dev Security 2023-06-19 18:34:50 UTC
I'm not sure why a special USE flag was introduced for rdoc. It's been there from the start of the git history, and I don't feel like digging deeper. Given that it defaults to on I expect we can just remove this and install rdoc unconditionally.
Comment 2 Larry the Git Cow gentoo-dev 2023-07-08 20:22:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe44195eb9a513b93f93e747fa615183fe600ee5

commit fe44195eb9a513b93f93e747fa615183fe600ee5
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2023-07-08 17:44:18 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2023-07-08 20:22:26 +0000

    dev-lang/ruby: remove rdoc USE flag
    
    rdoc is a mandatory dependency since irb requires it. Remove
    the USE flag for it and always depend on rdoc.
    
    Closes: https://bugs.gentoo.org/863605
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 dev-lang/ruby/ruby-3.1.4-r4.ebuild | 274 ++++++++++++++++++++++++++++++++++
 dev-lang/ruby/ruby-3.2.2-r4.ebuild | 293 +++++++++++++++++++++++++++++++++++++
 2 files changed, 567 insertions(+)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-08 20:38:15 UTC
Just because I got curious, we added USE=rdoc for bug 333897.