diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-10-20 08:50:56 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-10-20 08:50:56 +0000 |
commit | 0ea81217c300f79da0b8571044d73ee347414c15 (patch) | |
tree | 481f90ca9ac0e0d7dc826ba61759481ac8210ecc /urpm | |
parent | cd07c34929ce9da30fdd4517b58e42df63ae3127 (diff) | |
download | urpmi-0ea81217c300f79da0b8571044d73ee347414c15.tar urpmi-0ea81217c300f79da0b8571044d73ee347414c15.tar.gz urpmi-0ea81217c300f79da0b8571044d73ee347414c15.tar.bz2 urpmi-0ea81217c300f79da0b8571044d73ee347414c15.tar.xz urpmi-0ea81217c300f79da0b8571044d73ee347414c15.zip |
handle {forcekey} elsewhere (for next commit)
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/media.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index 6f6c2a5e..2c12ca84 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -1557,7 +1557,7 @@ sub _read_cachedir_pubkey { join(',', keys %key_ids); } -#- options: callback, force, nomd5sum, probe_with, quiet, nopubkey, wait_lock +#- options: callback, force, nomd5sum, probe_with, quiet, forcekey, nopubkey, wait_lock #- (from _update_medium__parse_if_unmodified__local and _update_medium__parse_if_unmodified__remote) sub _update_medium_ { my ($urpm, $medium, %options) = @_; @@ -1575,6 +1575,10 @@ sub _update_medium_ { ? _update_medium__parse_if_unmodified__local($urpm, $medium, \%options) : _update_medium__parse_if_unmodified__remote($urpm, $medium, \%options); + if ($options{forcekey}) { + delete $medium->{'key-ids'}; + } + if (!$rc || $rc eq 'unmodified') { return $rc; } @@ -1634,11 +1638,9 @@ sub _update_medium { } sub _update_media__handle_some_flags { - my ($urpm, $forcekey, $all) = @_; + my ($urpm, $all) = @_; foreach my $medium (non_ignored_media($urpm)) { - $forcekey and delete $medium->{'key-ids'}; - if ($medium->{static}) { #- don't ever update static media $medium->{modified} = 0; @@ -1674,7 +1676,7 @@ sub update_media { #- synthesis file, else build it from rpm files. clean($urpm); - _update_media__handle_some_flags($urpm, $options{forcekey}, $options{all}); + _update_media__handle_some_flags($urpm, $options{all}); my %updates_result; foreach my $medium (grep { $_->{modified} } non_ignored_media($urpm)) { |