diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-10-20 09:07:11 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-10-20 09:07:11 +0000 |
commit | f5486901b3c1947971af3f1e7fd56000b39e778e (patch) | |
tree | a8ec2040aea59ea665943441c20e0f790bb58170 /urpm/media.pm | |
parent | 063bcd594d5af742704df30f3a8eaea428bba423 (diff) | |
download | urpmi-f5486901b3c1947971af3f1e7fd56000b39e778e.tar urpmi-f5486901b3c1947971af3f1e7fd56000b39e778e.tar.gz urpmi-f5486901b3c1947971af3f1e7fd56000b39e778e.tar.bz2 urpmi-f5486901b3c1947971af3f1e7fd56000b39e778e.tar.xz urpmi-f5486901b3c1947971af3f1e7fd56000b39e778e.zip |
cleanup: split _get_pubkey_and_descriptions() into _get_descriptions() and _may_get_pubkey()
Diffstat (limited to 'urpm/media.pm')
-rw-r--r-- | urpm/media.pm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index c7576787..d0291b8e 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -1516,9 +1516,8 @@ sub _get_pubkey { $urpm->{modified} = 1; } -# options: wait_lock, nopubkey, forcekey -sub _get_pubkey_and_descriptions { - my ($urpm, $medium, %options) = @_; +sub _get_descriptions { + my ($urpm, $medium) = @_; my $local = file_from_local_medium($medium); @@ -1526,7 +1525,12 @@ sub _get_pubkey_and_descriptions { if ($medium->{update}) { ($local ? \&get_descriptions_local : \&get_descriptions_remote)->($urpm, $medium); } +} +# options: wait_lock, nopubkey, forcekey +sub _may_get_pubkey { + my ($urpm, $medium, %options) = @_; + _get_pubkey($urpm, $medium, $options{wait_lock}) if !$options{nopubkey} && (!$medium->{'key-ids'} || $options{forcekey}); } @@ -1621,7 +1625,8 @@ sub _update_medium_ { # generated on first _parse_media() unlink statedir_names($urpm, $medium); - _get_pubkey_and_descriptions($urpm, $medium, %options); + _get_descriptions($urpm, $medium); + _may_get_pubkey($urpm, $medium, %options); $is_updating and $urpm->{info}(N("updated medium \"%s\"", $medium->{name})); |