[packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

Elan Ruusamäe glen at pld-linux.org
Thu May 13 21:32:22 CEST 2021


On 13.05.2021 22:04, adamg wrote:
> commit 45629e6e9bbed84edb75f9580aabea932a696556
> Author: Adam Gołębiowski <adamg at pld-linux.org>
> Date:   Thu May 13 15:03:01 2021 +0000
>
>      - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16),
>        we have fully transitioned to rpm 4 by now, and there is no easy way
>        to match 4.16* (4.16.0, 4.16.1, etc) - at least not without some lua
>        scripting, so just drop this.

there is a way to match:


[~/rpm/packages/php(7.4.19) (PHP_7_4)★] ➔ grep -r _rpmversion ~/all-specs
/home/users/glen/all-specs/php.spec:%if "%_rpmversion" != "4.16.0"
/home/users/glen/all-specs/rpm.spec:%if "%{_rpmversion}" >= "4.12" && 
"%{_rpmversion}" < "5"
/home/users/glen/all-specs/orc.spec:%if 0%{?ver_ge "%{_rpmversion}" "4.6"}
/home/users/glen/all-specs/perl.spec:%if %{_ver_ge '%{_rpmversion}' 
'4.16'} && %{_ver_lt '%{_rpmversion}' '5'}
/home/users/glen/all-specs/lightdm.spec:%if "%{_rpmversion}" >= "5"
/home/users/glen/all-specs/acroread.spec:%if "%{_rpmversion}" >= "5.0"


however,


point of that guard was to wait for support to become available or 
someone implement a solution.

the error being:


error: line 466: Illegal char '/' (0x2f) in: Obsoletes: /usr/bin/php
error: line 466: Only package names are allowed in Obsoletes: 
Obsoletes:        /usr/bin/php


but as no such solution as provided, you need to update obsoletes to 
fill **all** package names that provide that file path.


I refuse to do that myself as it's pretty stupid.



>
>   php.spec | 3 ---
>   1 file changed, 3 deletions(-)
> ---
> diff --git a/php.spec b/php.spec
> index b1388c5..19ed4d3 100644
> --- a/php.spec
> +++ b/php.spec
> @@ -459,9 +459,6 @@ Summary:	/usr/bin/php symlink
>   Summary(pl.UTF-8):	Dowiązanie symboliczne /usr/bin/php
>   Group:		Development/Languages/PHP
>   Requires:	%{name}-cli = %{epoch}:%{version}-%{release}
> -%if "%_rpmversion" != "4.16.0"
> -Obsoletes:	/usr/bin/php
> -%endif
>   Obsoletes:	php-program < 4:5.3.28-7
>   



More information about the pld-devel-en mailing list