summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-06-25 09:42:32 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-06-25 09:42:32 +0000
commit720c384fd2ed6df516ceb5284aaac1bf785c3c94 (patch)
tree99a94cb24aeaa37b94dab3d80c0bc17e8200aead /urpm.pm
parenta0d6dc498b1d74c986c8ae143d9dd663b0b61d67 (diff)
downloadurpmi-720c384fd2ed6df516ceb5284aaac1bf785c3c94.tar
urpmi-720c384fd2ed6df516ceb5284aaac1bf785c3c94.tar.gz
urpmi-720c384fd2ed6df516ceb5284aaac1bf785c3c94.tar.bz2
urpmi-720c384fd2ed6df516ceb5284aaac1bf785c3c94.tar.xz
urpmi-720c384fd2ed6df516ceb5284aaac1bf785c3c94.zip
Make the verify-rpm being settable per-media in urpmi.cfg
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm25
1 files changed, 17 insertions, 8 deletions
diff --git a/urpm.pm b/urpm.pm
index 603fe881..5b732836 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -119,7 +119,7 @@ sub read_config {
#- per-media options
for my $m (grep { $_ ne '' } keys %$config) {
my $medium = { name => $m, clear_url => $config->{$m}{url} };
- for my $opt (qw(hdlist list with_hdlist removable md5sum key-ids update ignore synthesis virtual)) {
+ for my $opt (qw(hdlist list with_hdlist removable md5sum key-ids update ignore synthesis virtual verify-rpm)) {
defined $config->{$m}{$opt} and $medium->{$opt} = $config->{$m}{$opt};
}
$urpm->probe_medium($medium, %options) and push @{$urpm->{media}}, $medium;
@@ -2913,18 +2913,23 @@ sub check_sources_signatures {
if ($verif =~ /NOT OK/) {
$invalid_sources{$filepath} = N("Invalid signature (%s)", $verif);
} else {
- #print "+++$medium->{name}:$medium->{start}:$medium->{end}:$id\n";
unless ($medium &&
- defined $medium->{start} && $medium->{start} <= $id &&
- defined $medium->{end} && $id <= $medium->{end}) {
+ defined $medium->{start} && $medium->{start} <= $id &&
+ defined $medium->{end} && $id <= $medium->{end})
+ {
$medium = undef;
foreach (@{$urpm->{media}}) {
- defined $_->{start} && $_->{start} <= $id && defined $_->{end} && $id <= $_->{end} and $medium = $_, last;
+ defined $_->{start} && $_->{start} <= $id
+ && defined $_->{end} && $id <= $_->{end}
+ and $medium = $_, last;
}
}
+ #- check whether verify-rpm is specifically disabled for this medium
+ $medium && defined $medium->{'verify-rpm'} && !$medium->{'verify-rpm'}
+ and next;
my $key_ids = $medium && $medium->{'key-ids'} || $urpm->{options}{'key-ids'};
- #- check the key ids of the medium are matching (all) the given key id of the package.
+ #- check that the key ids of the medium match the key ids of the package.
if ($key_ids) {
my $valid_ids = 0;
my $invalid_ids = 0;
@@ -2944,8 +2949,12 @@ sub check_sources_signatures {
}
}
#- invoke check signature callback.
- $options{callback} and $options{callback}->($urpm, $filepath, %options,
- id => $id, verif => $verif, why => $invalid_sources{$filepath});
+ $options{callback} and $options{callback}->(
+ $urpm, $filepath, %options,
+ id => $id,
+ verif => $verif,
+ why => $invalid_sources{$filepath},
+ );
}
}