From 99c7749870003c079c6d13a7415e227c89a9c4a0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 19 Dec 2007 14:57:17 +0000 Subject: move things where it should be done --- urpm/media.pm | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'urpm') diff --git a/urpm/media.pm b/urpm/media.pm index afcd9519..458cefc2 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -1244,7 +1244,7 @@ sub _read_cachedir_pubkey { unlink "$urpm->{cachedir}/partial/pubkey"; } -#- options: callback, force, nomd5sum, probe_with, quiet +#- options: callback, force, nomd5sum, probe_with, quiet, nopubkey, wait_lock #- (from _update_medium__parse_if_unmodified__local and _update_medium__parse_if_unmodified__remote) sub _update_medium_first_pass { my ($urpm, $medium, %options) = @_; @@ -1313,9 +1313,11 @@ sub _update_medium_first_pass { } } - #- make sure to rebuild base files and clear medium modified state. $medium->{modified} = 0; - $medium->{really_modified} = 1; + + _get_pubkey_and_descriptions($urpm, $medium, $options{nopubkey}); + _read_cachedir_pubkey($urpm, $medium, $options{wait_lock}); + generate_medium_names($urpm, $medium); 1; } @@ -1388,14 +1390,6 @@ sub update_media { return $updates_result{error} == 0; } - foreach my $medium (grep { !$_->{ignore} } @{$urpm->{media}}) { - if ($medium->{really_modified}) { - _get_pubkey_and_descriptions($urpm, $medium, $options{nopubkey}); - _read_cachedir_pubkey($urpm, $medium, $options{wait_lock}); - generate_medium_names($urpm, $medium); - } - } - if ($urpm->{modified}) { if ($options{noclean}) { #- clean headers cache directory to remove everything that is no longer -- cgit v1.2.1