termux-create-package: Move from disabled-packages/ to packages/
[termux-packages] / disabled-packages / nodejs-lts / npm-avoid-chown.patch
CommitLineData
ae650055
FF
1Termux is effectively a single-user system so chown:ing
2does not make much sense.
3
4Without this patch npm fails with EPERM on chown
5for cache.json when first building the local index.
6diff -u -r ../node-v4.4.3/deps/npm/lib/cache/update-index.js ./deps/npm/lib/cache/update-index.js > npm-avoid-chown.patch
7--- ../node-v4.4.3/deps/npm/lib/cache/update-index.js 2016-04-12 19:42:04.000000000 +0000
8+++ ./deps/npm/lib/cache/update-index.js 2016-04-19 09:29:54.634171804 +0000
9@@ -4,7 +4,7 @@
10 var assert = require('assert')
11 var path = require('path')
12 var mkdir = require('mkdirp')
13-var chownr = require('chownr')
14+var chownr = function(path, uid, gid, cb) { cb(null); }
15 var npm = require('../npm.js')
16 var log = require('npmlog')
17 var cacheFile = require('npm-cache-filename')