summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2015-06-01 22:18:58 +0000
committerPascal Terjan <pterjan@gmail.com>2015-06-03 22:59:57 +0000
commit765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed (patch)
treeb67392b9dee275ce04dcd748305c64fa9b3dde8e /perl-install
parentb6e862baada2150b90964a79fca55c2b36924b9d (diff)
downloaddrakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.tar
drakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.tar.gz
drakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.tar.bz2
drakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.tar.xz
drakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.zip
only use current disk when auto partitioning, wiping disk, using free space (mga#16055)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/diskdrake/interactive.pm2
-rw-r--r--perl-install/fs/partitioning_wizard.pm6
-rw-r--r--perl-install/fsedit.pm7
-rw-r--r--perl-install/install/NEWS4
5 files changed, 15 insertions, 7 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index c713e1abe..50bd617e5 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,8 @@
- drakfont:
o fix moving fonts (mga#16074)
+- diskdrake, partitioning_wizard:
+ o only use current disk when auto partitioning, wiping disk,
+ using free space (mga#16055)
Version 16.102 - 29 May 2015
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 55059faaa..10b041053 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -363,7 +363,7 @@ sub Auto_allocate {
my %all_hds_ = %$all_hds;
$all_hds_{hds} = [ sort { $a == $hd ? -1 : 1 } fs::get::hds($all_hds) ];
- eval { fsedit::auto_allocate(\%all_hds_, $suggestions) };
+ eval { fsedit::auto_allocate(\%all_hds_, $suggestions, $hd) };
if ($@) {
$@ =~ /partition table already full/ or die;
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
index b222c0780..aa77acf89 100644
--- a/perl-install/fs/partitioning_wizard.pm
+++ b/perl-install/fs/partitioning_wizard.pm
@@ -104,7 +104,7 @@ sub partitionWizardSolutions {
my @hds_rw = grep { !$_->{readonly} } @$hds;
my @hds_can_add = grep { $_->{type} ne 'hd' || $_->can_add } @hds_rw;
if (fs::get::hds_free_space(@hds_can_add) > $min_linux) {
- $solutions{free_space} = [ 30, N("Use free space"), sub { fsedit::auto_allocate($all_hds, $partitions); 1 } ];
+ $solutions{free_space} = [ 30, N("Use free space"), sub { fsedit::auto_allocate($all_hds, $partitions, $o_target); 1 } ];
} else {
push @wizlog, N("Not enough free space to allocate new partitions") . ": " .
(@hds_can_add ?
@@ -238,7 +238,7 @@ filesystem checks will be run on your next boot into Microsoft Windows®")) if $
partition_table::adjust_local_extended($hd, $part);
partition_table::adjust_main_extended($hd);
- fsedit::auto_allocate($all_hds, $partitions);
+ fsedit::auto_allocate($all_hds, $partitions, $hd);
1;
}, \@ok_for_resize_fat ];
}
@@ -264,7 +264,7 @@ filesystem checks will be run on your next boot into Microsoft Windows®")) if $
title => N("Partitioning"),
interactive_help_id => 'takeOverHdConfirm' }) or return;
fsedit::partition_table_clear_and_initialize($all_hds->{lvms}, $hd, $in);
- fsedit::auto_allocate($all_hds, $partitions);
+ fsedit::auto_allocate($all_hds, $partitions, $hd);
1;
} ];
}
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 2e7e0d2d7..ddae28481 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -518,12 +518,13 @@ sub add {
}
sub allocatePartitions {
- my ($all_hds, $to_add) = @_;
+ my ($all_hds, $to_add, $o_hd) = @_;
my @to_add = @$to_add;
foreach my $part_ (fs::get::holes($all_hds, 'non_readonly')) {
my ($start, $size, $dev) = @$part_{"start", "size", "rootDevice"};
+ next if $o_hd && (($o_hd->{device} || $o_hd->{VG_name}) ne $dev);
my ($part, $suggested);
while ($suggested = suggest_part($part = { start => $start, size => 0, maxsize => $size, rootDevice => $dev },
$all_hds, \@to_add)) {
@@ -537,11 +538,11 @@ sub allocatePartitions {
}
sub auto_allocate {
- my ($all_hds, $o_suggestions) = @_;
+ my ($all_hds, $o_suggestions, $o_target) = @_;
my $before = listlength(fs::get::fstab($all_hds));
my $suggestions = $o_suggestions || $suggestions{simple};
- allocatePartitions($all_hds, $suggestions);
+ allocatePartitions($all_hds, $suggestions, $o_target);
if ($o_suggestions) {
auto_allocate_raids($all_hds, $suggestions);
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 1fdcabdc7..5fb073802 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,7 @@
+- diskdrake, partitioning_wizard:
+ o only use current disk when auto partitioning, wiping disk,
+ using free space (mga#16055)
+
Version 16.102 - 29 May 2015
- diskdrake: