diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/mirrors.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/urpm/mirrors.pm b/urpm/mirrors.pm index 29e30894..90be27b3 100644 --- a/urpm/mirrors.pm +++ b/urpm/mirrors.pm @@ -248,13 +248,16 @@ sub _mandriva_mirrorlist { my $product_type = lc($product_id->{type}); $product_id =~ s/\s//g; my $arch = $o_arch || $product_id->{arch}; - "http://api.mandriva.com/mirrors/$product_type.$product_id->{version}.$arch.list"; + my @para = grep { $_ } $ENV{URPMI_ADDMEDIA_REASON}; + + "http://api.mandriva.com/mirrors/$product_type.$product_id->{version}.$arch.list" + . (@para ? '?' . join(',', @para) : ''); } #- heuristic to detect wether it is really a mirrorlist or a simple mirror url: sub _is_only_one_mirror { my ($mirrorlist) = @_; - _expand($mirrorlist) !~ /\.list$/; + _expand($mirrorlist) !~ /\.list(\?|$)/; } sub _network_mtime() { (stat('/etc/resolv.conf'))[9] } |