From e3e2771c36485dc8015947d2898e49faa38d54bd Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 12 May 2015 04:31:12 -0400 Subject: better reporting of insufficient space (mga#15257) When the live installer checks if there is sufficient space on the chosen root partition it subtracts 10% (or 65MB) from the available space to give some headroom. It's better to add the headroom to the required space, as this gives a more accurate message when there is insufficient space. --- NEWS | 2 ++ draklive-install | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4fd00bf..25e9b97 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- better reporting of insufficient space (mga#15257) + 2.4 - fix loosing i18n settings on !live install (mga#15273) diff --git a/draklive-install b/draklive-install index e54245e..42ac2f1 100755 --- a/draklive-install +++ b/draklive-install @@ -177,7 +177,8 @@ sub ask_partitions { fs::partitioning::choose_partitions_to_format($in, $fstab); my $total = get_total_size($in, $copy_source); - my $available = fs::any::getAvailableSpace($fstab, 'skip_mounted'); + my $available = fs::any::getAvailableSpace($fstab, 'skip_mounted', 1); + $total += fs::any::getNeededMinSpace($available); die N("Not enough space available (%s available while %s are needed)", formatXiB($available), formatXiB($total)) . "\n" if $total > $available; -- cgit v1.2.1