From: Alexey Tourbin Date: Tue, 22 Jan 2013 00:47:15 +0000 (+0000) Subject: Adjust rpmspec -P to invoke non-build parse X-Git-Tag: rpm-4.11.0-release~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ca9a5196b2e95e9d650f86a3c6513ea87c8ab8e;p=platform%2Fupstream%2Frpm.git Adjust rpmspec -P to invoke non-build parse In the query mode, rpmspecQuery puts the parser into non-build mode by invoking rpmSpecParse with (RPMSPEC_ANYARCH|RPMSPEC_FORCE) flags. The same flags should be applied in the parse mode, so that it is possible to preprocess specfiles separately, i.e. without also installing sources and patches. Signed-off-by: Panu Matilainen (cherry picked from commit 4eb824937ce536aeecdfdcab2d88e28083bba85b) --- diff --git a/rpmspec.c b/rpmspec.c index f7f6962..2027ffa 100644 --- a/rpmspec.c +++ b/rpmspec.c @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) argerror(_("no arguments given for parse")); while ((spath = poptGetArg(optCon)) != NULL) { - rpmSpec spec = rpmSpecParse(spath, 0, NULL); + rpmSpec spec = rpmSpecParse(spath, (RPMSPEC_ANYARCH|RPMSPEC_FORCE), NULL); if (spec == NULL) { ec++; continue;