[PATCH 1/5] Remove hasFreeDiskSpace and related code.

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

 



This function is needless complication. If you only check for free
regions greater or equal to 100MB people will be blocked from
creating new PReP or BIOS BOOT partitions even though they should
not be. OTOH if you only check for 1MB of free space that is of
nearly no informational value when creating a new LVM PV as
compared to having no information at all.

Resolves: rhbz#683632
---
 iw/partition_gui.py     |   15 +--------------
 storage/partitioning.py |   14 --------------
 2 files changed, 1 insertions(+), 28 deletions(-)

diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index fe28581..6e4e7bf 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -49,7 +49,6 @@ from partIntfHelpers import *
 from constants import *
 from partition_ui_helpers_gui import *
 from storage.partitioning import doPartitioning
-from storage.partitioning import hasFreeDiskSpace
 from storage.devicelibs import lvm
 from storage.devices import devicePathToName, PartitionDevice
 from storage.devices import deviceNameToDiskByPath
@@ -1336,16 +1335,7 @@ class PartitionWindow(InstallWindow):
         # First we must decide what parts of the create_storage_dialog
         # we will activate.
 
-        # For the Partition checkboxes.
-        # If we see that there is free space in the "Hard Drive" list, then we
-        # must activate all the partition radio buttons (RAID partition,
-        # LVM partition and Standard partition).  We will have only one var to
-        # control all three activations (Since they all depend on the same
-        # thing)
-        activate_create_partition = False
-        free_part_available = hasFreeDiskSpace(self.storage)
-        if free_part_available:
-            activate_create_partition = True
+        activate_create_partition = True
 
         # We activate the create Volume Group radio button if there is a free
         # partition with a Physical Volume format.
@@ -1510,9 +1500,6 @@ class PartitionWindow(InstallWindow):
         whathave_lvm = P_("You currently have %d available PV free to use.\n",
                             "You currently have %d available PVs free to use.\n",
                             availpvs) % (availpvs, )
-        if free_part_available:
-            whathave_lvm = whathave_lvm + _("You currently have free space to "
-                    "create PVs.")
         lvminfo_message = "%s\n%s%s" % (whatis_lvm, whatneed_lvm, whathave_lvm)
         lvminfo_cb = lambda x : self.intf.messageWindow(_("About LVM"),
                                     lvminfo_message, custom_icon="information")
diff --git a/storage/partitioning.py b/storage/partitioning.py
index 3f39d18..501f1c3 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -1662,20 +1662,6 @@ def growPartitions(disks, partitions, free):
                     device.partedPartition = newpart
 
 
-def hasFreeDiskSpace(storage, exclusiveDisks=None):
-    """Returns True if there is at least 100Mb of free usable space in any of
-       the disks.  False otherwise.
-
-    """
-    # FIXME: This function needs to be implemented.  It is used, at least, by
-    # iw/partition_gui.py.  It should be implemented after the new
-    # doPartitioning code is commited for fedora 13.  Since it returns True
-    # the user will always be able to access the create partition screen. If
-    # no partition can be created, the user will go back to the previous
-    # storage state after seeing a warning message.
-    return True
-
-
 def lvCompare(lv1, lv2):
     """ More specifically defined lvs come first.
 
-- 
1.7.3.4

_______________________________________________
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