Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
nodejs4.3534
nodejs-libpath.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nodejs-libpath.patch of Package nodejs4.3534
Index: node-v4.4.5/lib/module.js =================================================================== --- node-v4.4.5.orig/lib/module.js +++ node-v4.4.5/lib/module.js @@ -453,7 +453,7 @@ Module._initPaths = function() { homeDir = process.env.HOME; } - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; + var paths = ['/usr/lib/node_modules', '/usr/lib/node']; if (homeDir) { paths.unshift(path.resolve(homeDir, '.node_libraries')); Index: node-v4.4.5/tools/install.py =================================================================== --- node-v4.4.5.orig/tools/install.py +++ node-v4.4.5/tools/install.py @@ -6,6 +6,7 @@ import os import re import shutil import sys +from _sysconfigdata import build_time_vars # set at init time node_prefix = '/usr/local' # PREFIX variable from Makefile @@ -81,7 +82,7 @@ def update_shebang(path, shebang): open(path, 'w').write(s) def npm_files(action): - target_path = 'lib/node_modules/npm/' + target_path = build_time_vars["LIB"] + '/node_modules/npm/' # don't install npm if the target path is a symlink, it probably means # that a dev version of npm is installed there @@ -99,17 +100,7 @@ def npm_files(action): if action == uninstall: action([link_path], 'bin/npm') elif action == install: - try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path) - if os.environ.get('PORTABLE'): - # This crazy hack is necessary to make the shebang execute the copy - # of node relative to the same directory as the npm script. The precompiled - # binary tarballs use a prefix of "/" which gets translated to "/bin/node" - # in the regular shebang modifying logic, which is incorrect since the - # precompiled bundle should be able to be extracted anywhere and "just work" - shebang = '/bin/sh\n// 2>/dev/null; exec "`dirname "$0"`/node" "$0" "$@"' - else: - shebang = os.path.join(node_prefix or '/', 'bin/node') - update_shebang(link_path, shebang) + try_symlink("../" + build_time_vars["LIB"] + '/node_modules/npm/bin/npm-cli.js',link_path) else: assert(0) # unhandled action type @@ -128,7 +119,7 @@ def files(action): action(['out/Release/node' + exeext], 'bin/node' + exeext) if 'true' == variables.get('node_use_dtrace'): - action(['out/Release/node.d'], 'lib/dtrace/node.d') + action(['out/Release/node.d'], build_time_vars["LIB"] + '/dtrace/node.d') # behave similarly for systemtap action(['src/node.stp'], 'share/systemtap/tapset/')
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor