summaryrefslogtreecommitdiffstats
path: root/pyanaconda/installclass.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2012-08-06 09:55:12 -0500
committerDavid Lehman <dlehman@redhat.com>2012-08-13 11:54:04 -0500
commitb3f661055ca61e099f1d183c3bb9e711fd31f0c7 (patch)
tree56086f8c175eee235539c01f6534d504c07b4675 /pyanaconda/installclass.py
parent03a3daa8e493e25bec3cf5ef1a7912396d19c15f (diff)
downloadanaconda-b3f661055ca61e099f1d183c3bb9e711fd31f0c7.tar.gz
anaconda-b3f661055ca61e099f1d183c3bb9e711fd31f0c7.tar.xz
anaconda-b3f661055ca61e099f1d183c3bb9e711fd31f0c7.zip
Streamline autopart request setup slightly.
The storage instance contains a platform instance, so there's no need to pass one in explicitly. Also, setDefaultPartitioning seems to be a good place to set fstype for boot requests only once.
Diffstat (limited to 'pyanaconda/installclass.py')
-rw-r--r--pyanaconda/installclass.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
index cdef54215..8e519aaae 100644
--- a/pyanaconda/installclass.py
+++ b/pyanaconda/installclass.py
@@ -105,7 +105,7 @@ class BaseInstallClass(object):
# provided as a way for other products to specify their own.
return None
- def setDefaultPartitioning(self, storage, platform):
+ def setDefaultPartitioning(self, storage):
autorequests = [PartSpec(mountpoint="/", fstype=storage.defaultFSType,
size=1024, maxSize=50*1024, grow=True,
btr=True, lv=True, encrypted=True),
@@ -113,14 +113,21 @@ class BaseInstallClass(object):
size=500, grow=True, requiredSpace=50*1024,
btr=True, lv=True, encrypted=True)]
- bootreq = platform.setDefaultPartitioning()
- if bootreq:
- autorequests.extend(bootreq)
+ bootreqs = storage.platform.setDefaultPartitioning()
+ if bootreqs:
+ autorequests.extend(bootreqs)
swp = swap.swapSuggestion()
autorequests.append(PartSpec(fstype="swap", size=swp, grow=False,
lv=True, encrypted=True))
+ for autoreq in autorequests:
+ if autoreq.fstype is None:
+ if autoreq.mountpoint == "/boot":
+ autoreq.fstype = storage.defaultBootFSType
+ else:
+ autoreq.fstype = storage.defaultFSType
+
storage.autoPartitionRequests = autorequests
def configure(self, anaconda):