summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-07-31 13:48:44 +0000
committerOlivier Blin <oblin@mandriva.com>2009-07-31 13:48:44 +0000
commitc5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc (patch)
tree6942793c13939076d65b16ac917fcb3a0d7108fb
parentc984b52d4c3ec1c771daca9cb07a78470f525bd8 (diff)
downloaddraklive-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.tar
draklive-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.tar.gz
draklive-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.tar.bz2
draklive-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.tar.xz
draklive-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.zip
use supplement_partitions and size correction for loopback systems too
-rwxr-xr-xdraklive16
1 files changed, 9 insertions, 7 deletions
diff --git a/draklive b/draklive
index b0bdee2..027c6f5 100755
--- a/draklive
+++ b/draklive
@@ -719,16 +719,18 @@ sub allocate_master {
sub create_disk_master {
my ($live, $opts) = @_;
- $live->{media}->supplement_partitions(directory_usage($live->get_system_root));
-
- my $dest = get_disk_master_path($live);
- my $disk_size = @{$live->{mount}{dirs} || []} ?
+ my $slash_size = @{$live->{mount}{dirs} || []} ?
#- dumb guess, a bit too large, and valid for FAT only
(directory_usage($live->get_builddir . $live->{prefix}{build}{loopbacks}) +
directory_usage($live->get_builddir . $live->{prefix}{build}{boot}) +
- directory_usage($live->get_builddir . $live->{prefix}{build}{files}) +
- 70000000) :
- fold_left { $::a + $::b } map { $_->{size} * $common::SECTORSIZE } @{$live->{media}{partitions}};
+ directory_usage($live->get_builddir . $live->{prefix}{build}{files})
+ ) :
+ directory_usage($live->get_system_root);
+
+ $live->{media}->supplement_partitions($slash_size);
+
+ my $dest = get_disk_master_path($live);
+ my $disk_size = fold_left { $::a + $::b } map { $_->{size} * $common::SECTORSIZE } @{$live->{media}{partitions}};
my @loops = allocate_master($live, $live->{media}, $dest, $disk_size);
my $slash_idx = $live->{media}->find_partition_index('/');