summaryrefslogtreecommitdiff
path: root/build/parseSpec.c
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2010-05-21 13:12:02 +0200
committerJindrich Novy <jnovy@redhat.com>2010-05-21 13:12:02 +0200
commit8cb7b9085c58aff778ecda18d2073af2fa7082df (patch)
tree21aaf79105ed90eda2bc6c16641bddd2da5abf4c /build/parseSpec.c
parent2d468d2cd9d2a5e2f9adcdecdd9f017fe04eb77a (diff)
downloadlibrpm-tizen-8cb7b9085c58aff778ecda18d2073af2fa7082df.tar.gz
librpm-tizen-8cb7b9085c58aff778ecda18d2073af2fa7082df.tar.bz2
librpm-tizen-8cb7b9085c58aff778ecda18d2073af2fa7082df.zip
Do not evaluate macros in spec comments (RhBug:594672)
Diffstat (limited to 'build/parseSpec.c')
-rw-r--r--build/parseSpec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/parseSpec.c b/build/parseSpec.c
index f45022b84..5d188cc5a 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++;