diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-25 13:48:53 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-25 13:48:53 +0000 |
commit | ee089b81f89931bc8c9b80b173fa7a53ec1ecd07 (patch) | |
tree | 0f27d02974e725caeec27f3bd33a693c2a23a098 | |
parent | 0115e3a20daed9ebcc3bd4771f9b93ae56fdb9c9 (diff) | |
download | urpmi-ee089b81f89931bc8c9b80b173fa7a53ec1ecd07.tar urpmi-ee089b81f89931bc8c9b80b173fa7a53ec1ecd07.tar.gz urpmi-ee089b81f89931bc8c9b80b173fa7a53ec1ecd07.tar.bz2 urpmi-ee089b81f89931bc8c9b80b173fa7a53ec1ecd07.tar.xz urpmi-ee089b81f89931bc8c9b80b173fa7a53ec1ecd07.zip |
- urpmi, urpmi.addmedia, urpmi.update:
o handle variables $ARCH/$RELEASE in mirrorlist
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | urpm/mirrors.pm | 9 |
2 files changed, 8 insertions, 2 deletions
@@ -4,6 +4,7 @@ - urpmi, urpmi.addmedia, urpmi.update: o have fatal errors on some errors that must not happen (eg: moving rpm from download dir to cachedir) + o handle variables $ARCH/$RELEASE in mirrorlist - urpmi: o do not say "files are missing" when the downloaded rpm is corrupted diff --git a/urpm/mirrors.pm b/urpm/mirrors.pm index 17366b38..70fa5d13 100644 --- a/urpm/mirrors.pm +++ b/urpm/mirrors.pm @@ -111,8 +111,13 @@ sub _save_cache { sub _list { my ($urpm, $mirrorlist) = @_; - # expand the variable - $mirrorlist = _MIRRORLIST() if $mirrorlist eq '$MIRRORLIST'; + # expand the variables + if ($mirrorlist eq '$MIRRORLIST') { + $mirrorlist = _MIRRORLIST(); + } else { + require urpm::cfg; + $mirrorlist = urpm::cfg::expand_line($mirrorlist); + } my @mirrors = _mirrors_filtered($urpm, $mirrorlist); add_proximity_and_sort($urpm, \@mirrors); |