summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-04-03 14:06:46 -0400
committerChris Lumens <clumens@redhat.com>2009-04-03 14:13:31 -0400
commit752163518a5e4996c688e55a516cf96d1caa7863 (patch)
tree8149db28a0ec26a12ae84203aaf5202a4ea2a414
parenta1014ff6b140befe4c456ca26e78f78ec7014917 (diff)
downloadanaconda-752163518a5e4996c688e55a516cf96d1caa7863.tar.gz
anaconda-752163518a5e4996c688e55a516cf96d1caa7863.tar.xz
anaconda-752163518a5e4996c688e55a516cf96d1caa7863.zip
If no partitioning commands are given, apply the UI selections (#490880).
First, always apply the default partitioning scheme in kickstart installs. Then, always run clearPartitions since it knows best. Finally, if any of the various kickstart partitioning commands are given, unset doAutoPart so the user-provided partitioning scheme takes effect.
-rw-r--r--installclasses/fedora.py10
-rw-r--r--installclasses/rhel.py10
-rw-r--r--kickstart.py8
-rw-r--r--storage/partitioning.py3
4 files changed, 17 insertions, 14 deletions
diff --git a/installclasses/fedora.py b/installclasses/fedora.py
index d2ddafa1f..69f198dfc 100644
--- a/installclasses/fedora.py
+++ b/installclasses/fedora.py
@@ -61,12 +61,10 @@ class InstallClass(BaseInstallClass):
def setInstallData(self, anaconda):
BaseInstallClass.setInstallData(self, anaconda)
-
- if not anaconda.isKickstart:
- BaseInstallClass.setDefaultPartitioning(self,
- anaconda.id.storage,
- anaconda.platform,
- CLEARPART_TYPE_LINUX)
+ BaseInstallClass.setDefaultPartitioning(self,
+ anaconda.id.storage,
+ anaconda.platform,
+ CLEARPART_TYPE_LINUX)
def setSteps(self, anaconda):
BaseInstallClass.setSteps(self, anaconda);
diff --git a/installclasses/rhel.py b/installclasses/rhel.py
index da25946f3..521792862 100644
--- a/installclasses/rhel.py
+++ b/installclasses/rhel.py
@@ -87,12 +87,10 @@ class InstallClass(BaseInstallClass):
def setInstallData(self, anaconda):
BaseInstallClass.setInstallData(self, anaconda)
-
- if not anaconda.isKickstart:
- BaseInstallClass.setDefaultPartitioning(self,
- anaconda.id.storage,
- anaconda.platform,
- CLEARPART_TYPE_LINUX)
+ BaseInstallClass.setDefaultPartitioning(self,
+ anaconda.id.storage,
+ anaconda.platform,
+ CLEARPART_TYPE_LINUX)
def setSteps(self, anaconda):
dispatch = anaconda.dispatch
diff --git a/kickstart.py b/kickstart.py
index 844e58c61..5ef435ea4 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -347,6 +347,8 @@ class LogVol(commands.logvol.F9_LogVol):
storage = self.handler.id.storage
devicetree = storage.devicetree
+ storage.doAutoPart = False
+
if lvd.mountpoint == "swap":
type = "swap"
lvd.mountpoint = ""
@@ -576,6 +578,8 @@ class Partition(commands.partition.F9_Partition):
devicetree = storage.devicetree
kwargs = {}
+ storage.doAutoPart = False
+
if pd.onbiosdisk != "":
pd.disk = isys.doGetBiosDisk(pd.onbiosdisk)
@@ -724,6 +728,8 @@ class Raid(commands.raid.F9_Raid):
devicetree = storage.devicetree
kwargs = {}
+ storage.doAutoPart = False
+
if rd.mountpoint == "swap":
type = "swap"
rd.mountpoint = ""
@@ -877,6 +883,8 @@ class VolGroup(commands.volgroup.FC3_VolGroup):
storage = self.handler.id.storage
devicetree = storage.devicetree
+ storage.doAutoPart = False
+
# Get a list of all the physical volume devices that make up this VG.
for pv in vgd.physvols:
dev = devicetree.getDeviceByName(pv)
diff --git a/storage/partitioning.py b/storage/partitioning.py
index d824fa6f5..1bd780709 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -161,8 +161,7 @@ def doAutoPartition(anaconda):
disks = []
devs = []
- if anaconda.id.storage.doAutoPart and not anaconda.isKickstart:
- # kickstart uses clearPartitions even without autopart
+ if anaconda.id.storage.doAutoPart:
clearPartitions(anaconda.id.storage)
if anaconda.id.storage.doAutoPart: