From 8cb7b9085c58aff778ecda18d2073af2fa7082df Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Fri, 21 May 2010 13:12:02 +0200 Subject: [PATCH] Do not evaluate macros in spec comments (RhBug:594672) --- build/parseSpec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build/parseSpec.c b/build/parseSpec.c index f45022b..5d188cc 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -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++; -- 2.7.4