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)
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;