[Rpm-maint] [rpm-software-management/rpm] Implement -e(xpand) and -g(lobal) options to %define (PR #4194)
Michal Domonkos
notifications at github.com
Tue Apr 28 16:01:28 UTC 2026
@dmnks commented on this pull request.
> @@ -608,6 +609,30 @@ doDefine(rpmMacroBuf mb, const std::string & str, int level, int expandbody, siz
int flags = ME_NONE;
std::string name, opts, mods, body;
+ /* Parse options if enabled */
+ while (handleopts) {
+ SKIPBLANK(s, c);
+ if (*s == '-') {
+ while (!risblank(*(++s))) {
+ switch (*s) {
+ case 'e':
+ expandbody = 1;
+ break;
+ case 'g':
+ level = RMIL_GLOBAL;
+ break;
+ default:
I wonder if we should handle the case where `-` is not followed by any option letter. If it's a space, it will silently skip the parsing (no error). If it's the end of string, it will print a non-sense error message (i.e. only up to the first apostrophe).
Speaking of an incomplete `%define`, we're now also aborting due to an assertion failure (filed as #4195 just now).
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4194#pullrequestreview-4190456082
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/4194/review/4190456082 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260428/b746f4c7/attachment.htm>
More information about the Rpm-maint
mailing list