summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-07-30 17:31:15 +0000
committerOlivier Blin <oblin@mandriva.com>2009-07-30 17:31:15 +0000
commitb0521d1942ef977c490de319d0121a8770f074a1 (patch)
tree272df6bc27dff4469046e0552ce724c58d4ecf74
parentdfcc04ae19348402ecfe208a03b46ba22a3de849 (diff)
downloaddraklive-b0521d1942ef977c490de319d0121a8770f074a1.tar
draklive-b0521d1942ef977c490de319d0121a8770f074a1.tar.gz
draklive-b0521d1942ef977c490de319d0121a8770f074a1.tar.bz2
draklive-b0521d1942ef977c490de319d0121a8770f074a1.tar.xz
draklive-b0521d1942ef977c490de319d0121a8770f074a1.zip
use real partition size (remove hardcoded oem_rescue size)
-rwxr-xr-xdraklive3
1 files changed, 2 insertions, 1 deletions
diff --git a/draklive b/draklive
index d03128f..b9ec914 100755
--- a/draklive
+++ b/draklive
@@ -763,7 +763,8 @@ sub create_disk_master {
directory_usage($live->get_builddir . $live->{prefix}{build}{boot}) +
directory_usage($live->get_builddir . $live->{prefix}{build}{files}) +
70000000) :
- directory_usage($live->get_system_root) + 200000000 + 4500000000; #- FIXME: use size from $live->{media}{partitions}
+ directory_usage($live->get_system_root) + 200000000 + fold_left { $::a + $::b } map { $_->{size} * $common::SECTORSIZE } @{$live->{media}{partitions}};
+ #- FIXME: use size from $live->{media}{partitions} for / too
my @loops = allocate_master($live, $live->{media}, $dest, $disk_size, $live->{media}->get_media_setting('fs'));
my $slash_idx = $live->{media}->find_partition_index('/');