summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Tourbin <alexey.tourbin@gmail.com>2013-01-22 00:47:15 +0000
committerPanu Matilainen <pmatilai@redhat.com>2013-01-29 09:48:30 +0200
commit6a39e63e78923462d1a67101edbe5293b2659cf7 (patch)
tree39a5526934ada7370ff656a4d49e9e1b0874c2fe
parent4d16e1ae2537027bf1ec425f0e82e0254adb940b (diff)
downloadrpm-6a39e63e78923462d1a67101edbe5293b2659cf7.tar.gz
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 <pmatilai@redhat.com> (cherry picked from commit 4eb824937ce536aeecdfdcab2d88e28083bba85b)
-rw-r--r--rpmspec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmspec.c b/rpmspec.c
index f7f6962d2..2027ffabf 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;