diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2022-01-14 14:22:14 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-01-18 09:01:51 -0800 |
commit | a7fd038743aec62af4212547abaff17ad0d2e11a (patch) | |
tree | bcd67c76f2eb71229af1522a37bafe36262ea3dd /meta-oe/recipes-devtools/nodejs | |
parent | 4229bddf42ba36ff72ace7d1cb9bc2220d54cfaa (diff) | |
download | meta-openembedded-a7fd038743aec62af4212547abaff17ad0d2e11a.tar.gz |
nodejs: Drop workaround for an absolute path in the npm shebang
The rewrite of the npm shebang to use an absolute path was removed in
version 7.0.0.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/nodejs')
-rw-r--r-- | meta-oe/recipes-devtools/nodejs/nodejs_16.11.1.bb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_16.11.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_16.11.1.bb index f31648082..318cb961f 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_16.11.1.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_16.11.1.bb | |||
@@ -160,20 +160,6 @@ do_install () { | |||
160 | } | 160 | } |
161 | 161 | ||
162 | do_install:append:class-native() { | 162 | do_install:append:class-native() { |
163 | # use node from PATH instead of absolute path to sysroot | ||
164 | # node-v0.10.25/tools/install.py is using: | ||
165 | # shebang = os.path.join(node_prefix, 'bin/node') | ||
166 | # update_shebang(link_path, shebang) | ||
167 | # and node_prefix can be very long path to bindir in native sysroot and | ||
168 | # when it exceeds 128 character shebang limit it's stripped to incorrect path | ||
169 | # and npm fails to execute like in this case with 133 characters show in log.do_install: | ||
170 | # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node | ||
171 | # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js | ||
172 | # use sed on npm-cli.js because otherwise symlink is replaced with normal file and | ||
173 | # npm-cli.js continues to use old shebang | ||
174 | if [[ -f "${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js" ]]; then | ||
175 | sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js | ||
176 | fi | ||
177 | # Install the native binaries to provide it within sysroot for the target compilation | 163 | # Install the native binaries to provide it within sysroot for the target compilation |
178 | install -d ${D}${bindir} | 164 | install -d ${D}${bindir} |
179 | install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque | 165 | install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque |
@@ -185,12 +171,6 @@ do_install:append:class-native() { | |||
185 | install -m 0755 ${S}/out/Release/node_mksnapshot ${D}${bindir}/node_mksnapshot | 171 | install -m 0755 ${S}/out/Release/node_mksnapshot ${D}${bindir}/node_mksnapshot |
186 | } | 172 | } |
187 | 173 | ||
188 | do_install:append:class-target() { | ||
189 | if [[ -f "${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js" ]]; then | ||
190 | sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js | ||
191 | fi | ||
192 | } | ||
193 | |||
194 | PACKAGES =+ "${PN}-npm" | 174 | PACKAGES =+ "${PN}-npm" |
195 | FILES:${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx" | 175 | FILES:${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx" |
196 | RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ | 176 | RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ |