From: Jonathan Janzen Date: Sun, 17 Mar 2019 19:32:20 +0000 (-0500) Subject: sys-apps/yarn: Set installationMethod = portage X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=8c875b1d3448263cc4f07b7758ae4e99924a6f56;p=gentoo.git sys-apps/yarn: Set installationMethod = portage By setting the installation method, yarn will do one of two things: 1) For older versions with no message for installationMethod = portage*, no message will be shown. (without this, a message would be shown recommending the user download and install a new version using a shell script) 2) For versions that understand installationMethod = portage*, a message telling the user to update yarn via portage will be shown. *: https://github.com/yarnpkg/yarn/pull/7123 Closes: https://github.com/gentoo/gentoo/pull/11395 Package-Manager: Portage-2.3.62, Repoman-2.3.11 Signed-off-by: Jonathan Janzen Signed-off-by: Zac Medico --- diff --git a/sys-apps/yarn/yarn-1.10.1.ebuild b/sys-apps/yarn/yarn-1.10.1.ebuild index 7bd9670239d3..d2f20fcebb47 100644 --- a/sys-apps/yarn/yarn-1.10.1.ebuild +++ b/sys-apps/yarn/yarn-1.10.1.ebuild @@ -20,6 +20,11 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" +src_prepare() { + default + sed -i 's/"installationMethod": "tar"/"installationMethod": "portage"/g' "${S}/package.json" || die +} + src_install() { local install_dir="/usr/$(get_libdir)/node_modules/yarn" path shebang insinto "${install_dir}" diff --git a/sys-apps/yarn/yarn-1.12.3.ebuild b/sys-apps/yarn/yarn-1.12.3.ebuild index 7bd9670239d3..d2f20fcebb47 100644 --- a/sys-apps/yarn/yarn-1.12.3.ebuild +++ b/sys-apps/yarn/yarn-1.12.3.ebuild @@ -20,6 +20,11 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" +src_prepare() { + default + sed -i 's/"installationMethod": "tar"/"installationMethod": "portage"/g' "${S}/package.json" || die +} + src_install() { local install_dir="/usr/$(get_libdir)/node_modules/yarn" path shebang insinto "${install_dir}" diff --git a/sys-apps/yarn/yarn-1.13.0.ebuild b/sys-apps/yarn/yarn-1.13.0.ebuild index 067e0a48abf4..15ea8904d162 100644 --- a/sys-apps/yarn/yarn-1.13.0.ebuild +++ b/sys-apps/yarn/yarn-1.13.0.ebuild @@ -20,6 +20,11 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" +src_prepare() { + default + sed -i 's/"installationMethod": "tar"/"installationMethod": "portage"/g' "${S}/package.json" || die +} + src_install() { local install_dir="/usr/$(get_libdir)/node_modules/yarn" path shebang insinto "${install_dir}" diff --git a/sys-apps/yarn/yarn-1.15.2.ebuild b/sys-apps/yarn/yarn-1.15.2.ebuild index bfe100149e81..6366d1485234 100644 --- a/sys-apps/yarn/yarn-1.15.2.ebuild +++ b/sys-apps/yarn/yarn-1.15.2.ebuild @@ -20,6 +20,11 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" +src_prepare() { + default + sed -i 's/"installationMethod": "tar"/"installationMethod": "portage"/g' "${S}/package.json" || die +} + src_install() { local install_dir="/usr/$(get_libdir)/node_modules/yarn" path shebang insinto "${install_dir}" diff --git a/sys-apps/yarn/yarn-1.9.4.ebuild b/sys-apps/yarn/yarn-1.9.4.ebuild index b4b5ee7ead80..40f106de033f 100644 --- a/sys-apps/yarn/yarn-1.9.4.ebuild +++ b/sys-apps/yarn/yarn-1.9.4.ebuild @@ -20,6 +20,11 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" +src_prepare() { + default + sed -i 's/"installationMethod": "tar"/"installationMethod": "portage"/g' "${S}/package.json" || die +} + src_install() { local install_dir="/usr/$(get_libdir)/node_modules/yarn" path shebang insinto "${install_dir}"