Use new RPMVSF_MASK_* constants

This commit is contained in:
Florian Festi 2018-06-05 11:02:51 +02:00
parent 9dc1906c8d
commit c9cda9acde
4 changed files with 9 additions and 8 deletions

View File

@ -209,13 +209,13 @@ struct poptOption rpmcliAllPoptTable[] = {
N_("don't enable any plugins"), NULL },
{ "nodigest", '\0', POPT_BIT_SET,
&rpmcliVSFlags, _RPMVSF_NODIGESTS,
&rpmcliVSFlags, RPMVSF_MASK_NODIGESTS,
N_("don't verify package digest(s)"), NULL },
{ "nohdrchk", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
&rpmcliVSFlags, RPMVSF_NOHDRCHK,
N_("don't verify database header(s) when retrieved"), NULL },
{ "nosignature", '\0', POPT_BIT_SET,
&rpmcliVSFlags, _RPMVSF_NOSIGNATURES,
&rpmcliVSFlags, RPMVSF_MASK_NOSIGNATURES,
N_("don't verify package signature(s)"), NULL },
{ "pipe", '\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0, POPT_PIPE,

View File

@ -371,7 +371,8 @@ static int loadKeyringFromDB(rpmts ts)
static void loadKeyring(rpmts ts)
{
/* Never load the keyring if signature checking is disabled */
if ((rpmtsVSFlags(ts) & _RPMVSF_NOSIGNATURES) != _RPMVSF_NOSIGNATURES) {
if ((rpmtsVSFlags(ts) & RPMVSF_MASK_NOSIGNATURES) !=
RPMVSF_MASK_NOSIGNATURES) {
ts->keyring = rpmKeyringNew();
if (loadKeyringFromFiles(ts) == 0) {
if (loadKeyringFromDB(ts) > 0) {
@ -564,7 +565,7 @@ rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, size_t pktlen
return rc;
/* XXX keyring wont load if sigcheck disabled, force it temporarily */
rpmtsSetVSFlags(ts, (oflags & ~_RPMVSF_NOSIGNATURES));
rpmtsSetVSFlags(ts, (oflags & ~RPMVSF_MASK_NOSIGNATURES));
keyring = rpmtsGetKeyring(ts, 1);
rpmtsSetVSFlags(ts, oflags);

View File

@ -205,8 +205,8 @@ int main(int argc, char *argv[])
rpmVSFlags vsflags = 0;
/* XXX retain the ageless behavior of rpm2cpio */
vsflags |= _RPMVSF_NODIGESTS;
vsflags |= _RPMVSF_NOSIGNATURES;
vsflags |= RPMVSF_MASK_NODIGESTS;
vsflags |= RPMVSF_MASK_NOSIGNATURES;
vsflags |= RPMVSF_NOHDRCHK;
(void) rpmtsSetVSFlags(ts, vsflags);

View File

@ -49,8 +49,8 @@ int main(int argc, char *argv[])
rpmVSFlags vsflags = 0;
/* XXX retain the ageless behavior of rpm2cpio */
vsflags |= _RPMVSF_NODIGESTS;
vsflags |= _RPMVSF_NOSIGNATURES;
vsflags |= RPMVSF_MASK_NODIGESTS;
vsflags |= RPMVSF_MASK_NOSIGNATURES;
vsflags |= RPMVSF_NOHDRCHK;
(void) rpmtsSetVSFlags(ts, vsflags);