app-emulation/vagrant: Only try Ruby versions enabled for this package

2.4.9 wasn't even trying ruby34 at all even though it was present in USE_RUBY.
This doesn't try the most preferable version first, but this is probably good
enough. I suspect this should use ruby-single.eclass anyway.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
James Le Cuirot
2026-04-24 15:06:26 +01:00
parent 0e56979d39
commit 8f2b3f3a4a
4 changed files with 12 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
# Vagrant installation directory. This sets up proper environmental variables
# so that everything loads and compiles to proper directories.
for r in ruby33 ruby32 ruby31 ruby30 ruby27 ruby26; do
for r in @RUBY_VERSIONS@; do
# not all ruby versions are guaranteed to be installed
if ! command -v "${r}" >/dev/null 2>&1; then
continue

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -85,7 +85,9 @@ all_ruby_prepare() {
-e '/ruby_dep/ s:^#*:#:' \
-i ${PN}.gemspec || die
sed -e "s/@VAGRANT_VERSION@/${PV}/g" "${FILESDIR}/${PN}.in" > "${PN}" || die
sed -e "s/@VAGRANT_VERSION@/${PV}/g" \
-e "s/@RUBY_VERSIONS@/$(ruby_get_use_implementations)/g" \
"${FILESDIR}/${PN}.in" > "${PN}" || die
sed -i -e 's/format documentation/format progress/' tasks/test.rake || die

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -85,7 +85,9 @@ all_ruby_prepare() {
-e '/ruby_dep/ s:^#*:#:' \
-i ${PN}.gemspec || die
sed -e "s/@VAGRANT_VERSION@/${PV}/g" "${FILESDIR}/${PN}.in" > "${PN}" || die
sed -e "s/@VAGRANT_VERSION@/${PV}/g" \
-e "s/@RUBY_VERSIONS@/$(ruby_get_use_implementations)/g" \
"${FILESDIR}/${PN}.in" > "${PN}" || die
sed -i -e 's/format documentation/format progress/' tasks/test.rake || die

View File

@@ -86,7 +86,9 @@ all_ruby_prepare() {
-e '/ruby_dep/ s:^#*:#:' \
-i ${PN}.gemspec || die
sed -e "s/@VAGRANT_VERSION@/${PV}/g" "${FILESDIR}/${PN}.in" > "${PN}" || die
sed -e "s/@VAGRANT_VERSION@/${PV}/g" \
-e "s/@RUBY_VERSIONS@/$(ruby_get_use_implementations)/g" \
"${FILESDIR}/${PN}.in" > "${PN}" || die
sed -i -e 's/format documentation/format progress/' tasks/test.rake || die