diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-02 17:22:05 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-02 17:22:05 +0000 |
commit | a2247c42c49221f0a43c26df33c140f71c6a26c6 (patch) | |
tree | a04ba60b2dae9e4a3dbee9ee38966422cad343f8 | |
parent | b89f167889126991bf0443e2808cb6731a39a615 (diff) | |
download | perl-URPM-a2247c42c49221f0a43c26df33c140f71c6a26c6.tar perl-URPM-a2247c42c49221f0a43c26df33c140f71c6a26c6.tar.gz perl-URPM-a2247c42c49221f0a43c26df33c140f71c6a26c6.tar.bz2 perl-URPM-a2247c42c49221f0a43c26df33c140f71c6a26c6.tar.xz perl-URPM-a2247c42c49221f0a43c26df33c140f71c6a26c6.zip |
Nits in verify_rpm.
-rw-r--r-- | URPM.xs | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -3363,10 +3363,7 @@ Urpm_verify_rpm(filename, ...) } else croak("db is not of type URPM::DB"); } else if (len == 5) { - if (!memcmp(s, "nopgp", 5)) { - if (SvIV(ST(i+1))) vsflags |= (RPMVSF_NOSHA1 | RPMVSF_NOSHA1HEADER); - } - else if (!memcmp(s, "nogpg", 5)) { + if (!memcmp(s, "nopgp", 5) || !memcmp(s, "nogpg", 5)) { if (SvIV(ST(i+1))) vsflags |= (RPMVSF_NOSHA1 | RPMVSF_NOSHA1HEADER); } else if (!memcmp(s, "nomd5", 5)) { @@ -3383,7 +3380,7 @@ Urpm_verify_rpm(filename, ...) if (SvIV(ST(i+1))) vsflags |= _RPMVSF_NODIGESTS; } else if (len == 12 && !memcmp(s, "nosignatures", 12)) { - vsflags |= _RPMVSF_NOSIGNATURES; + if (SvIV(ST(i+1))) vsflags |= _RPMVSF_NOSIGNATURES; } } RETVAL = NULL; @@ -3434,6 +3431,8 @@ Urpm_verify_rpm(filename, ...) RETVAL = buffer; break; default: /* can't happen */ + sprintf(buffer, "Unknown return value %d (NOT OK)", rc); + RETVAL = buffer; break; } } else { |