From 892a0a3a11b97935242d37629d6086af8485ef0f Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Wed, 28 Apr 2021 08:01:20 +0200 Subject: eclass/ruby-{ng,fakegem}.eclass: fix did_you_mean issues The default gem did_you_mean was unbundled in 2e225cca1aa95b8a5e54cbd855f17dbaf88940d9 to fix bug 758464. Unfortunately ruby 2.7 fails when did_you_mean is not present at all, making it impossible to install this ruby version. 2.6 and 3.0 are not affected by this. With this change we explicitly disable the did_you_mean gem when invoking ruby in the eclasses. Thanks to naota for diagnosing the issue and coming up with a solution. Closes: https://bugs.gentoo.org/705346 Signed-off-by: Hans de Graaff --- eclass/ruby-fakegem.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'eclass/ruby-fakegem.eclass') diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index 715c1df44f6c..19445b10c164 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -290,7 +290,7 @@ ruby_fakegem_install_gemspec() { # RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification # in a way similar to packaging the gemspec file. ruby_fakegem_gemspec_gemspec() { - ${RUBY} -e "puts eval(File::open('$1').read).to_ruby" > $2 + ${RUBY} --disable=did_you_mean -e "puts eval(File::open('$1').read).to_ruby" > $2 } # @FUNCTION: ruby_fakegem_metadata_gemspec @@ -300,7 +300,7 @@ ruby_fakegem_gemspec_gemspec() { # the metadata distributed by the gem itself. This is similar to how # rubygems creates an installation from a .gem file. ruby_fakegem_metadata_gemspec() { - ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2 + ${RUBY} --disable=did_you_mean -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2 } # @FUNCTION: ruby_fakegem_genspec -- cgit v1.2.3-65-gdbad