[PATCH] Adjust rpmspec -P to invoke non-build parse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux