summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--harddrive.py2
-rw-r--r--installclass.py3
-rw-r--r--installmethod.py2
-rw-r--r--iw/installpath_gui.py2
-rw-r--r--kickstart.py9
-rw-r--r--text.py6
-rw-r--r--textw/partitioning_text.py11
7 files changed, 29 insertions, 6 deletions
diff --git a/harddrive.py b/harddrive.py
index 4b9c50f5d..ddbe609d5 100644
--- a/harddrive.py
+++ b/harddrive.py
@@ -71,7 +71,7 @@ class HardDriveInstallMethod(InstallMethod):
def filesDone(self):
self.umountMedia()
- def protectedDevices(self):
+ def protectedPartitions(self):
rc = []
rc.append(self.device)
return rc
diff --git a/installclass.py b/installclass.py
index 953420b0a..f3a6f3dcf 100644
--- a/installclass.py
+++ b/installclass.py
@@ -41,6 +41,9 @@ class BaseInstallClass:
self.clearType = "svr"
self.clearPartText = warningText
+ def getClearParts(self):
+ return self.clearParts
+
def getLiloInformation(self):
return self.lilo
diff --git a/installmethod.py b/installmethod.py
index 8922786fc..83fae72f4 100644
--- a/installmethod.py
+++ b/installmethod.py
@@ -1,6 +1,6 @@
class InstallMethod:
- def protectedDevices(self):
+ def protectedPartitions(self):
return None
def readComps(self, hdlist):
diff --git a/iw/installpath_gui.py b/iw/installpath_gui.py
index 3d59fd045..4e8e6d143 100644
--- a/iw/installpath_gui.py
+++ b/iw/installpath_gui.py
@@ -129,7 +129,7 @@ class InstallPathWindow (InstallWindow):
self.todo.intf.messageWindow,
self.todo.intf.progressWindow,
not self.todo.expert,
- self.todo.method.protectedDevices())
+ self.todo.method.protectedPartitions())
###
### msf - 05-11-2000 - need to move this code!!!!!!
diff --git a/kickstart.py b/kickstart.py
index 27a166019..766c9c30a 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -393,6 +393,15 @@ class KickstartBase(BaseInstallClass):
self.setGroups(groups)
self.setPackages(packages)
+ # test to see if they specified to clear partitions and also
+ # tried to --onpart on a logical partition
+ if iutil.getArch() == 'i386' and self.fstab:
+ clear = self.getClearParts()
+ if clear == FSEDIT_CLEAR_LINUX or clear == FSEDIT_CLEAR_ALL:
+ for (mntpoint, (dev, fstype, reformat)) in self.fstab:
+ if int(dev[-1:]) > 4:
+ raise RuntimeError, "Clearpart and --onpart on non-primary partition %s not allowed" % dev
+
if where =="pre" or where == "post":
s = Script(script, scriptInterp, scriptChroot)
if where == "pre":
diff --git a/text.py b/text.py
index 120844f6b..58647fbc4 100644
--- a/text.py
+++ b/text.py
@@ -230,7 +230,7 @@ class InstallPathWindow:
todo.intf.messageWindow,
todo.intf.progressWindow,
not todo.expert,
- todo.method.protectedDevices())
+ todo.method.protectedPartitions())
return INSTALL_NOOP
classes = installclass.availableClasses()
@@ -287,7 +287,7 @@ class InstallPathWindow:
todo.intf.messageWindow,
todo.intf.progressWindow,
not todo.expert,
- todo.method.protectedDevices())
+ todo.method.protectedPartitions())
return INSTALL_OK
@@ -304,7 +304,7 @@ class UpgradeExamineWindow:
todo.intf.messageWindow,
todo.intf.progressWindow,
not todo.expert,
- todo.method.protectedDevices())
+ todo.method.protectedPartitions())
return INSTALL_NOOP
diff --git a/textw/partitioning_text.py b/textw/partitioning_text.py
index 7fa789cdb..78c75afa5 100644
--- a/textw/partitioning_text.py
+++ b/textw/partitioning_text.py
@@ -103,6 +103,17 @@ class AutoPartitionWindow:
def __call__(self, screen, todo):
druid = None
+
+ # if harddrive install and installing from a logical partition,
+ # do not offer autopartitioning
+ if iutil.getArch() == 'i386':
+ pp = todo.method.protectedPartitions()
+ if pp:
+ for p in pp:
+ if p[-1:] > 4:
+ todo.fstab.setRunDruid(1)
+ return
+
# if instClass has new or old partition info we are in ks
if todo.instClass.partitions or todo.instClass.fstab:
druid = \