aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-02 17:22:05 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-02 17:22:05 +0000
commita2247c42c49221f0a43c26df33c140f71c6a26c6 (patch)
treea04ba60b2dae9e4a3dbee9ee38966422cad343f8
parentb89f167889126991bf0443e2808cb6731a39a615 (diff)
downloadperl-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.xs9
1 files changed, 4 insertions, 5 deletions
diff --git a/URPM.xs b/URPM.xs
index 2b580cd..c13afa5 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -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 {