[Rpm-maint] [rpm-software-management/rpm] Add support for macro-only dependency generators (#1053)

Panu Matilainen notifications at github.com
Tue Feb 11 09:23:08 UTC 2020


pmatilai commented on this pull request.



> @@ -1784,6 +1784,29 @@ rpmDefineMacro(rpmMacroContext mc, const char * macro, int level)
     return rc;
 }
 
+int rpmMacroIsDefined(rpmMacroContext mc, const char *n)
+{
+    int defined = 0;
+    if ((mc = rpmmctxAcquire(mc)) != NULL) {
+	if (findEntry(mc, n, 0, NULL))
+	    defined = 1;
+	rpmmctxRelease(mc);
+    }
+    return defined;
+}
+
+int rpmMacroIsCallable(rpmMacroContext mc, const char *n)
+{

That seems to answer a different question (ie whether the macro was called with parameters or not). 

-- 
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/1053#discussion_r377516660
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200211/ea4968a3/attachment.html>


More information about the Rpm-maint mailing list