Speedup apt-get operations in Debian Jessie

pull/251/head
Michele Locati 2021-01-14 14:47:26 +01:00
parent c417aa1be1
commit 8275f0e1a8
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 14 additions and 0 deletions

View File

@ -46,6 +46,15 @@ setPHPVersionVariables() {
PHP_MAJMINPAT_VERSION=$(printf '%s' "$setPHPVersionVariables_textual" | awk -F. '{print $1*10000+$2*100+$3}') PHP_MAJMINPAT_VERSION=$(printf '%s' "$setPHPVersionVariables_textual" | awk -F. '{print $1*10000+$2*100+$3}')
} }
# Fix apt-get being very slow on Debian Jessie
# See https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1332440
fixMaxOpenFiles() {
fixMaxOpenFiles_cur=$(ulimit -n 2>/dev/null || echo 0)
if test "$fixMaxOpenFiles_cur" -gt 10000; then
ulimit -n 10000
fi
}
# Get the directory containing the compiled PHP extensions # Get the directory containing the compiled PHP extensions
# #
# Output: # Output:
@ -2242,6 +2251,11 @@ mkdir -p /tmp/pickle.tmp
IPE_ERRFLAG_FILE="$(mktemp -p /tmp/src)" IPE_ERRFLAG_FILE="$(mktemp -p /tmp/src)"
CONFIGURE_FILE=/tmp/configure-options CONFIGURE_FILE=/tmp/configure-options
setDistro setDistro
case "$DISTRO_VERSION" in
debian@8)
fixMaxOpenFiles || true
;;
esac
setPHPVersionVariables setPHPVersionVariables
setPHPPreinstalledModules setPHPPreinstalledModules
case "$PHP_MAJMIN_VERSION" in case "$PHP_MAJMIN_VERSION" in