summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2013-02-18 08:09:24 -0500
committerChris Lumens <clumens@redhat.com>2013-02-20 05:19:44 -0500
commitea49794d6167d12fd3f9041312409842da3c1a0e (patch)
tree479734dc83a762a7d03f91898a5a17d3a3949f23
parent43be59cf93969bffda7f7cf13d3635e69050ef42 (diff)
downloadanaconda-ea49794d6167d12fd3f9041312409842da3c1a0e.tar.gz
anaconda-ea49794d6167d12fd3f9041312409842da3c1a0e.tar.xz
anaconda-ea49794d6167d12fd3f9041312409842da3c1a0e.zip
If you cannot reclaim more space, don't show the reclaim radio (#911791).
The primary case for this is if you've got initially all blank disks, though you'd also hit it if you first went through reclaim and deleted everything, then went back to the install options dialogs.
-rw-r--r--anaconda.spec.in2
-rw-r--r--pyanaconda/ui/gui/spokes/storage.py22
2 files changed, 16 insertions, 8 deletions
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 7755fe88d..f3efd8343 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -69,7 +69,7 @@ BuildRequires: s390utils-devel
%endif
Requires: anaconda-widgets = %{version}-%{release}
-Requires: python-blivet
+Requires: python-blivet >= 0.6
Requires: gnome-icon-theme-symbolic
Requires: python-meh >= %{mehver}
Requires: libreport-anaconda >= 2.0.21-1
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 585440474..c52eb8d3c 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -51,6 +51,7 @@ from pyanaconda.ui.gui.categories.storage import StorageCategory
from pyanaconda.ui.gui.utils import enlightbox, gtk_call_once, gtk_thread_wait
from pyanaconda.kickstart import doKickstartStorage
+from blivet import empty_device
from blivet.size import Size
from blivet.errors import StorageError
from blivet.platform import platform
@@ -140,6 +141,7 @@ class InstallOptions1Dialog(GUIObject):
def __init__(self, *args, **kwargs):
self.payload = kwargs.pop("payload", None)
+ self.showReclaim = kwargs.pop("showReclaim", None)
GUIObject.__init__(self, *args, **kwargs)
def run(self):
@@ -171,12 +173,16 @@ class InstallOptions1Dialog(GUIObject):
label.set_line_wrap(True)
label.set_use_underline(True)
- label = self.builder.get_object("options1_reclaim_radio").get_children()[0]
- label.set_markup(_("<span font-desc=\"Cantarell 11\">I want more space. "
- "_Guide me through shrinking and/or removing partitions "
- "so I can have more space for %(productName)s.</span>") % {"productName": productName})
- label.set_line_wrap(True)
- label.set_use_underline(True)
+ radio = self.builder.get_object("options1_reclaim_radio")
+ if self.showReclaim:
+ label = radio.get_children()[0]
+ label.set_markup(_("<span font-desc=\"Cantarell 11\">I want more space. "
+ "_Guide me through shrinking and/or removing partitions "
+ "so I can have more space for %(productName)s.</span>") % {"productName": productName})
+ label.set_line_wrap(True)
+ label.set_use_underline(True)
+ else:
+ radio.hide()
label = self.builder.get_object("options1_custom_radio").get_children()[0]
label.set_markup(_("<span font-desc=\"Cantarell 11\">I want to review/_modify "
@@ -747,7 +753,9 @@ class StorageSpoke(NormalSpoke, StorageChecker):
log.debug("disk free: %s fs free: %s sw needs: %s auto swap: %s"
% (disk_free, fs_free, required_space, auto_swap))
if disk_free >= required_space + auto_swap:
- dialog = InstallOptions1Dialog(self.data)
+ showReclaim = not all(map(lambda dev: empty_device(dev, self.storage.devicetree),
+ self.disks))
+ dialog = InstallOptions1Dialog(self.data, showReclaim=showReclaim)
elif disks_size >= required_space:
dialog = InstallOptions2Dialog(self.data, payload=self.payload)
else: