On Fri, May 02, 2008, Jeff Johnson wrote:
> 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.
That's correct: From over 1100 packages in OpenPKG only 5 used this. It
was mainly used when over a dozen vendor patches have to be applied as
then a single %patch line is far better than a dozen separate lines.
> 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.
I resolved the issue for me by just changing the 5 OpenPKG packages
to use separate %patch lines now. No big deal. But I wanted to drop you
a note here about this subtle incompatibility in case someone else also
stumbles over this when upgrading from RPM 4 to RPM 5.
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Fri May 2 18:03:06 2008