From 48baf25c7d097aa80965ccc9107e99a988c79407 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 22 Oct 2023 10:01:31 +0200 Subject: add check for provided config --- php-pecl-xdebug3.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'php-pecl-xdebug3.spec') 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} -- cgit