From 61432eb77184d9a2dc6da828a18f6d8f33f95812 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 3 Sep 2010 07:49:37 +0300 Subject: Use the common rpmcliQueryFlags for signature verify options in rpmbuild - The various --nosignature etc verification switches are common to everything, and have been available through rpmcliQueryFlags via the common popt table since 2002. Might as well finally use it to limit the amount of duplicate popt goo. --- rpmbuild.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'rpmbuild.c') diff --git a/rpmbuild.c b/rpmbuild.c index a8b6b80e5..975364e6c 100644 --- a/rpmbuild.c +++ b/rpmbuild.c @@ -49,7 +49,6 @@ static struct rpmBuildArguments_s rpmBTArgs; extern int _fsm_debug; static rpmSpecFlags spec_flags = 0; /*!< Bit(s) to control spec parsing. */ -static rpmVerifyFlags qva_flags = 0; /*!< Bit(s) to control verification */ static int noDeps = 0; /*!< from --nodeps */ static int shortCircuit = 0; /*!< from --short-circuit */ static char buildMode = 0; /*!< Build mode (one of "btBC") */ @@ -105,18 +104,6 @@ static void buildArgCallback( poptContext con, argvSplit(&build_targets, arg, ","); break; - case RPMCLI_POPT_NODIGEST: - qva_flags |= VERIFY_DIGEST; - break; - - case RPMCLI_POPT_NOSIGNATURE: - qva_flags |= VERIFY_SIGNATURE; - break; - - case RPMCLI_POPT_NOHDRCHK: - qva_flags |= VERIFY_HDRCHK; - break; - case RPMCLI_POPT_FORCE: spec_flags |= RPMSPEC_FORCE; break; @@ -195,13 +182,6 @@ static struct poptOption rpmBuildPoptTable[] = { N_("generate package header(s) compatible with (legacy) rpm v3 packaging"), NULL}, - { "nodigest", '\0', POPT_ARGFLAG_DOC_HIDDEN, 0, RPMCLI_POPT_NODIGEST, - N_("don't verify package digest(s)"), NULL }, - { "nohdrchk", '\0', POPT_ARGFLAG_DOC_HIDDEN, 0, RPMCLI_POPT_NOHDRCHK, - N_("don't verify database header(s) when retrieved"), NULL }, - { "nosignature", '\0', POPT_ARGFLAG_DOC_HIDDEN, 0, RPMCLI_POPT_NOSIGNATURE, - N_("don't verify package signature(s)"), NULL }, - { "nolang", '\0', POPT_ARGFLAG_DOC_HIDDEN, 0, POPT_NOLANG, N_("do not accept i18N msgstr's from specfile"), NULL}, { "rmsource", '\0', 0, 0, POPT_RMSOURCE, @@ -496,11 +476,11 @@ static int build(rpmts ts, const char * arg, BTA_t ba, const char * rcfile) rpmVSFlags vsflags, ovsflags; vsflags = rpmExpandNumeric("%{_vsflags_build}"); - if (qva_flags & VERIFY_DIGEST) + if (rpmcliQueryFlags & VERIFY_DIGEST) vsflags |= _RPMVSF_NODIGESTS; - if (qva_flags & VERIFY_SIGNATURE) + if (rpmcliQueryFlags & VERIFY_SIGNATURE) vsflags |= _RPMVSF_NOSIGNATURES; - if (qva_flags & VERIFY_HDRCHK) + if (rpmcliQueryFlags & VERIFY_HDRCHK) vsflags |= RPMVSF_NOHDRCHK; ovsflags = rpmtsSetVSFlags(ts, vsflags); -- cgit v1.2.3