summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen.murphy@suse.de>2018-07-24 11:26:12 +0200
committerColleen Murphy <colleen.murphy@suse.de>2018-08-13 12:00:57 +0200
commit23a6360c257393cc2a976f50248632165c6d318e (patch)
tree22cd3aca95718260a4005b39ef19e29952e05fd5
parentfe5d375e4aedbccb164d490a17fa82e68d5534da (diff)
Add workaround for ethercalc bug
There is a bug with global npm installs[1] which causes node to be unable to find the SocialCalc.js module. We can work around it by symlinking the socialcalc module into the location that node expects to find it[2]. [1] https://github.com/audreyt/ethercalc/issues/542 [2] https://github.com/audreyt/ethercalc/issues/542#issuecomment-330039410 Change-Id: I6f751c19c772cda74f5a7b601238b4519039d257
Notes
Notes (review): Code-Review+2: Clark Boylan <cboylan@sapwetik.org> Code-Review+2: Ian Wienand <iwienand@redhat.com> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 13 Aug 2018 22:56:14 +0000 Reviewed-on: https://review.openstack.org/585292 Project: openstack-infra/puppet-ethercalc Branch: refs/heads/master
-rw-r--r--manifests/init.pp14
1 files changed, 14 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index befe402..6a284e9 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -103,6 +103,20 @@ class ethercalc (
103 require => Anchor['nodejs-package-install'], 103 require => Anchor['nodejs-package-install'],
104 } 104 }
105 105
106 # NOTE(cmurphy) Workaround global install issue
107 # https://github.com/audreyt/ethercalc/issues/542
108 if ($use_nodejs_version == '6.x') {
109 file { "${base_install_dir}/node_modules/ethercalc/node_modules":
110 ensure => directory,
111 require => [File[$base_install_dir], Exec['install-ethercalc']],
112 }
113 file { "${base_install_dir}/node_modules/ethercalc/node_modules/socialcalc":
114 ensure => link,
115 target => "${base_install_dir}/node_modules/socialcalc",
116 require => File["${base_install_dir}/node_modules/ethercalc/node_modules"],
117 }
118 }
119
106 # TODO(ianw): remove this when trusty is dropped 120 # TODO(ianw): remove this when trusty is dropped
107 if $use_upstart { 121 if $use_upstart {
108 122