Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 762427 - dev-ruby/racc-1.5.2 requires dev-ruby/bundler even though it should be patched out
Summary: dev-ruby/racc-1.5.2 requires dev-ruby/bundler even though it should be patche...
Status: RESOLVED DUPLICATE of bug 762190
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-29 13:33 UTC by Karl-Johan Karlsson
Modified: 2020-12-31 06:43 UTC (History)
0 users

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


Attachments
build.log (build.log,2.40 KB, text/plain)
2020-12-29 13:33 UTC, Karl-Johan Karlsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karl-Johan Karlsson 2020-12-29 13:33:39 UTC
Created attachment 680197 [details]
build.log

When recompiling my Ruby system for dev-lang/ruby-3.0.0, dev-ruby/racc-1.5.2 failed with the following message:

>>> Preparing source in /var/tmp/portage/dev-ruby/racc-1.5.2/work ...
 * Running prepare phase for all ...
 * Running prepare phase for all ...
rake aborted!
LoadError: cannot load such file -- bundler/gem_tasks
<internal:/usr/lib64/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/lib64/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/var/tmp/portage/dev-ruby/racc-1.5.2/work/all/racc-1.5.2/Rakefile:3:in `<top (required)>'
(See full trace by running task with --trace)
 * ERROR: dev-ruby/racc-1.5.2::gentoo failed (prepare phase):
 *   (no error message)

I did not yet have a Bundler built for Ruby 3.0, since Portage had decided to build dev-ruby/racc before dev-ruby/bundler:

[ebuild   R    ] dev-ruby/racc-1.5.2  RUBY_TARGETS="ruby30*" 
[ebuild   R    ] dev-ruby/rdoc-6.3.0  RUBY_TARGETS="ruby30*" 
[ebuild   R    ] dev-ruby/bundler-2.2.3  RUBY_TARGETS="ruby30*" 

The ebuild for dev-ruby/racc-1.5.2 contains code that looks like it should remove the dependency on Bundler (and RDoc):

        # Avoid bundler and rdoc dependency to make bootstrapping easier
        sed -i -e '/bundler/ s:^:#:' -e '/rdoc/,/^end/ s:^:#:' Rakefile || die

But this does not seem to have worked, since the "require" line is still there, not commented out:

# find /var/tmp/portage/dev-ruby/racc-1.5.2/ -name Rakefile
/var/tmp/portage/dev-ruby/racc-1.5.2/work/all/racc-1.5.2/Rakefile
# grep bundler /var/tmp/portage/dev-ruby/racc-1.5.2/work/all/racc-1.5.2/Rakefile
require "bundler/gem_tasks"

Manually editing the Rakefile, commenting out everything to do with Bundler and RDoc as it looks like the sed command should have done, makes it build:

   #require "bundler/gem_tasks"                                                                                           
   
   #require 'rdoc/task'                                                                                                   
   #                                                                                                                      
   #RDoc::Task.new(:docs) do |rd|                                                                                         
   #  spec = Gem::Specification.load("racc.gemspec")                                                                      
   #  rd.main = "README.en.rdoc"
   #  rd.rdoc_files.include(spec.files.find_all { |file_name|
   #    file_name =~ /^(bin|lib|ext)/ || file_name !~ /\//
   #  })
   #
   #  title = "#{spec.name}-#{spec.version} Documentation"
   #
   #  rd.options << "-t #{title}"
   #end

Then, using this kludged dev-ruby/racc, Portage can build dev-ruby/rdoc and dev-ruby/bundler normally, after which an "emerge -1 dev-ruby/racc" succeeds.
Comment 1 Agostino Sarubbo gentoo-dev 2020-12-29 18:26:37 UTC

*** This bug has been marked as a duplicate of bug 762190 ***