diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-11-16 16:52:54 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-11-16 16:52:54 +0000 |
commit | 75fd52ab5f000ac95ef0344fab00d70c03fed671 (patch) | |
tree | f0ed712d3521909994a9f26b7285eb2a14e0464a /rpmdrake.pm | |
parent | a4249da5f0ec75eb3005814e05bf033b336e49ff (diff) | |
download | rpmdrake-75fd52ab5f000ac95ef0344fab00d70c03fed671.tar rpmdrake-75fd52ab5f000ac95ef0344fab00d70c03fed671.tar.gz rpmdrake-75fd52ab5f000ac95ef0344fab00d70c03fed671.tar.bz2 rpmdrake-75fd52ab5f000ac95ef0344fab00d70c03fed671.tar.xz rpmdrake-75fd52ab5f000ac95ef0344fab00d70c03fed671.zip |
Add more countries for update mirror selection. Fix retrieval of
nationality of mirrors.
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r-- | rpmdrake.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm index 1c68c9fe..a26e48a7 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -297,6 +297,7 @@ my %u2l = ( be => N("Belgium"), br => N("Brazil"), ca => N("Canada"), + ch => N("Switzerland"), cr => N("Costa Rica"), cz => N("Czech Republic"), de => N("Germany"), @@ -306,6 +307,7 @@ my %u2l = ( fi => N("Finland"), fr => N("France"), gr => N("Greece"), + hu => N("Hungary"), il => N("Israel"), it => N("Italy"), jp => N("Japan"), @@ -316,6 +318,7 @@ my %u2l = ( pt => N("Portugal"), ru => N("Russia"), se => N("Sweden"), + sk => N("Slovakia"), tw => N("Taiwan"), uk => N("United Kingdom"), zh => N("China"), @@ -387,7 +390,12 @@ sub mirrors { my @mirrors = map { my ($arch, $url) = m|\Q$distro_type\E([^:]*):(.+)|; if ($arch && compat_arch_for_updates($arch)) { my ($land, $goodness); - $url =~ m|\.\Q$_\E/| and $land = $_ foreach keys %u2l; + foreach (keys %u2l) { + if ($url =~ m|\.\Q$_\E/|) { + $land = $_; + last; + } + } $url =~ m|\W\Q$_\E/| and $land = $sites2countries{$_} foreach keys %sites2countries; each_index { $_ eq $land and $goodness ||= 100-$::i } (map { if_($tz =~ /^$_$/, @{$t2l{$_}}) } keys %t2l), @$us; { url => $url, land => $u2l{$land} || N("United States"), goodness => $goodness + rand() }; |