[rhel7-branch 1/5] Check that we have big enough free space for the partition request

vpodzime installerbot-noreply at redhat.com
Wed Jun 3 18:27:09 UTC 2015


From: Vratislav Podzimek <vpodzime at redhat.com>

Related: rhbz#978266
Related: rhbz#1202877
(cherry picked from commit 491cd3e92fe31a460344d96a5801d4fd75ddec6a)
---
 blivet/partitioning.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/blivet/partitioning.py b/blivet/partitioning.py
index 1141c37..50cfcb5 100644
--- a/blivet/partitioning.py
+++ b/blivet/partitioning.py
@@ -204,6 +204,11 @@ def _schedulePartitions(storage, disks, min_luks_entropy=0, requests=None):
                 log.debug("%s", stage1_device)
                 continue
 
+        if request.size > Size(all_free[0].getLength("B")):
+            # no big enough free space for the requested partition
+            raise NotEnoughFreeSpaceError(_("No big enough free space on disks for "
+                                            "automatic partitioning"))
+
         if request.encrypted and storage.encryptedAutoPart:
             fmt_type = "luks"
             fmt_args = {"passphrase": storage.encryptionPassphrase,


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/9832af28e8318606cbf7a8f4ff596a6f33b78a0b


More information about the anaconda-patches mailing list