CC @zvetlik
So the goal here is for bundled modules to generate a provide of bundled(nodejs-module) rather than the normal npm(module)?
bundled(nodejs-module)
npm(module)
Yes. This is meant solely for packages with huge dependency trees, so they are easier to package and maintain.
LGTM, I inspected the code and ran it against NPM 3.10.10 (from the Node.js 6.11.2 tarball) and got only the bundled results. It did not include npm(npm) = 3.10.10
npm(npm) = 3.10.10
bundled(nodejs-chownr) = 1.0.1 bundled(nodejs-nopt) = 4.0.1 bundled(nodejs-read-package-json) = 2.0.10 bundled(nodejs-json-parse-helpfulerror) = 1.0.3 bundled(nodejs-jju) = 1.3.0 bundled(nodejs-ansicolors) = 0.3.2 bundled(nodejs-rimraf) = 2.6.1 bundled(nodejs-osenv) = 0.1.4 bundled(nodejs-os-tmpdir) = 1.0.2 bundled(nodejs-os-homedir) = 1.0.2 bundled(nodejs-validate-npm-package-license) = 3.0.1 bundled(nodejs-spdx-expression-parse) = 1.0.4 bundled(nodejs-spdx-correct) = 1.0.2 bundled(nodejs-spdx-license-ids) = 1.2.2 bundled(nodejs-readable-stream) = 2.3.3 bundled(nodejs-isarray) = 1.0.0 bundled(nodejs-util-deprecate) = 1.0.2 bundled(nodejs-core-util-is) = 1.0.2 bundled(nodejs-process-nextick-args) = 1.0.7 bundled(nodejs-string_decoder) = 1.0.3 bundled(nodejs-cmd-shim) = 2.0.2 bundled(nodejs-bluebird) = 3.5.0 bundled(nodejs-validate-npm-package-name) = 3.0.0 bundled(nodejs-builtins) = 1.0.3 bundled(nodejs-ini) = 1.3.4 bundled(nodejs-lru-cache) = 4.1.1 bundled(nodejs-pseudomap) = 1.0.2 bundled(nodejs-yallist) = 2.1.2 bundled(nodejs-columnify) = 1.5.4 bundled(nodejs-strip-ansi) = 3.0.1 bundled(nodejs-ansi-regex) = 2.1.1 bundled(nodejs-wcwidth) = 1.0.1 bundled(nodejs-defaults) = 1.0.3 bundled(nodejs-clone) = 1.0.2 bundled(nodejs-ssri) = 4.1.6 bundled(nodejs-read-package-tree) = 5.1.6 bundled(nodejs-unique-filename) = 1.1.0 bundled(nodejs-unique-slug) = 2.0.0 bundled(nodejs-npm-cache-filename) = 1.0.2 bundled(nodejs-glob) = 7.1.2 bundled(nodejs-fs.realpath) = 1.0.0 bundled(nodejs-minimatch) = 3.0.4 bundled(nodejs-brace-expansion) = 1.1.8 bundled(nodejs-concat-map) = 0.0.1 bundled(nodejs-balanced-match) = 1.0.0 bundled(nodejs-path-is-absolute) = 1.0.1 bundled(nodejs-has-unicode) = 2.0.1 bundled(nodejs-lodash._baseindexof) = 3.1.0 bundled(nodejs-umask) = 1.1.0 bundled(nodejs-debuglog) = 1.0.1 bundled(nodejs-imurmurhash) = 0.1.4 bundled(nodejs-mkdirp) = 0.5.1 bundled(nodejs-minimist) = 0.0.8 bundled(nodejs-init-package-json) = 1.10.1 bundled(nodejs-promzard) = 0.3.0 bundled(nodejs-call-limit) = 1.1.0 bundled(nodejs-which) = 1.2.14 bundled(nodejs-isexe) = 2.0.0 bundled(nodejs-worker-farm) = 1.4.1 bundled(nodejs-xtend) = 4.0.1 bundled(nodejs-errno) = 0.1.4 bundled(nodejs-prr) = 0.0.0 bundled(nodejs-lodash.restparam) = 3.6.1 bundled(nodejs-sorted-object) = 2.0.1 bundled(nodejs-editor) = 1.0.0 bundled(nodejs-ansistyles) = 0.1.3 bundled(nodejs-config-chain) = 1.1.11 bundled(nodejs-proto-list) = 1.2.4 bundled(nodejs-strip-ansi) = 4.0.0 bundled(nodejs-ansi-regex) = 3.0.0 bundled(nodejs-graceful-fs) = 4.1.11 bundled(nodejs-hosted-git-info) = 2.5.0 bundled(nodejs-dezalgo) = 1.0.3 bundled(nodejs-asap) = 2.0.5 bundled(nodejs-lodash.clonedeep) = 4.5.0 bundled(nodejs-fstream-npm) = 1.2.1 bundled(nodejs-fstream-ignore) = 1.0.5 bundled(nodejs-minimatch) = 3.0.4 bundled(nodejs-brace-expansion) = 1.1.8 bundled(nodejs-concat-map) = 0.0.1 bundled(nodejs-balanced-match) = 1.0.0 bundled(nodejs-read-cmd-shim) = 1.0.1 bundled(nodejs-lazy-property) = 1.0.0 bundled(nodejs-normalize-package-data) = 2.4.0 bundled(nodejs-is-builtin-module) = 1.0.0 bundled(nodejs-builtin-modules) = 1.1.1 bundled(nodejs-lockfile) = 1.0.3 bundled(nodejs-lodash._cacheindexof) = 3.0.2 bundled(nodejs-abbrev) = 1.1.0 bundled(nodejs-cacache) = 9.2.9 bundled(nodejs-lru-cache) = 4.1.1 bundled(nodejs-pseudomap) = 1.0.2 bundled(nodejs-yallist) = 2.1.2 bundled(nodejs-y18n) = 3.2.1 bundled(nodejs-node-gyp) = 3.6.2 bundled(nodejs-nopt) = 3.0.6 bundled(nodejs-minimatch) = 3.0.4 bundled(nodejs-brace-expansion) = 1.1.8 bundled(nodejs-concat-map) = 0.0.1 bundled(nodejs-balanced-match) = 1.0.0 bundled(nodejs-retry) = 0.10.1 bundled(nodejs-uid-number) = 0.0.6 bundled(nodejs-libnpx) = 9.2.1 bundled(nodejs-dotenv) = 4.0.0 bundled(nodejs-y18n) = 3.2.1 bundled(nodejs-yargs) = 8.0.2 bundled(nodejs-cliui) = 3.2.0 bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-code-point-at) = 1.1.0 bundled(nodejs-is-fullwidth-code-point) = 1.0.0 bundled(nodejs-number-is-nan) = 1.0.1 bundled(nodejs-wrap-ansi) = 2.1.0 bundled(nodejs-strip-ansi) = 3.0.1 bundled(nodejs-ansi-regex) = 2.1.1 bundled(nodejs-decamelize) = 1.2.0 bundled(nodejs-string-width) = 2.1.0 bundled(nodejs-is-fullwidth-code-point) = 2.0.0 bundled(nodejs-which-module) = 2.0.0 bundled(nodejs-read-pkg-up) = 2.0.0 bundled(nodejs-read-pkg) = 2.0.0 bundled(nodejs-load-json-file) = 2.0.0 bundled(nodejs-pify) = 2.3.0 bundled(nodejs-strip-bom) = 3.0.0 bundled(nodejs-parse-json) = 2.2.0 bundled(nodejs-error-ex) = 1.3.1 bundled(nodejs-is-arrayish) = 0.2.1 bundled(nodejs-path-type) = 2.0.0 bundled(nodejs-pify) = 2.3.0 bundled(nodejs-find-up) = 2.1.0 bundled(nodejs-locate-path) = 2.0.0 bundled(nodejs-p-locate) = 2.0.0 bundled(nodejs-p-limit) = 1.1.0 bundled(nodejs-path-exists) = 3.0.0 bundled(nodejs-require-directory) = 2.1.1 bundled(nodejs-require-main-filename) = 1.0.1 bundled(nodejs-yargs-parser) = 7.0.0 bundled(nodejs-set-blocking) = 2.0.0 bundled(nodejs-os-locale) = 2.0.0 bundled(nodejs-mem) = 1.1.0 bundled(nodejs-mimic-fn) = 1.1.0 bundled(nodejs-execa) = 0.5.1 bundled(nodejs-get-stream) = 2.3.1 bundled(nodejs-pinkie-promise) = 2.0.1 bundled(nodejs-pinkie) = 2.0.4 bundled(nodejs-object-assign) = 4.1.1 bundled(nodejs-is-stream) = 1.1.0 bundled(nodejs-p-finally) = 1.0.0 bundled(nodejs-cross-spawn) = 4.0.2 bundled(nodejs-signal-exit) = 3.0.2 bundled(nodejs-npm-run-path) = 2.0.2 bundled(nodejs-path-key) = 2.0.1 bundled(nodejs-strip-eof) = 1.0.0 bundled(nodejs-lcid) = 1.0.0 bundled(nodejs-invert-kv) = 1.0.0 bundled(nodejs-get-caller-file) = 1.0.2 bundled(nodejs-camelcase) = 4.1.0 bundled(nodejs-lodash._baseuniq) = 4.6.0 bundled(nodejs-lodash._createset) = 4.0.3 bundled(nodejs-lodash._root) = 3.0.1 bundled(nodejs-move-concurrently) = 1.0.1 bundled(nodejs-run-queue) = 1.0.3 bundled(nodejs-copy-concurrently) = 1.0.3 bundled(nodejs-slide) = 1.1.6 bundled(nodejs-aproba) = 1.1.2 bundled(nodejs-lodash.uniq) = 4.5.0 bundled(nodejs-once) = 1.4.0 bundled(nodejs-archy) = 1.0.0 bundled(nodejs-pacote) = 2.7.38 bundled(nodejs-protoduck) = 4.0.0 bundled(nodejs-genfun) = 4.0.1 bundled(nodejs-make-fetch-happen) = 2.4.13 bundled(nodejs-socks-proxy-agent) = 3.0.0 bundled(nodejs-agent-base) = 4.1.0 bundled(nodejs-es6-promisify) = 5.0.0 bundled(nodejs-es6-promise) = 4.1.1 bundled(nodejs-socks) = 1.1.10 bundled(nodejs-ip) = 1.1.5 bundled(nodejs-smart-buffer) = 1.1.15 bundled(nodejs-agentkeepalive) = 3.3.0 bundled(nodejs-humanize-ms) = 1.2.1 bundled(nodejs-ms) = 2.0.0 bundled(nodejs-https-proxy-agent) = 2.0.0 bundled(nodejs-debug) = 2.6.8 bundled(nodejs-ms) = 2.0.0 bundled(nodejs-agent-base) = 4.1.0 bundled(nodejs-es6-promisify) = 5.0.0 bundled(nodejs-es6-promise) = 4.1.1 bundled(nodejs-http-proxy-agent) = 2.0.0 bundled(nodejs-debug) = 2.6.8 bundled(nodejs-ms) = 2.0.0 bundled(nodejs-agent-base) = 4.1.0 bundled(nodejs-es6-promisify) = 5.0.0 bundled(nodejs-es6-promise) = 4.1.1 bundled(nodejs-node-fetch-npm) = 2.0.1 bundled(nodejs-json-parse-helpfulerror) = 1.0.3 bundled(nodejs-jju) = 1.3.0 bundled(nodejs-encoding) = 0.1.12 bundled(nodejs-iconv-lite) = 0.4.18 bundled(nodejs-http-cache-semantics) = 3.7.3 bundled(nodejs-npm-pick-manifest) = 1.0.4 bundled(nodejs-tar-stream) = 1.5.4 bundled(nodejs-xtend) = 4.0.1 bundled(nodejs-end-of-stream) = 1.4.0 bundled(nodejs-bl) = 1.2.1 bundled(nodejs-minimatch) = 3.0.4 bundled(nodejs-brace-expansion) = 1.1.8 bundled(nodejs-concat-map) = 0.0.1 bundled(nodejs-balanced-match) = 1.0.0 bundled(nodejs-tar-fs) = 1.15.3 bundled(nodejs-pump) = 1.0.2 bundled(nodejs-end-of-stream) = 1.4.0 bundled(nodejs-promise-retry) = 1.1.1 bundled(nodejs-err-code) = 1.1.2 bundled(nodejs-update-notifier) = 2.2.0 bundled(nodejs-configstore) = 3.1.0 bundled(nodejs-unique-string) = 1.0.0 bundled(nodejs-crypto-random-string) = 1.0.0 bundled(nodejs-dot-prop) = 4.1.1 bundled(nodejs-is-obj) = 1.0.1 bundled(nodejs-make-dir) = 1.0.0 bundled(nodejs-pify) = 2.3.0 bundled(nodejs-boxen) = 1.1.0 bundled(nodejs-string-width) = 2.1.0 bundled(nodejs-is-fullwidth-code-point) = 2.0.0 bundled(nodejs-strip-ansi) = 4.0.0 bundled(nodejs-widest-line) = 1.0.0 bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-code-point-at) = 1.1.0 bundled(nodejs-is-fullwidth-code-point) = 1.0.0 bundled(nodejs-number-is-nan) = 1.0.1 bundled(nodejs-strip-ansi) = 3.0.1 bundled(nodejs-ansi-regex) = 2.1.1 bundled(nodejs-term-size) = 0.1.1 bundled(nodejs-execa) = 0.4.0 bundled(nodejs-is-stream) = 1.1.0 bundled(nodejs-cross-spawn-async) = 2.2.5 bundled(nodejs-path-key) = 1.0.0 bundled(nodejs-npm-run-path) = 1.0.0 bundled(nodejs-strip-eof) = 1.0.0 bundled(nodejs-object-assign) = 4.1.1 bundled(nodejs-ansi-align) = 2.0.0 bundled(nodejs-cli-boxes) = 1.0.0 bundled(nodejs-camelcase) = 4.1.0 bundled(nodejs-semver-diff) = 2.1.0 bundled(nodejs-latest-version) = 3.1.0 bundled(nodejs-package-json) = 4.0.1 bundled(nodejs-registry-url) = 3.1.0 bundled(nodejs-rc) = 1.2.1 bundled(nodejs-strip-json-comments) = 2.0.1 bundled(nodejs-minimist) = 1.2.0 bundled(nodejs-deep-extend) = 0.4.2 bundled(nodejs-registry-auth-token) = 3.3.1 bundled(nodejs-rc) = 1.2.1 bundled(nodejs-strip-json-comments) = 2.0.1 bundled(nodejs-minimist) = 1.2.0 bundled(nodejs-deep-extend) = 0.4.2 bundled(nodejs-got) = 6.7.1 bundled(nodejs-get-stream) = 3.0.0 bundled(nodejs-is-stream) = 1.1.0 bundled(nodejs-is-redirect) = 1.0.0 bundled(nodejs-unzip-response) = 2.0.1 bundled(nodejs-is-retry-allowed) = 1.1.0 bundled(nodejs-timed-out) = 4.0.1 bundled(nodejs-url-parse-lax) = 1.0.0 bundled(nodejs-prepend-http) = 1.0.4 bundled(nodejs-lowercase-keys) = 1.0.0 bundled(nodejs-duplexer3) = 0.1.4 bundled(nodejs-create-error-class) = 3.0.2 bundled(nodejs-capture-stack-trace) = 1.0.0 bundled(nodejs-is-npm) = 1.0.0 bundled(nodejs-import-lazy) = 2.1.0 bundled(nodejs-xdg-basedir) = 3.0.0 bundled(nodejs-chalk) = 1.1.3 bundled(nodejs-escape-string-regexp) = 1.0.5 bundled(nodejs-strip-ansi) = 3.0.1 bundled(nodejs-ansi-regex) = 2.1.1 bundled(nodejs-supports-color) = 2.0.0 bundled(nodejs-ansi-styles) = 2.2.1 bundled(nodejs-has-ansi) = 2.0.0 bundled(nodejs-ansi-regex) = 2.1.1 bundled(nodejs-JSONStream) = 1.3.1 bundled(nodejs-jsonparse) = 1.3.1 bundled(nodejs-through) = 2.3.8 bundled(nodejs-npm-install-checks) = 3.0.0 bundled(nodejs-request) = 2.81.0 bundled(nodejs-forever-agent) = 0.6.1 bundled(nodejs-http-signature) = 1.1.1 bundled(nodejs-assert-plus) = 0.2.0 bundled(nodejs-jsprim) = 1.4.0 bundled(nodejs-assert-plus) = 1.0.0 bundled(nodejs-json-schema) = 0.2.3 bundled(nodejs-extsprintf) = 1.0.2 bundled(nodejs-verror) = 1.3.6 bundled(nodejs-sshpk) = 1.13.1 bundled(nodejs-assert-plus) = 1.0.0 bundled(nodejs-getpass) = 0.1.7 bundled(nodejs-asn1) = 0.2.3 bundled(nodejs-jsbn) = 0.1.1 bundled(nodejs-tweetnacl) = 0.14.5 bundled(nodejs-dashdash) = 1.14.1 bundled(nodejs-ecc-jsbn) = 0.1.1 bundled(nodejs-bcrypt-pbkdf) = 1.0.1 bundled(nodejs-tunnel-agent) = 0.6.0 bundled(nodejs-extend) = 3.0.1 bundled(nodejs-hawk) = 3.1.3 bundled(nodejs-boom) = 2.10.1 bundled(nodejs-sntp) = 1.0.9 bundled(nodejs-hoek) = 2.16.3 bundled(nodejs-cryptiles) = 2.0.5 bundled(nodejs-har-validator) = 4.2.1 bundled(nodejs-ajv) = 4.11.8 bundled(nodejs-co) = 4.6.0 bundled(nodejs-json-stable-stringify) = 1.0.1 bundled(nodejs-jsonify) = 0.0.0 bundled(nodejs-har-schema) = 1.0.5 bundled(nodejs-json-stringify-safe) = 5.0.1 bundled(nodejs-mime-types) = 2.1.15 bundled(nodejs-mime-db) = 1.27.0 bundled(nodejs-isstream) = 0.1.2 bundled(nodejs-aws-sign2) = 0.6.0 bundled(nodejs-is-typedarray) = 1.0.0 bundled(nodejs-form-data) = 2.1.4 bundled(nodejs-asynckit) = 0.4.0 bundled(nodejs-stringstream) = 0.0.5 bundled(nodejs-qs) = 6.4.0 bundled(nodejs-aws4) = 1.6.0 bundled(nodejs-combined-stream) = 1.0.5 bundled(nodejs-delayed-stream) = 1.0.0 bundled(nodejs-performance-now) = 0.2.0 bundled(nodejs-tough-cookie) = 2.3.2 bundled(nodejs-punycode) = 1.4.1 bundled(nodejs-caseless) = 0.12.0 bundled(nodejs-oauth-sign) = 0.8.2 bundled(nodejs-lodash._getnative) = 3.9.1 bundled(nodejs-uuid) = 3.1.0 bundled(nodejs-sorted-union-stream) = 2.1.3 bundled(nodejs-from2) = 1.3.0 bundled(nodejs-readable-stream) = 1.1.14 bundled(nodejs-isarray) = 0.0.1 bundled(nodejs-core-util-is) = 1.0.2 bundled(nodejs-string_decoder) = 0.10.31 bundled(nodejs-stream-iterate) = 1.2.0 bundled(nodejs-stream-shift) = 1.0.0 bundled(nodejs-mississippi) = 1.3.0 bundled(nodejs-duplexify) = 3.5.0 bundled(nodejs-stream-shift) = 1.0.0 bundled(nodejs-end-of-stream) = 1.0.0 bundled(nodejs-once) = 1.3.3 bundled(nodejs-pumpify) = 1.3.5 bundled(nodejs-from2) = 2.3.0 bundled(nodejs-through2) = 2.0.3 bundled(nodejs-xtend) = 4.0.1 bundled(nodejs-parallel-transform) = 1.1.0 bundled(nodejs-cyclist) = 0.2.2 bundled(nodejs-concat-stream) = 1.6.0 bundled(nodejs-typedarray) = 0.0.6 bundled(nodejs-pump) = 1.0.2 bundled(nodejs-stream-each) = 1.2.0 bundled(nodejs-stream-shift) = 1.0.0 bundled(nodejs-end-of-stream) = 1.4.0 bundled(nodejs-flush-write-stream) = 1.0.2 bundled(nodejs-inflight) = 1.0.6 bundled(nodejs-fs-vacuum) = 1.2.10 bundled(nodejs-unpipe) = 1.0.0 bundled(nodejs-promise-inflight) = 1.0.1 bundled(nodejs-npm-package-arg) = 5.1.2 bundled(nodejs-iferr) = 0.1.5 bundled(nodejs-npm-user-validate) = 1.0.0 bundled(nodejs-read) = 1.0.7 bundled(nodejs-mute-stream) = 0.0.7 bundled(nodejs-read-installed) = 4.0.3 bundled(nodejs-util-extend) = 1.0.3 bundled(nodejs-write-file-atomic) = 2.1.0 bundled(nodejs-npmlog) = 4.1.2 bundled(nodejs-console-control-strings) = 1.1.0 bundled(nodejs-are-we-there-yet) = 1.1.4 bundled(nodejs-delegates) = 1.0.0 bundled(nodejs-set-blocking) = 2.0.0 bundled(nodejs-gauge) = 2.7.4 bundled(nodejs-wide-align) = 1.1.2 bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-code-point-at) = 1.1.0 bundled(nodejs-is-fullwidth-code-point) = 1.0.0 bundled(nodejs-number-is-nan) = 1.0.1 bundled(nodejs-strip-ansi) = 3.0.1 bundled(nodejs-ansi-regex) = 2.1.1 bundled(nodejs-signal-exit) = 3.0.2 bundled(nodejs-object-assign) = 4.1.1 bundled(nodejs-lodash._createcache) = 3.1.2 bundled(nodejs-readdir-scoped-modules) = 1.0.2 bundled(nodejs-inherits) = 2.0.3 bundled(nodejs-lodash._bindcallback) = 3.0.1 bundled(nodejs-path-is-inside) = 1.0.2 bundled(nodejs-tar) = 2.2.1 bundled(nodejs-block-stream) = 0.0.9 bundled(nodejs-sha) = 2.0.1 bundled(nodejs-detect-indent) = 5.0.0 bundled(nodejs-text-table) = 0.2.0 bundled(nodejs-lodash.without) = 4.4.0 bundled(nodejs-wrappy) = 1.0.2 bundled(nodejs-fstream) = 1.0.11 bundled(nodejs-npm-registry-client) = 8.4.0 bundled(nodejs-concat-stream) = 1.6.0 bundled(nodejs-typedarray) = 0.0.6 bundled(nodejs-lodash.union) = 4.6.0 bundled(nodejs-fs-write-stream-atomic) = 1.0.10 bundled(nodejs-ansi-regex) = 3.0.0 bundled(nodejs-safe-buffer) = 5.1.1 bundled(nodejs-semver) = 5.3.0 bundled(nodejs-opener) = 1.4.3
Why are you testing for the presence of name but not the presence of version? Presumably the script will break if either is missing.
name
version
There are quite a few duplicates in that list though, presumably because of the recursive nature of the algorithm with multiple children having the same dependency.
Will rpm remove the dupes, or should the script be doing it?
Also a number of them have different versions of the same module, for example:
bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-string-width) = 2.1.0 bundled(nodejs-string-width) = 2.1.0
Is that going to break anything, if an rpm provides two different versions of the same dependency?
Also a number of them have different versions of the same module, for example: bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-string-width) = 1.0.2 bundled(nodejs-string-width) = 2.1.0 bundled(nodejs-string-width) = 2.1.0 Is that going to break anything, if an rpm provides two different versions of the same dependency?
Nothing should be broken here. This is informational and MUST never be used in a Requires:. The packaging guidelines forbid having Requires: on a bundled dependency.
Requires:
There are quite a few duplicates in that list though, presumably because of the recursive nature of the algorithm with multiple children having the same dependency. Will rpm remove the dupes, or should the script be doing it?
RPM will not remove the dupes, so you're right; we probably want to make these unique by complete string.
An easy way to do this would be to add the strings to a python set() and then iterate through the set to print them out after the recursion completes. (I'd also recommend sorting them just for readability).
set()
Disregard what I said about it not including the npm(npm) part. I invoked it incorrectly (passed it the directory name rather than package.json. It works properly when I use it correctly...
npm(npm)
package.json
I opened a new PR at https://pagure.io/nodejs-packaging/pull-request/3 that includes @ttomecek 's original patch, plus an additional one to handle deduplication and sorting.
Ah, one other bug: we need to check for symlinks, because we don't want to falsely report bundling when we are actually linking with a system copy.
Is there anything I can help with?
@ttomecek
If you want to take this back over, please do. My available time is very limited. Please review and merge in my changes from https://pagure.io/nodejs-packaging/pull-request/3 and add the symlink-checking.
4 new commits added
I think I addressed all the issues. @sgallagh thank you for your help!
@zvetlik is checking whether the script works correctly
7 new commits added
Together with @zvetlik we identified another corner case: nodejs.req also needs to be aware of the bundling.
This PR is ready for final review from my PoV.
Let me know whether I should squash the commits.
LGTM, I will merge and build it for Rawhide.
Pull-Request has been closed by sgallagh
Anyone else verified this? I tried with https://fedorapeople.org/~zvetlik/foo/ and got
[kasicka@kasicka]~% rpm -q --requires nodejs-validate-npm-package-license nodejs nodejs(engine) npm(spdx-correct) >= 1.0.0 npm(spdx-correct) < 1.1 npm(spdx-expression-parse) >= 1.0.0 npm(spdx-expression-parse) < 1.1 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsXz) <= 5.2-1 [kasicka@kasicka]~% rpm -q --provides nodejs-validate-npm-package-license nodejs-validate-npm-package-license = 3.0.1-4.fc28 npm(validate-npm-package-license) = 3.0.1
Also, I believe there are some adjustments to be done in nodejs.req (don't require bundled deps) and nodejs-symlink-deps (symlink bundled modules similarly to npm)
CC @zvetlik