[Rpm-maint] [rpm-software-management/rpm] Warn if %else is after %else (#649)

Panu Matilainen notifications at github.com
Thu Apr 11 06:47:34 UTC 2019


> Another issue is that the %if-%else-%endif sanity checking now looks even more ad-hoc because some things look at spec->redStack->next and others at spec->readStack->ifStage.

BTW what I meant by that is there might be an opportunity here to unify all those %if-related checks to use ifStage which would probably make the whole thing far more obvious and readable. And taking that further, you could store the compatibility information in the implementedTypes[] table [*] and then instead of adding more checks, simply do a general check against the information in the table, you can even construct the different error messages from there because the table has the names. *That* would be a real improvement.

Also realized here that you don't actually *need* to move the enum to the header because it's only used for a fancy name of initializing the value to 0, which is redundant as it is because it's calloc()'ed to begin with. No objection to moving it though, just a remark.

-- 
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/649#issuecomment-481988312
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190410/2e40d9a8/attachment-0001.html>


More information about the Rpm-maint mailing list