Debian Codegraph @

debian/patches/tests-tolerate-gnu-tar-pax-warnings.patch

raw symbols SCIP
1 Descriptionscip-debian debian node-tar 7.5.19+~4.0.1-1 node-tar/patches/`tests-tolerate-gnu-tar-pax-warnings.patch`#Description.: tests: tolerate GNU tar pax extended-header warnings
2 The "gzipped tarball that makes some drain/resume stuff" test pipes a
3 node-tar archive to the system tar and fails on any stderr output. GNU tar
4 emits "Ignoring unknown extended header keyword 'SCHILY.*'" warnings for the
5 pax keywords node-tar writes (e.g. for hardlinks); these are harmless and
6 version-dependent. Filter them out so the test still checks that the system
7 tar reads the archive successfully (exit code 0) without failing on cosmetic
8 warnings.
9 Authorscip-debian debian node-tar 7.5.19+~4.0.1-1 node-tar/patches/`tests-tolerate-gnu-tar-pax-warnings.patch`#Author.: Xavier Guimard <[email protected]scip-debian . . . identity/`[email protected]`.>
10 Forwardedscip-debian debian node-tar 7.5.19+~4.0.1-1 node-tar/patches/`tests-tolerate-gnu-tar-pax-warnings.patch`#Forwarded.: not-needed
11 --- a/test/create.tsscip-debian debian node-tar 7.5.19+~4.0.1-1 node-tar/upstream/`test/create.ts`:
12 +++ b/test/create.tsscip-debian debian node-tar 7.5.19+~4.0.1-1 node-tar/upstream/`test/create.ts`:
13 @@ -242,7 +242,16 @@
14 stdio: ['ignore', 'ignore', 'pipe'],
15 })
16 child.stderr.on('data', c => {
17 - t.fail(c + '')
18 + // GNU tar warns about node-tar's SCHILY.* (and other) extended-header
19 + // pax keywords it does not recognise; these are harmless and depend on
20 + // the system tar version. Only fail on other, real errors.
21 + const s = String(c)
22 + .replace(
23 + /tar: Ignoring unknown extended header keyword '[^']*'\n?/g,
24 + '',
25 + )
26 + .trim()
27 + if (s) t.fail(s)
28 })
29 child.on('close', (code, signal) => {
30 t.equal(code, 0)