RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Just notice: small incompatibility between RPM 4 and 5 on %patch

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 02 May 2008 - 14:21:56 CEST
Message-Id: <F7E0E5D2-71B9-4911-87EB-D915884D10B1@mac.com>

On May 2, 2008, at 5:45 AM, Ralf S. Engelschall wrote:

> Just a heads up in case you have not noticed (like me): In RPM 5 % 
> patch
> is a regular macro while in RPM 4 it was a built-in "pseudo-macro".  
> The
> two are mostly compatible, but in RPM 4 one could have written "%patch
> ... -P 0 1 2 3" and get %Patch0, %Patch1, %Patch2 and %Patch3 applied.
> In RPM 5 only %Patch0 is applied because only the first argument is
> considered. Not a major problem, but something I stumbled over  
> currently
> (I wondered why some patches were not applied under RPM 5).
>

I personally have never seen -P 0 1 2 3 4 5 used in 10 years of dealing
with rpm. Yes, I may have forgotten, but the usage case is  
vanishingly small.

Some other more pleasant and useful syntax than array indexes in a tuple
is needed for spec files. The maintenance of, say, 50+ patches  
identified
by integers is a nightmare no matter how the patches are applied.

The convenience and expressive power of looping over a sparse/ordered  
set
of array indexes in a single %patch statement is a tortured design  
flaw imho.

But perhaps the macro processor can be tricked up to at least detect - 
P 0 1 2 3 ...
as a syntax failure.

73 de Jeff
Received on Fri May 2 14:22:35 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.