From 8f2b3f3a4af2aaa6baafe279c93588276f26e748 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Fri, 24 Apr 2026 15:06:26 +0100 Subject: [PATCH] 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 --- app-emulation/vagrant/files/vagrant.in | 2 +- .../{vagrant-2.4.0-r1.ebuild => vagrant-2.4.0-r2.ebuild} | 6 ++++-- .../{vagrant-2.4.1.ebuild => vagrant-2.4.1-r1.ebuild} | 6 ++++-- .../{vagrant-2.4.9.ebuild => vagrant-2.4.9-r1.ebuild} | 4 +++- 4 files changed, 12 insertions(+), 6 deletions(-) rename app-emulation/vagrant/{vagrant-2.4.0-r1.ebuild => vagrant-2.4.0-r2.ebuild} (94%) rename app-emulation/vagrant/{vagrant-2.4.1.ebuild => vagrant-2.4.1-r1.ebuild} (94%) rename app-emulation/vagrant/{vagrant-2.4.9.ebuild => vagrant-2.4.9-r1.ebuild} (95%) diff --git a/app-emulation/vagrant/files/vagrant.in b/app-emulation/vagrant/files/vagrant.in index 21d6c0bf3c82d..ed9c84826ccd9 100644 --- a/app-emulation/vagrant/files/vagrant.in +++ b/app-emulation/vagrant/files/vagrant.in @@ -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 diff --git a/app-emulation/vagrant/vagrant-2.4.0-r1.ebuild b/app-emulation/vagrant/vagrant-2.4.0-r2.ebuild similarity index 94% rename from app-emulation/vagrant/vagrant-2.4.0-r1.ebuild rename to app-emulation/vagrant/vagrant-2.4.0-r2.ebuild index 1ed485efc0945..a7483b97bba1e 100644 --- a/app-emulation/vagrant/vagrant-2.4.0-r1.ebuild +++ b/app-emulation/vagrant/vagrant-2.4.0-r2.ebuild @@ -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 diff --git a/app-emulation/vagrant/vagrant-2.4.1.ebuild b/app-emulation/vagrant/vagrant-2.4.1-r1.ebuild similarity index 94% rename from app-emulation/vagrant/vagrant-2.4.1.ebuild rename to app-emulation/vagrant/vagrant-2.4.1-r1.ebuild index a64f74de084a2..80af4348f1121 100644 --- a/app-emulation/vagrant/vagrant-2.4.1.ebuild +++ b/app-emulation/vagrant/vagrant-2.4.1-r1.ebuild @@ -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 diff --git a/app-emulation/vagrant/vagrant-2.4.9.ebuild b/app-emulation/vagrant/vagrant-2.4.9-r1.ebuild similarity index 95% rename from app-emulation/vagrant/vagrant-2.4.9.ebuild rename to app-emulation/vagrant/vagrant-2.4.9-r1.ebuild index 803979dba2764..d68c3ae99bc88 100644 --- a/app-emulation/vagrant/vagrant-2.4.9.ebuild +++ b/app-emulation/vagrant/vagrant-2.4.9-r1.ebuild @@ -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