summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-28 17:47:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-28 17:47:42 +0000
commit82e7fa470773e0f2cca95d3f0ac76445960bdc89 (patch)
tree66c023446cb57a6f2fc86efecdb54daf9ca6c357 /perl-install/install
parent5a3539f4db4d5262c9090c35c1ee2273dd835123 (diff)
downloaddrakx-82e7fa470773e0f2cca95d3f0ac76445960bdc89.tar
drakx-82e7fa470773e0f2cca95d3f0ac76445960bdc89.tar.gz
drakx-82e7fa470773e0f2cca95d3f0ac76445960bdc89.tar.bz2
drakx-82e7fa470773e0f2cca95d3f0ac76445960bdc89.tar.xz
drakx-82e7fa470773e0f2cca95d3f0ac76445960bdc89.zip
- warn the user and propose to install/quit-install before upgrading from a
partition where "/" is ext3 with block-size 1KB to avoid kernel bug (#37583)
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS3
-rw-r--r--perl-install/install/steps_interactive.pm49
2 files changed, 52 insertions, 0 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 1986dfe5f..886dfd2dc 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,6 @@
+- warn the user and propose to install/quit-install before upgrading from a
+ partition where "/" is ext3 with block-size 1KB to avoid kernel bug (#37583)
+
Version 10.21 - 25 March 2008
- partitioning wizard: allow "Use free space" if there is an extended
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm
index 239b6c7bf..84984e32c 100644
--- a/perl-install/install/steps_interactive.pm
+++ b/perl-install/install/steps_interactive.pm
@@ -145,6 +145,11 @@ sub selectInstallClass {
goto askInstallClass;
}
+ _check_unsafe_upgrade_and_warn($o, $p->{part}) or $p = undef;
+ }
+
+ if (ref $p) {
+
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);
@@ -169,6 +174,50 @@ sub selectInstallClass {
}
}
+sub _check_unsafe_upgrade_and_warn {
+ my ($o, $part) = @_;
+ !_is_unsafe_upgrade($part) || _warn_unsafe_upgrade($o);
+}
+sub _is_unsafe_upgrade {
+ my ($part) = @_;
+
+ my $r = run_program::get_stdout('dumpe2fs', devices::make($part->{device}));
+ my $block_size = $r =~ /^Block size:\s*(\d+)/m && $1;
+ log::l("block_size $block_size");
+ $block_size == 1024;
+}
+sub _warn_unsafe_upgrade {
+ my ($o) = @_;
+
+ log::l("_warn_unsafe_upgrade");
+
+ my @choices = (
+ N_("Cancel installation, reboot system"),
+ N_("New Installation"),
+ N_("Upgrade previous installation (not recommended)"),
+ );
+
+ my $choice;
+ $o->ask_from_({ messages => N("Installer have detected your installed Mandriva Linux system could not
+safely be upgraded to %s.
+
+New installation replacing your previous one is recommended.
+
+Warning : you should backup all your personal data before choosing \"New
+Installation\".", 'Mandriva Linux 2008 Spring') },
+ [ { val => \$choice, type => 'list', list => \@choices, format => \&translate } ]);
+
+ log::l("_warn_unsafe_upgrade: got $choice");
+
+ if ($choice eq $choices[0]) {
+ any::reboot($o);
+ } elsif ($choice eq $choices[1]) {
+ undef;
+ } else {
+ 1;
+ }
+}
+
#------------------------------------------------------------------------------
sub selectMouse {
my ($o, $force) = @_;
ss='column1'>| * updated pot filePablo Saratxaga2003-07-292-90/+67 | * moved mkfs.xfsFrancois Pons2003-07-281-1/+1 | * updated pot filePablo Saratxaga2003-07-252-787/+757 | * removed ncompress (contrib)Frederic Lepied2003-07-241-1/+1 | * Added Uzbek cyrillic filePablo Saratxaga2003-07-231-0/+18251 | * updated pot filePablo Saratxaga2003-07-211-51/+117 | * updated pot filePablo Saratxaga2003-07-141-138/+418 | * changed "Country" . " / Region" to "Country / Region" and fixed Chinese po'sPablo Saratxaga2003-07-121-12/+7 | * updated pot filePablo Saratxaga2003-07-101-95/+129 | * updated pot filePablo Saratxaga2003-07-092-10998/+11474 | * install netprofile on laptopsFrederic Lepied2003-07-081-0/+1 | * iAdded various new keyboard layoutsPablo Saratxaga2003-07-011-0/+0 | * Moved Bokmaal file to nb.poPablo Saratxaga2003-06-281-21449/+0 | * Fixed typos; updated Ukrainian po filePablo Saratxaga2003-06-272-33/+33 | * updated pot filePablo Saratxaga2003-06-272-498/+721 | * use the mkswap commandPascal Rigaux2003-06-181-0/+1 | | | | | | | => simpler code and mkswap is not big => rely on mkswap for choosing the swap version (note that kernel 2.5 doesn't handle v0 swap anymore) * updated pot filePablo Saratxaga2003-06-162-458/+572 | * change a bit how strings are passed to advertising systemGuillaume Cottenceau2003-06-1216-1252/+1632 | | | | | | so that we don't specify absolute x,y positions for each paragraph, ending with overwritten text in some localizations * cookerGuillaume Cottenceau2003-06-061-0/+0 | * updated Estonien, Japanese, Albanian and Vietnamese po filesPablo Saratxaga2003-06-033-3301/+3539 | * UpdateArkadiusz Lipiec2003-06-021-195/+308 | * updated Spanish translationsFabián Mandelbaum2003-06-021-154/+271 | * changed the name of the russian phonetic layoutPablo Saratxaga2003-05-3147-6454/+11245 | * updated Vietnamese filePablo Saratxaga2003-05-302-67/+68 | * updated Albanian filePablo Saratxaga2003-05-281-5/+46 | * updated pot filePablo Saratxaga2003-05-261-3/+43 | * updated pot filePablo Saratxaga2003-05-222-75/+134 | * updated pot filePablo Saratxaga2003-05-202-98/+147 | * updated German, Estonian and Finnish filesPablo Saratxaga2003-05-203-1420/+1964 | * update french translationThierry Vignaud2003-05-201-67/+54 | * updated Spanish translationsFabián Mandelbaum2003-05-191-221/+176 | * updated pot filePablo Saratxaga2003-05-16