<p><b>@pmatilai</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/rpm-software-management/rpm/pull/1053#discussion_r375771770">build/rpmfc.c</a>:</p>
<pre style='color:#555'>> @@ -514,6 +514,22 @@ static ARGV_t runCmd(const char *cmd,
     return output;
 }
 
+static ARGV_t runCall(const char *cmd,
+                    const char *buildRoot, const char *fn)
+{
+
+    ARGV_t output = NULL;
+    char *fullcmd = rstrscat(NULL, "%{", cmd, " ", "%{?buildroot:buildroot/}", fn, "}", NULL);
</pre>
<p>Hmm, annoying but true. One simple way around this would be passing the argument via a separately defined macro, eg</p>
<pre><code>    char *path = rstrscat(NULL, buildRoot ? buildRoot : "", "/", fn, NULL);
    rpmPushMacro(NULL, "filename", NULL, path, 0);
    char *exp = rpmExpand("%{", cmd, "}", NULL);
    rpmPopMacro(NULL, "filename");
    ...
</code></pre>
<p>...and then use %{filename} instead of %{1} in the macro, but that's not very elegant. Maybe there should be a rpmPushMacroArg() or such to get around this in a generic way.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications&email_token=ADLPZUZ767JVOXDX5MRI5PLRBPVIHA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUPTPCY#discussion_r375771770">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZU4WIYFQZRQ7LF4TAJTRBPVIHANCNFSM4KQY4CVQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ADLPZU4OMPRAQFJB4RWL5MDRBPVIHA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUPTPCY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications\u0026email_token=ADLPZUZ767JVOXDX5MRI5PLRBPVIHA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUPTPCY#discussion_r375771770",
"url": "https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications\u0026email_token=ADLPZUZ767JVOXDX5MRI5PLRBPVIHA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUPTPCY#discussion_r375771770",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>