From 1841d1ae1183acde94d48e466270b05132c9905e Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Fri, 20 Jan 2023 19:32:20 +0100 Subject: [PATCH] Use pickle only if pecl is not installed (#679) Fix #674 Fix #678 --- install-php-extensions | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index 384f7d6..e7489da 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -3665,14 +3665,13 @@ moduleMayUsePecl() { # Updates: # PHP_MODULES_TO_INSTALL # Sets: -# USE_PICKLE +# USE_PICKLE 0: no, 1: yes (already downloaded), 2: yes (build it from source) configureInstaller() { USE_PICKLE=0 - for PHP_MODULE_TO_INSTALL in $PHP_MODULES_TO_INSTALL; do - if moduleMayUsePecl "$PHP_MODULE_TO_INSTALL"; then - if test $PHP_MAJMIN_VERSION -lt 800; then - pecl channel-update pecl.php.net || true - return + if ! which pecl >/dev/null; then + for PHP_MODULE_TO_INSTALL in $PHP_MODULES_TO_INSTALL; do + if ! moduleMayUsePecl "$PHP_MODULE_TO_INSTALL"; then + continue fi if false && anyStringInList '' "$PHP_MODULES_TO_INSTALL"; then USE_PICKLE=2 @@ -3681,9 +3680,12 @@ configureInstaller() { chmod +x /tmp/pickle USE_PICKLE=1 fi - return - fi - done + break + done + fi + if test $USE_PICKLE -eq 0; then + pecl channel-update pecl.php.net || true + fi } buildPickle() {