You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
144 lines
5.2 KiB
144 lines
5.2 KiB
Index: lib/build.js |
|
--- lib/build.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/build.js 2017-01-29 13:32:12.664684000 +0100 |
|
@@ -230,7 +230,7 @@ |
|
function linkMans (pkg, folder, parent, gtop, cb) { |
|
if (!pkg.man || !gtop || process.platform === 'win32') return cb() |
|
|
|
- var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man') |
|
+ var manRoot = path.resolve(npm.config.get('prefix'), 'man') |
|
log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot) |
|
|
|
// make sure that the mans are unique. |
|
Index: lib/cache/add-local-tarball.js |
|
--- lib/cache/add-local-tarball.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/cache/add-local-tarball.js 2017-01-29 13:32:12.664843000 +0100 |
|
@@ -157,13 +157,13 @@ |
|
// or the root dir, if none had to be created, so that |
|
// we know that we get all the children. |
|
function chown () { |
|
- chownr(created || root, cs.uid, cs.gid, done) |
|
+ done(null) |
|
} |
|
|
|
if (er) return cb(er) |
|
var read = fs.createReadStream(tgz) |
|
var write = writeStreamAtomic(target, { mode: npm.modes.file }) |
|
- var fin = cs.uid && cs.gid ? chown : done |
|
+ var fin = cs.uid && cs.gid ? done : done |
|
read.on('error', cb).pipe(write).on('error', cb).on('close', fin) |
|
}) |
|
}) |
|
Index: lib/cache/add-local.js |
|
--- lib/cache/add-local.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/cache/add-local.js 2017-01-29 13:32:12.664974000 +0100 |
|
@@ -123,12 +123,7 @@ |
|
return wrapped(er) |
|
} |
|
|
|
- if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) return wrapped() |
|
- |
|
- chownr(made || tgz, cs.uid, cs.gid, function (er) { |
|
- if (er && er.code === 'ENOENT') return wrapped() |
|
- wrapped(er) |
|
- }) |
|
+ wrapped() |
|
}) |
|
} |
|
}) |
|
Index: lib/cache/add-remote-git.js |
|
--- lib/cache/add-remote-git.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/cache/add-remote-git.js 2017-01-29 13:32:12.665138000 +0100 |
|
@@ -233,19 +233,7 @@ |
|
return cb(er) |
|
} |
|
|
|
- chownr(cachedRemote, cs.uid, cs.gid, function (er) { |
|
- if (er) { |
|
- log.error( |
|
- 'setPermissions', |
|
- 'Failed to change git repository ownership under npm cache for', |
|
- cachedRemote |
|
- ) |
|
- return cb(er) |
|
- } |
|
- |
|
- log.verbose('setPermissions', from, 'set permissions on', cachedRemote) |
|
resolveHead(from, cloneURL, treeish, cachedRemote, cb) |
|
- }) |
|
}) |
|
} |
|
} |
|
@@ -406,9 +394,7 @@ |
|
|
|
// Ensure that both the template and remotes directories have the correct |
|
// permissions. |
|
- fs.chown(templates, stats.uid, stats.gid, function (er) { |
|
- cb(er, stats) |
|
- }) |
|
+ cb(undefined, stats) |
|
}) |
|
}) |
|
} |
|
Index: lib/cache/caching-client.js |
|
--- lib/cache/caching-client.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/cache/caching-client.js 2017-01-29 13:32:12.665265000 +0100 |
|
@@ -183,7 +183,7 @@ |
|
writeFile(cachePath, JSON.stringify(data), function (er) { |
|
if (er) return saved() |
|
|
|
- chownr(made || cachePath, st.uid, st.gid, saved) |
|
+ saved() |
|
}) |
|
}) |
|
}) |
|
Index: lib/npm.js |
|
--- lib/npm.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/npm.js 2017-01-29 13:32:33.179306000 +0100 |
|
@@ -374,9 +374,7 @@ |
|
Object.defineProperty(npm, 'globalDir', |
|
{ |
|
get: function () { |
|
- return (process.platform !== 'win32') |
|
- ? path.resolve(npm.globalPrefix, 'lib', 'node_modules') |
|
- : path.resolve(npm.globalPrefix, 'node_modules') |
|
+ return path.resolve(npm.globalPrefix, 'lib', 'node', 'usr') |
|
}, |
|
enumerable: true |
|
}) |
|
Index: lib/search/all-package-metadata.js |
|
--- lib/search/all-package-metadata.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/search/all-package-metadata.js 2017-01-29 13:32:12.665416000 +0100 |
|
@@ -240,7 +240,7 @@ |
|
if (er) return cb(er) |
|
mkdir(cacheBase, function (er, made) { |
|
if (er) return cb(er) |
|
- chownr(made || cacheBase, st.uid, st.gid, cb) |
|
+ cb(null) |
|
}) |
|
}) |
|
} |
|
Index: lib/utils/correct-mkdir.js |
|
--- lib/utils/correct-mkdir.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/utils/correct-mkdir.js 2017-01-29 13:32:12.665537000 +0100 |
|
@@ -116,8 +116,5 @@ |
|
} |
|
|
|
function setPermissions (path, st, cb) { |
|
- chownr(path, st.uid, st.gid, function (er) { |
|
- if (er && er.code === 'ENOENT') return cb(null, st) |
|
- return cb(er, st) |
|
- }) |
|
+ cb(null, st) |
|
} |
|
Index: lib/utils/lifecycle.js |
|
--- lib/utils/lifecycle.js.orig 2017-01-26 13:46:37.000000000 +0100 |
|
+++ lib/utils/lifecycle.js 2017-01-29 13:32:12.665694000 +0100 |
|
@@ -162,7 +162,6 @@ |
|
if (cfgsetting === 'warn-only') { |
|
if (isDifferentNodeInPath && !shouldPrependCurrentNodeDirToPATH.hasWarned) { |
|
if (foundExecPath) { |
|
- log.warn('lifecycle', 'The node binary used for scripts is', foundExecPath, 'but npm is using', process.execPath, 'itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.') |
|
} else { |
|
log.warn('lifecycle', 'npm is using', process.execPath, 'but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.') |
|
}
|
|
|