sys-apps/yarn: Set installationMethod = portage
authorJonathan Janzen <jjjonjanzen@gmail.com>
Sun, 17 Mar 2019 19:32:20 +0000 (14:32 -0500)
committerZac Medico <zmedico@gentoo.org>
Sun, 17 Mar 2019 21:12:20 +0000 (14:12 -0700)
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 <jjjonjanzen@gmail.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
sys-apps/yarn/yarn-1.10.1.ebuild
sys-apps/yarn/yarn-1.12.3.ebuild
sys-apps/yarn/yarn-1.13.0.ebuild
sys-apps/yarn/yarn-1.15.2.ebuild
sys-apps/yarn/yarn-1.9.4.ebuild

index 7bd9670239d3e28fc56517d58452be3eb207b614..d2f20fcebb47f4082de1b7585402c566f3d8f8d1 100644 (file)
@@ -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}"
index 7bd9670239d3e28fc56517d58452be3eb207b614..d2f20fcebb47f4082de1b7585402c566f3d8f8d1 100644 (file)
@@ -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}"
index 067e0a48abf48ba0a982cbf6ed0e7f5d7cc66317..15ea8904d16262e9d1463ad9d4f6ed747413c541 100644 (file)
@@ -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}"
index bfe100149e816519e25e36e01526257360ae5d1a..6366d148523469fb23bb11811e266b090113d8e7 100644 (file)
@@ -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}"
index b4b5ee7ead8095406b50cd9e7f8ce772d6bb56a7..40f106de033fa987db9a8a62130c020686e9e8d2 100644 (file)
@@ -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}"