From f87552ba669869339040ee1a72dd5844693dbac8 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 20 Nov 2006 11:45:56 +0000 Subject: cleanup --- urpm.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 8cdfcd0d..3aedba37 100644 --- a/urpm.pm +++ b/urpm.pm @@ -1874,17 +1874,16 @@ sub remove_obsolete_headers_in_cache { } } -#- handled flags: forcekey, all sub _update_media__handle_some_flags { - my ($urpm, $options) = @_; + my ($urpm, $forcekey, $all) = @_; foreach my $medium (grep { !$_->{ignore} } @{$urpm->{media}}) { - $options->{forcekey} and delete $medium->{'key-ids'}; + $forcekey and delete $medium->{'key-ids'}; if ($medium->{static}) { #- don't ever update static media $medium->{modified} = 0; - } elsif ($options->{all}) { + } elsif ($all) { #- if we're rebuilding all media, mark them as modified (except removable ones) $medium->{modified} ||= $medium->{url} !~ m!^removable!; } @@ -1925,7 +1924,7 @@ sub update_media { #- hdlist file, else build it from rpm files. $urpm->clean; - _update_media__handle_some_flags($urpm, \%options); + _update_media__handle_some_flags($urpm, $options{forcekey}, $options{all}); my $clean_cache = !$options{noclean}; my $second_pass; -- cgit v1.2.1