[Rpm-maint] [rpm-software-management/rpm] implement %elif (#613)

Panu Matilainen notifications at github.com
Tue Feb 5 09:38:00 UTC 2019


As mentioned in the warn-after-else PR, one of the things that bugs me here is multiple places to parse the same tokens. Have a function that parses the "line type", which you can then use in both place, maybe borrow a chapter from the macro engine builtins work?

The other coding style eyesore is elifEnabled, which just sticks out like a sore thumb (there's no ifEnabled, elseEnabled or endifEnabled). Find a way to do the branch-state tracking in nice, concise and consistent manner for everything. And I don't mean adding separate fooEnabled variables for them all.

Obviously %elif is an useful construct as such but my intuition has been against it all along, it's just that I haven't been able to pinpoint a concrete reason. The findings in #625 perhaps hint at why: one shouldn't build on a swamp without draining it first. As in, eliminate quirks and actually define the expected behavior before attempting to add anything new.

-- 
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/613#issuecomment-460571560
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190205/9ae1c1e8/attachment.html>


More information about the Rpm-maint mailing list