File: no_exponential_backoff.patch

package info (click to toggle)
node-gyp 12.1.0%2B~6.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,444 kB
  • sloc: python: 24,973; javascript: 5,261; lisp: 258; cs: 186; ansic: 46; cpp: 29; sh: 23; makefile: 7
file content (32 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: disable exponential backoff, not needed on debian
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2023-12-05
Forwarded: not-needed
--- a/lib/install.js
+++ b/lib/install.js
@@ -2,7 +2,6 @@
 
 const { createWriteStream, promises: fs } = require('graceful-fs')
 const os = require('os')
-const { backOff } = require('exponential-backoff')
 const tar = require('tar')
 const path = require('path')
 const { Transform, promises: { pipeline } } = require('stream')
@@ -131,9 +130,6 @@
       if (entry.isDirectory()) {
         await copyDirectory(path.join(src, entry.name), path.join(dest, entry.name))
       } else if (entry.isFile()) {
-        // with parallel installs, copying files may cause file errors on
-        // Windows so use an exponential backoff to resolve collisions
-        await backOff(async () => {
           try {
             await fs.copyFile(path.join(src, entry.name), path.join(dest, entry.name))
           } catch (err) {
@@ -146,7 +142,6 @@
             }
             throw err
           }
-        })
       } else {
         throw new Error('Unexpected file directory entry type')
       }