[Rpm-maint] [rpm-software-management/rpm] Error if a macro in a comment is expanded to multiple lines (#124)

MyungJoo Ham notifications at github.com
Thu Jan 12 14:21:27 UTC 2017


myungjoo commented on this pull request.



> @@ -207,10 +207,22 @@ static int expandMacrosInSpecBuf(rpmSpec spec, int strip)
 	    bufB++;
 	}
 
-	if (*bufA != '\0' || *bufB != '\0')
+	if (*bufA != '\0' || *bufB != '\0') {
+            char *s = lbuf;
+            /* If expanded macro, lbuf, is multiline, it is error. */
+            while (*s) {
+                if (*s == '\n') {
+                    rpmlog(RPMLOG_ERR,
+                        _("Macro expanded to multiple lines in comment on line %s: %s\n"),

Ooops. %s: %s --> %d: %s

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


More information about the Rpm-maint mailing list