diff options
author | Remi Collet <remi@remirepo.net> | 2023-10-22 10:01:31 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-10-22 10:01:31 +0200 |
commit | 48baf25c7d097aa80965ccc9107e99a988c79407 (patch) | |
tree | 343ee014574561b4cd0214bea1903c8bf3dc5d10 /php-pecl-xdebug3.spec | |
parent | be08e6691b7b5b6e529e1e2af99757c8c4762655 (diff) |
add check for provided config
Diffstat (limited to 'php-pecl-xdebug3.spec')
-rw-r--r-- | php-pecl-xdebug3.spec | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/php-pecl-xdebug3.spec b/php-pecl-xdebug3.spec index 06730c8..6093546 100644 --- a/php-pecl-xdebug3.spec +++ b/php-pecl-xdebug3.spec @@ -223,13 +223,23 @@ done %{__php} \ --no-php-ini \ --define zend_extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep Xdebug + --modules | grep '^Xdebug$' + +# check if provided config file is usable +%{__php} \ + --no-php-ini \ + -c %{buildroot}%{php_inidir}/%{ini_name} -v 2>err.log \ + | grep 'with Xdebug v%{upstream_version}%{?upstream_prever}' +if [ -s err.log ]; then + cat err.log + exit 1 +fi %if %{with_zts} %{__ztsphp} \ --no-php-ini \ --define zend_extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep Xdebug + --modules | grep '^Xdebug$' %endif %if %{with tests} |