Ignore bad expressions in %if conditionals
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 6 Sep 2013 07:11:49 +0000 (10:11 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 11 Jun 2014 14:48:03 +0000 (17:48 +0300)
Yet another hack to allow successful parsing of spec files in host
environment.

Change-Id: Ie47ee06b13d3e8a79e583fc6ec97350e45237cca
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
build/parseSpec.c

index 729d4fa..fb13704 100644 (file)
@@ -352,9 +352,9 @@ int readLine(rpmSpec spec, int strip)
         match = parseExpressionBoolean(spec, s);
        if (match < 0) {
            rpmlog(RPMLOG_ERR,
-                       _("%s:%d: bad %%if condition\n"),
+                       _("%s:%d: bad %%if condition, continuing nevertheless\n"),
                        ofi->fileName, ofi->lineNum);
-           return PART_ERROR;
+           match = 0;
        }
     } else if (ISMACRO(s, "%else")) {
        if (! spec->readStack->next) {