diff options
author | Patrick Lauer <patrick@gentoo.org> | 2016-02-11 13:06:38 +0100 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2016-02-11 13:06:51 +0100 |
commit | 70d316d599547e04033870abbd9cb14971f78f9a (patch) | |
tree | 0dbe061588fbb508868adc5f6e859c0603f5389f /net-libs/nodejs/files | |
parent | 810f959093e0fbbe712276f87887517c934df899 (diff) | |
download | gentoo-70d316d599547e04033870abbd9cb14971f78f9a.tar.gz gentoo-70d316d599547e04033870abbd9cb14971f78f9a.tar.xz |
net-libs/nodejs: Bump #574418, thanks to jbergstroem
Package-Manager: portage-2.2.27
Diffstat (limited to 'net-libs/nodejs/files')
-rw-r--r-- | net-libs/nodejs/files/gentoo-global-npm-config.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/net-libs/nodejs/files/gentoo-global-npm-config.patch b/net-libs/nodejs/files/gentoo-global-npm-config.patch new file mode 100644 index 00000000000..e7346b82685 --- /dev/null +++ b/net-libs/nodejs/files/gentoo-global-npm-config.patch @@ -0,0 +1,40 @@ +commit 46ac7cd4229eac5e0182ab62b7ed844c24a8c52e +Author: Johan Bergström <bugs@bergstroem.nu> +Date: Wed Feb 10 22:45:59 2016 +1100 + + npm: set global config folder to /etc/npm + + npm previously assumed that the global config path would be + based on $prefix/etc. Since gentoo installs nodejs into /usr, + this means we're also creating /usr/etc which is less desirable. + + This patch will likely never go upstream. + +diff --git a/deps/npm/lib/config/core.js b/deps/npm/lib/config/core.js +index d1306eb..bd2ef89 100644 +--- a/deps/npm/lib/config/core.js ++++ b/deps/npm/lib/config/core.js +@@ -150,16 +150,14 @@ function load_ (builtin, rc, cli, cb) { + // Eg, `npm config get globalconfig --prefix ~/local` should + // return `~/local/etc/npmrc` + // annoying humans and their expectations! +- if (conf.get('prefix')) { +- var etc = path.resolve(conf.get('prefix'), 'etc') +- mkdirp(etc, function () { +- defaults.globalconfig = path.resolve(etc, 'npmrc') +- defaults.globalignorefile = path.resolve(etc, 'npmignore') +- afterUserContinuation() +- }) +- } else { ++ ++ // gentoo deviates wrt global config; store in /etc/npm ++ var globalconfig = path.resolve('/etc', 'npm') ++ mkdirp(globalconfig, function () { ++ defaults.globalconfig = path.resolve(globalconfig, 'npmrc') ++ defaults.globalignorefile = path.resolve(globalconfig, 'npmignore') + afterUserContinuation() +- } ++ }) + } + + function afterUserContinuation () { |