From 9ca9a5196b2e95e9d650f86a3c6513ea87c8ab8e Mon Sep 17 00:00:00 2001 From: Alexey Tourbin Date: Tue, 22 Jan 2013 00:47:15 +0000 Subject: [PATCH] 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) --- rpmspec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.7.4