summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-14 16:25:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-14 16:25:34 +0000
commitbddb76217619838f984ae2ba9fbfb434efed9ffd (patch)
treed74a4f3f0af9b2c2edeefff3760d72e22d4509ca
parenteacdcc8d107d045eb6c86997ade1cdb7d4cd1e04 (diff)
downloaddrakx-bddb76217619838f984ae2ba9fbfb434efed9ffd.tar
drakx-bddb76217619838f984ae2ba9fbfb434efed9ffd.tar.gz
drakx-bddb76217619838f984ae2ba9fbfb434efed9ffd.tar.bz2
drakx-bddb76217619838f984ae2ba9fbfb434efed9ffd.tar.xz
drakx-bddb76217619838f984ae2ba9fbfb434efed9ffd.zip
- diskdrake:
o final fix for resizing's failures due to udev's race (when writing the partition, do not del/add the same partition)
-rw-r--r--perl-install/NEWS4
-rw-r--r--perl-install/partition_table.pm4
2 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index c6ce6ef63..2b2755079 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,7 @@
+- diskdrake:
+ o final fix for resizing's failures due to udev's race
+ (when writing the partition, do not del/add the same partition)
+
Version 10.6.18 - 12 February 2008
- handle 'icon-pressed' signal of Gtk2::Sexy::IconEntry
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 7fec13559..dd4a295f0 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -378,7 +378,9 @@ sub tell_kernel {
my $force_reboot = any { $_->[0] eq 'force_reboot' } @$tell_kernel;
if (!$force_reboot) {
- foreach (@$tell_kernel) {
+ # only keep the last action on the partition number
+ # that way we do not del/add the same partition, and this helps udev :)
+ foreach (reverse(uniq_ { $_->[1] } reverse @$tell_kernel)) {
my ($action, $part_number, $o_start, $o_size) = @$_;
if ($action eq 'add') {