[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)

nim-nim notifications at github.com
Fri Sep 28 10:02:38 UTC 2018


> Since you asked, here's a small proposal and a possible alternative.
> 
> Proposal: In a macro definition, using an argument string of `-` (as in `%define macro(-)`) indicates
> that getopt processing should not be done at all, and all supplied arguments and options should be
> delivered directly to the macro via `%*` (or `%**`, or even something else) without interpretation by
> RPM. `%#`, `%1` and such would not be valid in this case.

Thank you Jason

That's more or less what I had in mind, except I'd have used `%define macro(^)', and allowed mixing argument processors ie
 `%define macro(abcd:^)' → -a -b -c -d are handled the classic way, and every other flag including long, repeated, and non-flag arguments, is dumped to  `%**`  (ideally you have one variable for everything, and one variable for everything except flags rpm processed directly)

The actual magic character in `%define`, and the actual rpm variable where unprocessed flags are dumped, does not matter, as long as it exists and is documented.

But just disabling completely the classical argument processor works for me. Mixing is a convenience, any smarter argument processor can also do the basic processing rpm does today.


-- 
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-425387659
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180928/c3d241c9/attachment.html>


More information about the Rpm-maint mailing list