[Rpm-maint] [rpm-software-management/rpm] Unclosed %if (when defined inside %define) (#1198)

Panu Matilainen notifications at github.com
Tue Aug 25 10:49:11 UTC 2020


Eliminating ambiguity (which is *always* buggy from somebody's perspective) is usually worth a fair amount of disruption in the end, and messy is in the eye of the beholder.

```
%define test() \
%if 1\
BUG\
%endif\
%{nil}
```

It's not that obvious whether the %if is meant for the spec parser inline, or whether it's meant to be part of the macro body.

```
%define test() \
%%if 1\
BUG\
%%endif\
%{nil}
```

This is certainly not *pretty*, but it does at least hint at %if being special here. And in fact it does seem to do the right thing as-is (although just briefly tested) so the only thing needed would be adding a warning about ambiguous %if and friends when not escaped, somehow.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1198#issuecomment-679950861
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200825/5df63201/attachment.html>


More information about the Rpm-maint mailing list