summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-12-29 15:46:20 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-12-29 15:46:20 +0000
commitb4a24ec454b5ac63be0553cf53b079592a00c859 (patch)
tree1cade7870681fee9084f88b5af4d07024d02878c
parent489f53769c885c297ea597e61ae2423d18a93ea2 (diff)
downloaddrakx-b4a24ec454b5ac63be0553cf53b079592a00c859.tar
drakx-b4a24ec454b5ac63be0553cf53b079592a00c859.tar.gz
drakx-b4a24ec454b5ac63be0553cf53b079592a00c859.tar.bz2
drakx-b4a24ec454b5ac63be0553cf53b079592a00c859.tar.xz
drakx-b4a24ec454b5ac63be0553cf53b079592a00c859.zip
Always prefer native amd64 versions for updates.
-rw-r--r--perl-install/crypto.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index 30cc02c5a..ccd42bef3 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -44,6 +44,14 @@ use ftp;
%mirrors = ();
+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 mirror2text { $mirrors{$_[0]} && $mirrors{$_[0]}[0] . '|' . $_[0] }
sub mirrors() {
unless (keys %mirrors) {
@@ -56,7 +64,7 @@ sub mirrors() {
alarm 60;
foreach (<$f>) {
my ($arch, $url, $dir) = m|updates([^:]*):ftp://([^/]*)(/\S*)| or next;
- MDK::Common::System::compat_arch($arch) or
+ compat_arch_for_updates($arch) or
log::l("ignoring updates from $url because of incompatible arch: $arch"), next;
my $land = N("United States");
foreach (keys %url2land) {