summaryrefslogtreecommitdiffstats
path: root/partitioning.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-07-20 01:45:42 +0000
committerMatt Wilson <msw@redhat.com>2001-07-20 01:45:42 +0000
commit774b4fcd6f659c1caf8428021c85f67c37b86611 (patch)
tree25c6e238234f0d1d301e974f6305ba2a3b57db41 /partitioning.py
parentab3865fba0e6ddce1332cc4a76323198b1521a5a (diff)
downloadanaconda-774b4fcd6f659c1caf8428021c85f67c37b86611.tar.gz
anaconda-774b4fcd6f659c1caf8428021c85f67c37b86611.tar.xz
anaconda-774b4fcd6f659c1caf8428021c85f67c37b86611.zip
turn on swap early in lowmem (#46304), prevent you from editing once things are turned on (#46321)
Diffstat (limited to 'partitioning.py')
-rw-r--r--partitioning.py27
1 files changed, 26 insertions, 1 deletions
diff --git a/partitioning.py b/partitioning.py
index 59bced11a..08855127e 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -1334,7 +1334,19 @@ def doEditPartitionByRequest(intf, requestlist, part):
% (get_partition_name(part)))
-def partitioningComplete(dispatch, bl, fsset, diskSet, partitions):
+def partitioningComplete(bl, fsset, diskSet, partitions, intf, instPath, dir):
+ if dir == DISPATCH_BACK and fsset.isActive():
+ rc = intf.messageWindow(_("Installation cannot continue."),
+ _("The partitioning options you have chosen "
+ "have already been activated. You can "
+ "no longer return to the disk editing "
+ "screen. Would you like to continue "
+ "with the installation process?"),
+ type = "yesno")
+ if rc == 0:
+ sys.exit(0)
+ return DISPATCH_FORWARD
+
fsset.reset()
for request in partitions.requests:
# XXX improve sanity checking
@@ -1343,6 +1355,19 @@ def partitioningComplete(dispatch, bl, fsset, diskSet, partitions):
continue
entry = request.toEntry(partitions)
fsset.add (entry)
+ if iutil.memInstalled() > isys.EARLY_SWAP_RAM:
+ return
+ rc = intf.messageWindow(_("Low Memory"),
+ _("As you don't have much memory in this "
+ "machine, we need to turn on swap space "
+ "immediately. To do this we'll have to "
+ "write your new partition table to the disk "
+ "immediately. Is that okay?"), "okcancel")
+ if rc:
+ fsset.setActive(diskSet)
+ diskSet.savePartitions ()
+ fsset.formatSwap(instPath)
+ fsset.turnOnSwap(instPath)
def queryFormatPreExisting(intf):
rc = intf.messageWindow(_("Format?"),