diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | urpm/mirrors.pm | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -8,6 +8,8 @@ o do not use --max-file-not-found=3 when downloading rpms (since rpms are "versioned") o use it even if nearest mirror is rsync +- library: + o allow mdkapplet-upgrade-helper to force $MIRRORLIST distro version Version 6.16 - 8 October 2008 diff --git a/urpm/mirrors.pm b/urpm/mirrors.pm index 37a06b40..0ea9b58f 100644 --- a/urpm/mirrors.pm +++ b/urpm/mirrors.pm @@ -169,6 +169,9 @@ sub _load_cache { $@ and $urpm->{error}("failed to read " . cache_file($urpm) . ": $@"); $_->{nb_uses} = 0 foreach values %$cache; } + if ($ENV{URPMI_ADDMEDIA_PRODUCT_VERSION} && delete $cache->{'$MIRRORLIST'}) { + $urpm->{log}('not using cached mirror list $MIRRORLIST since URPMI_ADDMEDIA_PRODUCT_VERSION is set'); + } $cache || {}; } sub _save_cache { @@ -283,8 +286,9 @@ sub _mandriva_mirrorlist { my $arch = $o_arch || $product_id->{arch}; my @para = grep { $_ } $ENV{URPMI_ADDMEDIA_REASON}; + my $product_version = $ENV{URPMI_ADDMEDIA_PRODUCT_VERSION} || $product_id->{version}; - "http://api.mandriva.com/mirrors/$product_type.$product_id->{version}.$arch.list" + "http://api.mandriva.com/mirrors/$product_type.$product_version.$arch.list" . (@para ? '?' . join('&', @para) : ''); } |