[Rpm-maint] [rpm-software-management/rpm] Warn if a text is after %else or %endif (#625)

Panu Matilainen notifications at github.com
Mon Feb 4 11:14:22 UTC 2019


- the two cases only differ by the actual token, you should handle them by the same code and without unnecessary + 5 "magic" calculations.
- auxBuf is not used to modify the contents so it should be const
- Having several places parse the same tokens is generally an indication of something being wrong or at least sub-optimal, why can't this be handled where %else and %endif are otherwise parsed? (I'd think macro expansion shouldn't matter for this)
- "Not allowed" as an expression doesn't work this kind of context: it's not question whether you have a *permission* to place text someplace or not, it's simply a syntax error. 

Text following %endif is obviously a syntax error, but in case of %else I think it'd be more useful to simply treat any following text as a part of the else-branch.  Ie, make "%else %if 0%{?centos}" kind of thing actually work.

-- 
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/pull/625#issuecomment-460210732
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190204/0edfb021/attachment.html>


More information about the Rpm-maint mailing list