diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-22 12:47:28 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-22 12:47:28 +0000 |
commit | f1366f20abed8cc250999a9fd7b333217b6048cc (patch) | |
tree | d7f7be9a05418d7644d8dc361d0975a11d7c03b1 /rpmdrake.pm | |
parent | b7ef9e8aa6e565b35bd7295ac6328f6f5776e815 (diff) | |
download | rpmdrake-f1366f20abed8cc250999a9fd7b333217b6048cc.tar rpmdrake-f1366f20abed8cc250999a9fd7b333217b6048cc.tar.gz rpmdrake-f1366f20abed8cc250999a9fd7b333217b6048cc.tar.bz2 rpmdrake-f1366f20abed8cc250999a9fd7b333217b6048cc.tar.xz rpmdrake-f1366f20abed8cc250999a9fd7b333217b6048cc.zip |
(choose_mirror,mirrors) accept an optional argument enabling to
override the architecture (needed for #28409)
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r-- | rpmdrake.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm index a8eea29b..83d8e6df 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -503,7 +503,7 @@ sub compat_arch_for_updates($) { } sub mirrors { - my ($cachedir, $want_base_distro) = @_; + my ($cachedir, $want_base_distro, $o_arch) = @_; $cachedir ||= '/root'; use mirror; mirror::register_downloader(sub { @@ -516,7 +516,8 @@ sub mirrors { $res and do { c::set_tagged_utf8($res); die $res }; return cat_($file); }); - my @mirrors = @{ mirror::list(common::parse_LDAP_namespace_structure(cat_('/etc/product.id')), $want_base_distro ? 'distrib' : 'updates') || [] }; + my @mirrors = @{ mirror::list(common::parse_LDAP_namespace_structure(cat_('/etc/product.id')), + ($want_base_distro ? 'distrib' : 'updates'), $o_arch) || [] }; require timezone; my $tz = ${timezone::read()}{timezone}; foreach my $mirror (@mirrors) { @@ -552,7 +553,7 @@ Is it ok to continue?"); : N("Please wait, downloading mirror addresses from the Mandriva website.")), @transient_options ); - my @mirrors = eval { mirrors('/var/cache/urpmi', $options{want_base_distro}) }; + my @mirrors = eval { mirrors('/var/cache/urpmi', $options{want_base_distro}, $options{arch}) }; my $error = $@; remove_wait_msg($wait); if ($error) { |