Don't process spec %include in false branch of %if clauses (RhBug:782970)
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 28 Feb 2012 10:18:10 +0000 (12:18 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 28 Feb 2012 10:18:10 +0000 (12:18 +0200)
build/parseSpec.c

index abaf762..dbaaae3 100644 (file)
@@ -379,7 +379,7 @@ int readLine(rpmSpec spec, int strip)
        spec->readStack = spec->readStack->next;
        free(rl);
        spec->line[0] = '\0';
-    } else if (ISMACROWITHARG(s, "%include")) {
+    } else if (spec->readStack->reading && ISMACROWITHARG(s, "%include")) {
        char *fileName, *endFileName, *p;
 
        fileName = s+8;