summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-10-08 15:11:19 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-10-08 15:11:19 +0000
commit08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b (patch)
treed4ac83387a701ae59f28f7e496d05e435d09473d /perl-install
parentc714e2f937473c686a888125c502faf28c34796b (diff)
downloaddrakx-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.tar
drakx-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.tar.gz
drakx-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.tar.bz2
drakx-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.tar.xz
drakx-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.zip
do not fail when a windows partition is corrupted
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs/partitioning_wizard.pm23
-rw-r--r--perl-install/install/NEWS4
2 files changed, 17 insertions, 10 deletions
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
index d27fc7369..f10e26f37 100644
--- a/perl-install/fs/partitioning_wizard.pm
+++ b/perl-install/fs/partitioning_wizard.pm
@@ -125,20 +125,25 @@ sub partitionWizardSolutions {
undef $part;
}
if ($part) {
- my $min_win = do {
+ my $min_win = eval {
my $_w = $in->wait_message(N("Resizing"), N("Computing the size of the Microsoft Windows® partition"));
$resize_fat->min_size;
};
- #- make sure that even after normalizing the size to cylinder boundaries, the minimun will be saved,
- #- this save at least a cylinder (less than 8Mb).
- $min_win += partition_table::raw::cylinder_size($hd);
-
- if ($part->{size} <= $min_linux + $min_swap + $min_freewin + $min_win) {
-# die N("Your Microsoft Windows® partition is too fragmented. Please reboot your computer under Microsoft Windows®, run the ``defrag'' utility, then restart the Mandriva Linux installation.");
+ if($@) {
+ log::l("The FAT resizer is unable to get minimal size for $part->{device} partition %s", formatError($@));
undef $part;
} else {
- $part->{resize_fat} = $resize_fat;
- $part->{min_win} = $min_win;
+ #- make sure that even after normalizing the size to cylinder boundaries, the minimun will be saved,
+ #- this save at least a cylinder (less than 8Mb).
+ $min_win += partition_table::raw::cylinder_size($hd);
+
+ if ($part->{size} <= $min_linux + $min_swap + $min_freewin + $min_win) {
+# die N("Your Microsoft Windows® partition is too fragmented. Please reboot your computer under Microsoft Windows®, run the ``defrag'' utility, then restart the Mandriva Linux installation.");
+ undef $part;
+ } else {
+ $part->{resize_fat} = $resize_fat;
+ $part->{min_win} = $min_win;
+ }
}
}
$part || ();
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 2c69903f4..d2c310e39 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,6 +1,8 @@
+- do not fail when a windows partition is corrupted
+
Version 12.60.1 - 7 October 2009
-- ude FileHandle before XML::Parser, else XML::Parser breaks if
+- use FileHandle before XML::Parser, else XML::Parser breaks if
File::Sync is used...
- include File::Sync in install