Do not evaluate macros in spec comments (RhBug:594672)
authorJindrich Novy <jnovy@redhat.com>
Fri, 21 May 2010 11:12:02 +0000 (13:12 +0200)
committerJindrich Novy <jnovy@redhat.com>
Fri, 21 May 2010 11:12:02 +0000 (13:12 +0200)
build/parseSpec.c

index f45022b..5d188cc 100644 (file)
@@ -130,6 +130,17 @@ static int copyNextLineFromOFI(rpmSpec spec, OFI_t *ofi)
        char *from, *to, *p;
        to = spec->lbufPtr ? spec->lbufPtr : spec->lbuf;
        from = ofi->readPtr;
+       if (from) {
+           SKIPSPACE(from);
+           if (*from == '#') {
+               ch = ' ';
+               from++;
+               while (*from && ch != '\n')
+                   ch = *from++;
+           } else {
+               from = ofi->readPtr;
+           }
+       }
        ch = ' ';
        while (from && *from && ch != '\n')
            ch = *to++ = *from++;