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

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



Looks good,

Regards,

Hans


On 06/09/2009 05:17 PM, Chris Lumens wrote:
---
  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:


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