Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-19 Thread Panu Matilainen
Merged #1392 into master.

-- 
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/1392#event-3892043957___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-19 Thread Panu Matilainen
Since there's no further feedback...

-- 
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/1392#issuecomment-711832987___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-14 Thread Panu Matilainen
@pmatilai pushed 1 commit.

5125725009f5ad50adf5a574b9e9f2fac16af13b  fixup! Wrap getopt() usage into 
internal helper


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1392/files/359b380a026b35d8f9fe27c66a20d272437dc6e5..5125725009f5ad50adf5a574b9e9f2fac16af13b
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-14 Thread Panu Matilainen
Oh, another good point. I probably had some vague idea about letting the 
callback handle errors if it wants, but it wasn't all that carefully thought 
out as you can see :sweat_smile:

I'll drop optopt from being passed, the current implementation doesn't need it 
and this is a private helper function so we can always just add it back if it 
becomes necessary. Just realized it's also missing RPM_GNUC_INTERNAL...

-- 
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/1392#issuecomment-708273973___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-14 Thread Michael Schroeder
Btw, is there a need to pass optopt? It's usually used to print an error 
message for unrecognized options, but in that case the callback is not called 
anyway. (It *is* called if your option string starts with ':' and there is no 
argument to an option that needs one, though.)

-- 
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/1392#issuecomment-708262363___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-14 Thread Panu Matilainen
Fixed to pass optopt around instead of opterr.

-- 
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/1392#issuecomment-708228238___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-13 Thread Panu Matilainen
Yeah, thanks for spotting. Will fix.

-- 
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/1392#issuecomment-708172511___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-13 Thread Michael Schroeder
I think you mean optopt instead of opterr, because opterr is for configuring 
getopt()'s error handling.

-- 
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/1392#issuecomment-707994114___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-09 Thread Panu Matilainen
Macros might want to pass along options meant for others while perhaps 
modifying some of them, without exposing it all to users.

Have "-" as the parametric macro opts string disable all options 
processing in rpm, allowing the macro to handle the raw argument list as they 
place.

Fixes: #547

The first two commits are infrastructure pre-requisites.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1392

-- Commit Summary --

  * Wrap getopt() usage into internal helper
  * Don't muck with parametric macro arguments of cli defines
  * Allow parametric macros to opt out of option processing (#547)

-- File Changes --

M doc/manual/macros.md (3)
M lib/poptALL.c (2)
M rpmio/Makefile.am (2)
M rpmio/macro.c (84)
A rpmio/rgetopt.c (44)
M rpmio/rpmlua.c (41)
M rpmio/rpmmacro_internal.h (4)
M tests/rpmmacro.at (12)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1392.patch
https://github.com/rpm-software-management/rpm/pull/1392.diff

-- 
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/1392
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint