@stll/oxlint-config 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -39,7 +39,21 @@ apt_install() (
|
|
|
39
39
|
policy_state=installed
|
|
40
40
|
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d
|
|
41
41
|
chmod 755 /usr/sbin/policy-rc.d
|
|
42
|
-
|
|
42
|
+
local package
|
|
43
|
+
for package in "$@"; do
|
|
44
|
+
if [[ "$package" == */* ]]; then
|
|
45
|
+
# apt cannot fetch local archives with --download-only, so their installs
|
|
46
|
+
# stay one call. Package triggers can be slow on cloud filesystems; the
|
|
47
|
+
# longer whole-call deadline covers them while Acquire timeouts still
|
|
48
|
+
# bound each network request.
|
|
49
|
+
APT_DEADLINE=600 DEBIAN_FRONTEND=noninteractive apt_network install -y --no-install-recommends "$@"
|
|
50
|
+
return
|
|
51
|
+
fi
|
|
52
|
+
done
|
|
53
|
+
# The network deadline covers downloads only; unpacking and maintainer scripts
|
|
54
|
+
# (for example locale generation or cluster creation) run offline afterwards.
|
|
55
|
+
DEBIAN_FRONTEND=noninteractive apt_network install -y --no-install-recommends --download-only "$@"
|
|
56
|
+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-download "$@"
|
|
43
57
|
)
|
|
44
58
|
|
|
45
59
|
`;
|
|
@@ -293,7 +307,8 @@ apt_network() {
|
|
|
293
307
|
# --print-uris reads configured indexes without contacting their servers.
|
|
294
308
|
hosts="$(set -o pipefail; apt-get --print-uris update | awk -F/ '/^\047https?:\/\// { host=$3; sub(/.*@/, "", host); if (!seen[host]++) { printf "%s%s", separator, host; separator="," } }')" || return "$?"
|
|
295
309
|
[[ -n "$hosts" ]] || hosts='configured APT hosts'
|
|
296
|
-
|
|
310
|
+
# APT_DEADLINE: whole-call seconds; callers that also unpack packages may extend it.
|
|
311
|
+
network_run "$hosts" "${"$"}{APT_DEADLINE:-180}" apt-get -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::Retries=3 -o APT::Update::Error-Mode=any "$@"
|
|
297
312
|
}
|
|
298
313
|
apt_refresh_for() {
|
|
299
314
|
# Skip the refresh only when the install downloads nothing: then no package
|