Let users keep the system packages cache

pull/420/head
Michele Locati 2021-08-13 08:54:09 +02:00
parent 124c35a9d8
commit 7eabdbf791
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
2 changed files with 18 additions and 12 deletions

View File

@ -273,12 +273,13 @@ zlib
## Configuration ## Configuration
The compilation of some extensions may be fine-tuned to better fit your needs by using environment variables: You can configure the behavior of the script, as well as fine-tune some extensions in order fit your needs, by using environment variables:
| Extension | Environment variable | Description | | Extension | Environment variable | Description |
|---|---|---| |---|---|---|
| lzf | IPE_LZF_BETTERCOMPRESSION=1 | By default `install-php-extensions` compiles the `lzf` extension to prefer speed over size; you can use this environment variable to compile it preferring size over speed | | | `IPE_KEEP_SYSPKG_CACHE=1` | By default the script will clear the apt/apk/pear cache in order to save disk space. You can disable it by setting this environment variable |
| event | IPE_EVENT_NAMESPACE=... | By default the `event` classes are defined in the root namespace. You can use this environment variable to specify a custom namespace | | lzf | `IPE_LZF_BETTERCOMPRESSION=1` | By default `install-php-extensions` compiles the `lzf` extension to prefer speed over size; you can use this environment variable to compile it preferring size over speed |
| event | `IPE_EVENT_NAMESPACE=`... | By default the `event` classes are defined in the root namespace. You can use this environment variable to specify a custom namespace |
## Special requirements ## Special requirements

View File

@ -2725,20 +2725,25 @@ cleanup() {
;; ;;
esac esac
fi fi
case "$DISTRO" in
alpine)
rm -rf /var/cache/apk/*
;;
debian)
rm -rf /var/lib/apt/lists/*
;;
esac
docker-php-source delete docker-php-source delete
rm -rf /tmp/pear
rm -rf /tmp/src rm -rf /tmp/src
rm -rf /tmp/pickle rm -rf /tmp/pickle
rm -rf /tmp/pickle.tmp rm -rf /tmp/pickle.tmp
rm -rf "$CONFIGURE_FILE" rm -rf "$CONFIGURE_FILE"
case "${IPE_KEEP_SYSPKG_CACHE:-}" in
1 | y* | Y*) ;;
*)
case "$DISTRO" in
alpine)
rm -rf /var/cache/apk/*
;;
debian)
rm -rf /var/lib/apt/lists/*
;;
esac
rm -rf /tmp/pear
;;
esac
} }
resetIFS resetIFS