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

Michael Schroeder notifications at github.com
Thu Feb 6 10:16:57 UTC 2020


mlschroe 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)
+{

Wouldn't `rpmMacroIsParametric()` be a better name for this?

-- 
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#pullrequestreview-354336470
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200206/dd3bc0b9/attachment.html>


More information about the Rpm-maint mailing list