summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-05-12 04:31:12 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-05-18 04:47:17 +0200
commite3e2771c36485dc8015947d2898e49faa38d54bd (patch)
tree1e60c9f47440e642c8aa7b234f64cb9a5af5773f
parent51903043dcd6867d224066ff80d458b74153cd0b (diff)
downloaddraklive-install-e3e2771c36485dc8015947d2898e49faa38d54bd.tar
draklive-install-e3e2771c36485dc8015947d2898e49faa38d54bd.tar.gz
draklive-install-e3e2771c36485dc8015947d2898e49faa38d54bd.tar.bz2
draklive-install-e3e2771c36485dc8015947d2898e49faa38d54bd.tar.xz
draklive-install-e3e2771c36485dc8015947d2898e49faa38d54bd.zip
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.
-rw-r--r--NEWS2
-rwxr-xr-xdraklive-install3
2 files changed, 4 insertions, 1 deletions
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;