aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs46
1 files changed, 21 insertions, 25 deletions
diff --git a/URPM.xs b/URPM.xs
index cda49ea..bd34967 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3469,28 +3469,23 @@ Urpm_parse_rpm(urpm, filename, ...)
keep_all_tags = SvTRUE(ST(i+1));
else if (len == 8 && !memcmp(s, "callback", 8) && SvROK(ST(i+1)))
callback = ST(i+1);
- 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 (SvIV(ST(i+1))) vsflags |= (RPMVSF_NOSHA1 | RPMVSF_NOSHA1HEADER);
- }
- else if (!memcmp(s, "nomd5", 5)) {
- if (SvIV(ST(i+1))) vsflags |= (RPMVSF_NOMD5 | RPMVSF_NOMD5HEADER);
- }
- else if (!memcmp(s, "norsa", 5)) {
- if (SvIV(ST(i+1))) vsflags |= (RPMVSF_NORSA | RPMVSF_NORSAHEADER);
- }
- else if (!memcmp(s, "nodsa", 5)) {
- if (SvIV(ST(i+1))) vsflags |= (RPMVSF_NODSA | RPMVSF_NODSAHEADER);
- }
+ else if (SvIV(ST(i+1))) {
+ if (len == 5) {
+ if (!memcmp(s, "nopgp", 5))
+ vsflags |= (RPMVSF_NOSHA1 | RPMVSF_NOSHA1HEADER);
+ else if (!memcmp(s, "nogpg", 5))
+ vsflags |= (RPMVSF_NOSHA1 | RPMVSF_NOSHA1HEADER);
+ else if (!memcmp(s, "nomd5", 5))
+ vsflags |= (RPMVSF_NOMD5 | RPMVSF_NOMD5HEADER);
+ else if (!memcmp(s, "norsa", 5))
+ vsflags |= (RPMVSF_NORSA | RPMVSF_NORSAHEADER);
+ else if (!memcmp(s, "nodsa", 5))
+ vsflags |= (RPMVSF_NODSA | RPMVSF_NODSAHEADER);
} else if (len == 9) {
- if (!memcmp(s, "nodigests", 9)) {
- if (SvIV(ST(i+1))) vsflags |= _RPMVSF_NODIGESTS;
- } else
- if (!memcmp(s, "nopayload", 9)) {
- if (SvIV(ST(i+1))) vsflags |= _RPMVSF_NOPAYLOAD;
+ if (!memcmp(s, "nodigests", 9))
+ vsflags |= _RPMVSF_NODIGESTS;
+ else if (!memcmp(s, "nopayload", 9))
+ vsflags |= _RPMVSF_NOPAYLOAD;
}
}
}
@@ -3536,10 +3531,11 @@ Urpm_verify_rpm(filename, ...)
for (i = 1 ; i < items - 1 ; i += 2) {
STRLEN len;
char *s = SvPV(ST(i), len);
- if (len == 9 && !strncmp(s, "nodigests", 9)) {
- if (SvIV(ST(i+1))) qva.qva_flags &= ~VERIFY_DIGEST;
- } else if (len == 12 && !strncmp(s, "nosignatures", 12)) {
- if (SvIV(ST(i+1))) qva.qva_flags &= ~VERIFY_SIGNATURE;
+ if (SvIV(ST(i+1))) {
+ if (len == 9 && !strncmp(s, "nodigests", 9))
+ qva.qva_flags &= ~VERIFY_DIGEST;
+ else if (len == 12 && !strncmp(s, "nosignatures", 12))
+ qva.qva_flags &= ~VERIFY_SIGNATURE;
}
}
fd = Fopen(filename, "r");