[Rpm-maint] [rpm-software-management/rpm] RFE: add some syntax to specify a macro should not fail when used with a flag not declared to rpm argument parsing (#547)

Jeff Johnson notifications at github.com
Thu Sep 27 21:37:55 UTC 2018


First: use a macro file, not a %define, to hide abc...XYZ. If you must have package specific macro overrides, the use %{load:...} and bury the override in a SourceN: directive. The most important reason to use a macrofile is readability: you can split a definition over multiple lines, unlike a %define, because macro files permit escaped new lines.

Second: if you don't want getopt(3) processing, then simply do not use a parameterized macro, and arrange for whatever helper you wish to execute to appear at the end of whatever expansion is attempted.

Third: your suggestion of the definition is at least a reasonable proposal. atm the string is exactly what getopt(3) expects, nothing more nor less. Parameterized macros cannot handle long options because getopt(3) cannot handle long options. And if the options/args are not parsed, then constructs like %* or %** are just "I want a pony" wishes.

Fourth: parameterized macros are not functions, nor is macro expansion anything more than recursive string substitution on mild steroids. If you have real programming needs, then use a real programming language like shell, Python, etc, instead of honking at length about rpm deficiencies.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/547#issuecomment-425251334
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180927/be0215c1/attachment.html>


More information about the Rpm-maint mailing list