[Rpm-maint] [rpm-software-management/rpm] Conditional macro expansion fails (#127)
Panu Matilainen
notifications at github.com
Mon Jan 16 06:53:33 UTC 2017
Yup, see also https://bugzilla.redhat.com/show_bug.cgi?id=1397209. Whether it's truly *intentional* I don't know but AFAIK it's always been that way.
Fixing it is a simple matter of:
```
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -687,8 +687,10 @@ grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se,
* Append the results to main argv.
*/
{ ARGV_t av = NULL;
- char *s = xcalloc((lastc-se)+1, sizeof(*s));
- memcpy(s, se, (lastc-se));
+ char *s = NULL;
+
+ /* Expand possible macros in the arguments */
+ expandThis(mb, se, lastc-se, &s);
argvSplit(&av, s, " \t");
argvAppend(&argv, av);
```
...but it'd be changing a longstanding behavior and there's no telling what might break if we did that.
--
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/issues/127#issuecomment-272786395
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170115/306eeeff/attachment-0001.html>
More information about the Rpm-maint
mailing list