[PATCH] Adjust rpmspec -P to invoke non-build parse
Alexey Tourbin
alexey.tourbin at gmail.com
Tue Jan 22 00:47:15 UTC 2013
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.
---
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;
--
1.8.1
More information about the Rpm-list
mailing list