diff options
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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('/'); |