diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2004-08-25 05:32:54 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2004-08-25 05:32:54 +0000 |
commit | 339b99d3dffb333ed05205dc41e3532fe91a52e8 (patch) | |
tree | 674aaef6a8d0f5d405e878ac1241c5fdb4bb3ddb /perl-install | |
parent | e35814cc09c4c0feda92caefa03ebb77807a7ae2 (diff) | |
download | drakx-backup-do-not-use-339b99d3dffb333ed05205dc41e3532fe91a52e8.tar drakx-backup-do-not-use-339b99d3dffb333ed05205dc41e3532fe91a52e8.tar.gz drakx-backup-do-not-use-339b99d3dffb333ed05205dc41e3532fe91a52e8.tar.bz2 drakx-backup-do-not-use-339b99d3dffb333ed05205dc41e3532fe91a52e8.tar.xz drakx-backup-do-not-use-339b99d3dffb333ed05205dc41e3532fe91a52e8.zip |
Always prefer 64-bit packages for updates on biarch platforms.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/crypto.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm index 7cd0b2447..cf8495856 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 { my ($o_distro_type) = @_; @@ -60,7 +68,7 @@ sub mirrors { my $sub_dir = $distro_type =~ /cooker|community/ ? '' : ($::corporate ? '/corporate' : '') . '/' . version(); foreach (<$f>) { my ($arch, $url, $dir) = m|$distro_type([^:]*):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) { |