[PATCH] If not enough memory is installed, enforce swap partition creation (#498742).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 storage/__init__.py |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 34f0182..557deec 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -876,10 +876,16 @@ class Storage(object):
         errors.extend(self.anaconda.platform.checkBootRequest(boot))
 
         if not swaps:
-            warnings.append(_("You have not specified a swap partition.  "
-                              "Although not strictly required in all cases, "
-                              "it will significantly improve performance for "
-                              "most installations."))
+            if iutil.memInstalled() < isys.EARLY_SWAP_RAM:
+                errors.append(_("You have not specified a swap partition.  "
+                                "Due to the amount of memory present, a "
+                                "swap partition is required to complete "
+                                "installation."))
+            else:
+                warnings.append(_("You have not specified a swap partition.  "
+                                  "Although not strictly required in all cases, "
+                                  "it will significantly improve performance "
+                                  "for most installations."))
 
         for (mountpoint, dev) in filesystems.items():
             if mountpoint in mustbeonroot:
-- 
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux