Do not setup macro args for literal macros
They cannot make use of the arguments, so it makes no sense to set them up.
This commit is contained in:
parent
48825725e6
commit
162b2d3a33
|
@ -1363,15 +1363,14 @@ doMacro(MacroBuf mb, rpmMacroEntry me, ARGV_t args, size_t *parsed)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
me->func(mb, me, args, parsed);
|
me->func(mb, me, args, parsed);
|
||||||
|
} else if (me->flags & ME_LITERAL) {
|
||||||
|
if (me->body && *me->body)
|
||||||
|
mbAppendStr(mb, me->body);
|
||||||
} else if (me->body && *me->body) {
|
} else if (me->body && *me->body) {
|
||||||
/* Setup args for "%name " macros with opts */
|
/* Setup args for "%name " macros with opts */
|
||||||
if (args != NULL)
|
if (args != NULL)
|
||||||
setupArgs(mb, me, args);
|
setupArgs(mb, me, args);
|
||||||
|
expandMacro(mb, me->body, 0);
|
||||||
if ((me->flags & ME_LITERAL) != 0)
|
|
||||||
mbAppendStr(mb, me->body);
|
|
||||||
else
|
|
||||||
expandMacro(mb, me->body, 0);
|
|
||||||
/* Free args for "%name " macros with opts */
|
/* Free args for "%name " macros with opts */
|
||||||
if (args != NULL)
|
if (args != NULL)
|
||||||
freeArgs(mb);
|
freeArgs(mb);
|
||||||
|
|
Loading…
Reference in New Issue