summaryrefslogtreecommitdiffstats
path: root/partitions.py
diff options
context:
space:
mode:
authorJán ONDREJ <ondrejj@salstar.sk>2008-06-04 06:38:02 +0000
committerJán ONDREJ <ondrejj@salstar.sk>2008-06-04 06:38:02 +0000
commit96d7f3e7e678a8ac9919ce628c2f792d4cb57955 (patch)
tree71d6ba7f9e48f87f90a8f8d5c8937c229913d6c5 /partitions.py
parente772036e9972589c7808428c9fd00b90b2089a66 (diff)
downloadanaconda-96d7f3e7e678a8ac9919ce628c2f792d4cb57955.tar.gz
anaconda-96d7f3e7e678a8ac9919ce628c2f792d4cb57955.tar.xz
anaconda-96d7f3e7e678a8ac9919ce628c2f792d4cb57955.zip
2008-06-04 Ján ONDREJ <ondrejj@salstar.sk> (via ondrejj@fedoraproject.org)
* po/sk.po: Typo fix.
Diffstat (limited to 'partitions.py')
-rw-r--r--partitions.py30
1 files changed, 25 insertions, 5 deletions
diff --git a/partitions.py b/partitions.py
index 29c4844ad..d65c86a81 100644
--- a/partitions.py
+++ b/partitions.py
@@ -43,8 +43,8 @@ import partedUtils
import partRequests
import cryptodev
-import rhpl
-from rhpl.translate import _
+import gettext
+_ = lambda x: gettext.ldgettext("anaconda", x)
import logging
log = logging.getLogger("anaconda")
@@ -1111,7 +1111,7 @@ class Partitions:
bootreq.getActualSize(self, diskset) < 10:
errors.append(_("You must create an EFI System Partition of "
"at least 10 megabytes."))
- elif rhpl.getArch() in ("i386", "x86_64"):
+ elif iutil.isX86():
if iutil.isMactel():
# mactel checks
bootreqs = self.getBootableRequest() or []
@@ -1242,7 +1242,7 @@ class Partitions:
# most arches can't have boot on RAID
if (isinstance(bootreq, partRequests.RaidRequestSpec) and
- rhpl.getArch() not in raid.raidBootArches):
+ iutil.getArch() not in raid.raidBootArches):
errors.append(_("Bootable partitions cannot be on a RAID "
"device."))
@@ -1253,6 +1253,12 @@ class Partitions:
errors.append(_("Bootable partitions cannot be on an %s "
"filesystem.")%(bootreq.fstype.getName(),))
+ # vfat /boot is insane.
+ if (bootreq.mountpoint and bootreq.mountpoint == "/" and
+ bootreq.fstype and bootreq.fstype.getName() == "vfat"):
+ errors.append(_("Bootable partitions cannot be on an %s "
+ "filesystem.")%(bootreq.fstype.getName(),))
+
if (bootreq.isEncrypted(self)):
errors.append(_("Bootable partitions cannot be on an "
"encrypted block device"))
@@ -1652,7 +1658,14 @@ class Partitions:
def doMetaResizes(self, diskset):
"""Does resizing of non-physical volumes."""
- # NOTE: this should be called with volumes active
+
+ # have to have lvm on, which requires raid to be started
+ diskset.startMPath()
+ diskset.startDmRaid()
+ diskset.startMdRaid()
+ for luksDev in self.encryptedDevices.values():
+ luksDev.openDevice()
+ lvm.vgactivate()
# we only support resizing LVM of these types of things currently
for lv in self.getLVMLVRequests():
@@ -1668,6 +1681,13 @@ class Partitions:
lvm.lvresize(lv.logicalVolumeName, vg.volumeGroupName,
lv.targetSize)
+ lvm.vgdeactivate()
+ for luksDev in self.encryptedDevices.values():
+ luksDev.closeDevice()
+ diskset.stopMdRaid()
+ diskset.stopDmRaid()
+ diskset.stopMPath()
+
def deleteDependentRequests(self, request):
"""Handle deletion of this request and all requests which depend on it.