aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-07-26 07:51:23 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-07-26 07:51:23 +0000
commit40438484786f851ac2787785dab147ed5a1826f4 (patch)
treeb34defdac364d36bf2183f6b557c99a88945cfda
parent3633f5c5e49047c700f6ac3862e565b4c3ed154b (diff)
downloadrpmdrake-40438484786f851ac2787785dab147ed5a1826f4.tar
rpmdrake-40438484786f851ac2787785dab147ed5a1826f4.tar.gz
rpmdrake-40438484786f851ac2787785dab147ed5a1826f4.tar.bz2
rpmdrake-40438484786f851ac2787785dab147ed5a1826f4.tar.xz
rpmdrake-40438484786f851ac2787785dab147ed5a1826f4.zip
merge 64bit fixes from AMD64 tree
-rw-r--r--rpmdrake.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index a7ea6213..98b6a3a9 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -351,6 +351,14 @@ sub distro_type {
: 'updates';
}
+sub compat_arch_for_updates($) {
+ # FIXME: We prefer 64-bit packages to update on biarch platforms,
+ # since the system is populated with 64-bit packages anyway.
+ my ($arch) = @_;
+ return $arch =~ /x86_64|amd64/ if (arch() eq 'x86_64');
+ MDK::Common::System::compat_arch($arch);
+}
+
sub mirrors {
my ($cachedir) = @_;
my $distro_type = distro_type();
@@ -362,7 +370,7 @@ sub mirrors {
require timezone;
my $tz = ${timezone::read()}{timezone};
my @mirrors = map { my ($arch, $url) = m|\Q$distro_type\E([^:]*):(.+)|;
- if ($arch && MDK::Common::System::compat_arch($arch)) {
+ if ($arch && compat_arch_for_updates($arch)) {
my ($land, $goodness);
$url =~ m|\.\Q$_\E/| and $land = $_ foreach keys %u2l;
$url =~ m|\W\Q$_\E/| and $land = $sites2countries{$_} foreach keys %sites2countries;