summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/partition_table/gpt.pm5
3 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index fdc2ac150..09c4e0214 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,6 @@
- diskdrake:
o don't offer to format RAID or BIOS boot partition
+ o fix clearing an already filled GPT disk
o make clear a BIOS boot partition cannot have a mount point
Version 17.50 - 8 July 2016
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 82390140a..c1373fc7e 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,5 +1,6 @@
- fix starting spice-vdagentd
- partionning:
+ o auto_inst: fix clearing an already filled GPT disk
o don't offer to format RAID or BIOS boot partition
o make clear a BIOS boot partition cannot have a mount point
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index c5af99275..47cfa842e 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -79,6 +79,9 @@ sub write {
$partitions_killed = 1;
}
+ # sync libparted view with diskdrake one in order to prevent overlapping errors when adding partitions:
+ c::disk_delete_all($hd->{file}) if delete $hd->{sync_with_libparted};
+
foreach (@{$hd->{will_tell_kernel}}) {
my ($action, $part_number, $o_start, $o_size) = @$_;
my ($part) = grep { $_->{start} == $o_start && $_->{size} == $o_size } @$pt;
@@ -113,6 +116,8 @@ sub write {
sub initialize {
my ($class, $hd) = @_;
+ # sync libparted view with diskdrake one in order to prevent overlapping errors when adding partitions:
+ $hd->{sync_with_libparted} = 1;
# part_number starts at 1
my @raw = map { +{ part_number => $_ + 1 } } 0..$nb_primary-2;
$hd->{primary} = { raw => \@raw };