From d9b3ca50a7f1dba46efe4c9d5c2d98f308ad6a79 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 13 Sep 2007 14:58:37 +0000 Subject: - do not allow to upgrade i586->x86_64 or x86_64->i586 (#33370) --- perl-install/install/NEWS | 1 + perl-install/install/steps_interactive.pm | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'perl-install/install') diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 51dc386f9..ab95a0fdc 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,4 @@ +- do not allow to upgrade i586->x86_64 or x86_64->i586 (#33370) - do not configure "windows" bootloader entries for "hidden" partitions - fix unwrapped label (#33243) - fix grub hanging if /boot on xfs (#33267) diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm index b32c1fe8e..0be070e22 100644 --- a/perl-install/install/steps_interactive.pm +++ b/perl-install/install/steps_interactive.pm @@ -124,6 +124,7 @@ sub selectInstallClass { $_->{release} .= " ($_->{part}{device})" foreach @l; } + askInstallClass: my $p; $o->ask_from_({ title => N("Install/Upgrade"), messages => N("Is this an install or an upgrade?"), @@ -135,6 +136,15 @@ sub selectInstallClass { format => sub { ref($_[0]) ? N("Upgrade %s", $_[0]{release}) : translate($_[0]) } } ]); if (ref $p) { + if (arch() =~ /x86_64/ && $p->{arch} eq 'i586') { + $o->ask_warn('', N("Upgrade from a 32bit to a 64bit distribution is not supported")); + goto askInstallClass; + } + if (arch() =~ /i.86/ && $p->{arch} eq 'x86_64') { + $o->ask_warn('', N("Upgrade from a 64bit to a 32bit distribution is not supported")); + goto askInstallClass; + } + if ($p->{part}) { log::l("choosing to upgrade partition $p->{part}{device}"); $o->{migrate_device_names} = install::any::use_root_part($o->{all_hds}, $p->{part}, $o); -- cgit v1.2.1