summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2021-04-28 08:01:20 +0200
committerHans de Graaff <graaff@gentoo.org>2021-04-28 08:05:48 +0200
commit892a0a3a11b97935242d37629d6086af8485ef0f (patch)
tree2358abbddc6541bff896971a72b609addbe1f02a /eclass
parentnet-print/cnrdrvcups-lb: drop 5.20 (diff)
downloadgentoo-892a0a3a11b97935242d37629d6086af8485ef0f.tar.gz
gentoo-892a0a3a11b97935242d37629d6086af8485ef0f.tar.bz2
gentoo-892a0a3a11b97935242d37629d6086af8485ef0f.zip
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@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ruby-fakegem.eclass4
-rw-r--r--eclass/ruby-ng.eclass2
2 files changed, 3 insertions, 3 deletions
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
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index 1933049f4ac2..0dd65b894c83 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