summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-10-06 21:58:56 +0000
committerJeremy Katz <katzj@redhat.com>2004-10-06 21:58:56 +0000
commitdf16e4725ba21977f56ddfb06879ab80832b332e (patch)
tree285c3f451f28cff9675797044d887298fee39ba1
parent49c119102eb12c689a4ad1e4b34f72abedd76a10 (diff)
downloadanaconda-df16e4725ba21977f56ddfb06879ab80832b332e.tar.gz
anaconda-df16e4725ba21977f56ddfb06879ab80832b332e.tar.xz
anaconda-df16e4725ba21977f56ddfb06879ab80832b332e.zip
2004-10-06 Jeremy Katz <katzj@redhat.com>
* partRequests.py (RequestSpec.sanityCheckRequest): Call sanityCheckMountPoint with new option * partIntfHelpers.py (sanityCheckMountPoint): Don't allow formatting unless they specify a mountpoint on pre-existing partitions (#134865)
-rw-r--r--ChangeLog7
-rw-r--r--partIntfHelpers.py5
-rw-r--r--partRequests.py3
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c05ae3310..b4de3f30d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2004-10-06 Jeremy Katz <katzj@redhat.com>
+ * partRequests.py (RequestSpec.sanityCheckRequest): Call
+ sanityCheckMountPoint with new option
+
+ * partIntfHelpers.py (sanityCheckMountPoint): Don't allow
+ formatting unless they specify a mountpoint on pre-existing
+ partitions (#134865)
+
* iw/network_gui.py (NetworkWindow.getScreen): Make Bengali fit a
little bit better (#134762)
diff --git a/partIntfHelpers.py b/partIntfHelpers.py
index 391d4a1e5..e4e94e84e 100644
--- a/partIntfHelpers.py
+++ b/partIntfHelpers.py
@@ -73,12 +73,13 @@ def sanityCheckLogicalVolumeName(logvolname):
"are letters, digits, '.' or '_'.")
return None
-def sanityCheckMountPoint(mntpt, fstype, preexisting):
+def sanityCheckMountPoint(mntpt, fstype, preexisting, format):
"""Sanity check that the mountpoint is valid.
mntpt is the mountpoint being used.
fstype is the file system being used on the request.
preexisting is whether the request was preexisting (request.preexist)
+ format is whether the request is being formatted or not
"""
if mntpt:
passed = 1
@@ -97,7 +98,7 @@ def sanityCheckMountPoint(mntpt, fstype, preexisting):
else:
return None
else:
- if (fstype and fstype.isMountable() and not preexisting):
+ if (fstype and fstype.isMountable() and (not preexisting or format)):
return _("Please specify a mount point for this partition.")
else:
# its an existing partition so don't force a mount point
diff --git a/partRequests.py b/partRequests.py
index 54b5a574c..78e64e2b1 100644
--- a/partRequests.py
+++ b/partRequests.py
@@ -290,12 +290,13 @@ class RequestSpec:
mntpt = self.mountpoint
fstype = self.fstype
preexist = self.preexist
+ format = self.format
rc = self.doSizeSanityCheck()
if rc:
return rc
- rc = partIntfHelpers.sanityCheckMountPoint(mntpt, fstype, preexist)
+ rc = partIntfHelpers.sanityCheckMountPoint(mntpt, fstype, preexist, format)
if rc:
return rc