diff options
| author | Olivier Blin <oblin@mandriva.com> | 2009-07-31 13:48:44 +0000 |
|---|---|---|
| committer | Olivier Blin <oblin@mandriva.com> | 2009-07-31 13:48:44 +0000 |
| commit | c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc (patch) | |
| tree | 6942793c13939076d65b16ac917fcb3a0d7108fb | |
| parent | c984b52d4c3ec1c771daca9cb07a78470f525bd8 (diff) | |
| download | drakiso-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.tar drakiso-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.tar.gz drakiso-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.tar.bz2 drakiso-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.tar.xz drakiso-c5a6346990d2bd2a8fd7c8a3ad4d10ecf0e0afcc.zip | |
use supplement_partitions and size correction for loopback systems too
| -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('/'); |
