commit: 892a0a3a11b97935242d37629d6086af8485ef0f
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 06:01:20 2021 +0000
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 06:05:48 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=892a0a3a
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 <graaff <AT> gentoo.org>
eclass/ruby-fakegem.eclass | 4 ++--
eclass/ruby-ng.eclass | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index 715c1df44f6..19445b10c16 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
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index 1933049f4ac..0dd65b894c8 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -607,7 +607,7 @@ ruby-ng_src_install() {
# @USAGE: rbconfig item
# @RETURN: Returns the value of the given rbconfig item of the Ruby
interpreter in ${RUBY}.
ruby_rbconfig_value() {
- echo $(${RUBY} -rrbconfig -e "puts RbConfig::CONFIG['$1']")
+ echo $(${RUBY} --disable=did_you_mean -rrbconfig -e "puts
RbConfig::CONFIG['$1']")
}
# @FUNCTION: doruby