summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-12-05 00:02:21 +0000
committerThierry Vignaud <tv@mageia.org>2011-12-05 00:02:21 +0000
commit3ea97b01a3e427b419278e40717577bf53131bcc (patch)
tree63c2d1cd3bf1433d140f8aa7548eba4220c9450f
parent7d9774ed4242385bbd7f9631c60c838ce6f21cb1 (diff)
downloadurpmi-3ea97b01a3e427b419278e40717577bf53131bcc.tar
urpmi-3ea97b01a3e427b419278e40717577bf53131bcc.tar.gz
urpmi-3ea97b01a3e427b419278e40717577bf53131bcc.tar.bz2
urpmi-3ea97b01a3e427b419278e40717577bf53131bcc.tar.xz
urpmi-3ea97b01a3e427b419278e40717577bf53131bcc.zip
perl_checker cleanups
-rw-r--r--urpm/mirrors.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/urpm/mirrors.pm b/urpm/mirrors.pm
index 221062b1..25b4e04d 100644
--- a/urpm/mirrors.pm
+++ b/urpm/mirrors.pm
@@ -140,7 +140,7 @@ sub black_list {
sub _trigger_cache_update {
my ($urpm, $cache, $o_is_upgrade) = @_;
- my $reason = $o_is_upgrade?"reason=upgrade":"reason=update";
+ my $reason = $o_is_upgrade ? "reason=upgrade" : "reason=update";
$urpm->{log}("URPMI_ADDMEDIA_REASON $reason");
$ENV{URPMI_ADDMEDIA_REASON} = $reason;
%$cache = ();
@@ -156,17 +156,17 @@ sub _cache__may_clean_if_outdated {
if ($allow_cache_update) {
if ($cache->{network_mtime} && _network_mtime() > $cache->{network_mtime}) {
$urpm->{log}("not using cached mirror list $mirrorlist since network configuration changed");
- _trigger_cache_update ($urpm, $cache);
+ _trigger_cache_update($urpm, $cache);
} elsif ($cache->{time} &&
time() > $cache->{time} + 24*60*60 * $urpm->{options}{'days-between-mirrorlist-update'}) {
$urpm->{log}("not using outdated cached mirror list $mirrorlist");
- _trigger_cache_update ($urpm, $cache);
+ _trigger_cache_update($urpm, $cache);
} elsif (!$cache->{product_id_mtime}) {
$urpm->{log}("cached mirror list uses an old format, invalidating it");
- _trigger_cache_update ($urpm, $cache, 1);
+ _trigger_cache_update($urpm, $cache, 1);
} elsif ($cache->{product_id_mtime} && _product_id_mtime() != $cache->{product_id_mtime}) {
$urpm->{log}("not using cached mirror list $mirrorlist since product id file changed");
- _trigger_cache_update ($urpm, $cache, 1);
+ _trigger_cache_update($urpm, $cache, 1);
}
}
$cache;
@@ -304,7 +304,7 @@ sub _mandriva_mirrorlist {
#- contact the following URL to retrieve the list of mirrors.
#- http://wiki.mandriva.com/en/Product_id
- my $product_type = lc($product_id->{type}); $product_id =~ s/\s//g;
+ my $_product_type = lc($product_id->{type}); $product_id =~ s/\s//g;
my $arch = $o_arch || $product_id->{arch};
my @para = grep { $_ } $ENV{URPMI_ADDMEDIA_REASON};