summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-02-24 11:23:40 -0600
committerDavid Lehman <dlehman@redhat.com>2009-02-24 11:23:40 -0600
commitf8b7f2be4ed499045bcd3df5d02a3c065bd2a4a3 (patch)
tree564378b9c40c2ed9fd0d7961d85325acdfb43a21 /yuminstall.py
parent0184b44db1d50ca405f93695c02ed2f8921cdd16 (diff)
downloadanaconda-f8b7f2be4ed499045bcd3df5d02a3c065bd2a4a3.tar.gz
anaconda-f8b7f2be4ed499045bcd3df5d02a3c065bd2a4a3.tar.xz
anaconda-f8b7f2be4ed499045bcd3df5d02a3c065bd2a4a3.zip
Lots of little updates to make things use the new storage module.
exception.py: - Remove unused partedUtils import. - Collect things from storage, not partitions. gui.py: - exceptionDisks is in storage now, not diskset. installclasses/rhel.py: installclasses/fedora.py: - setDefaultPartitioning take storage arg, not partitions. iw/autopart_type.py: - Find things in storage, not partitions. iw/bootloader_main_gui.py: iw/osbootwidget.py: - Remove unused partedUtils import. - Find fsset in storage now. - Use storage, not diskset, for iterating over disks/partitions. iw/lvm_dialog_gui.py: - Fix several typos from the original storage update. iw/partition_gui.py: - Find unusedMDMembers in storage, not partitions. iw/partitionui_helpers_gui.py: - Use StorageDevice.minSize,maxSize for resize limits. - Update doUIRAIDLVMChecks to use new storage module. packages.py: - Use new storage module to list vgs for selinux hack. storage/__init__.py: - Fix FSSet.createSwapFile so it creates the file on the correct device. storage/iscsi.py: - Use new storage module to identify iscsi disks. textw/partition_text.py: textw/upgrade_text.py: - Initial update to use new storage module. yuminstall.py: - Use storage module to find space for upgrade transaction. - Use storage module to locate protected partitions to mount in doPreInstall.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 68fd5a191..490c97e0b 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1358,14 +1358,16 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
(self.dlpkgs, self.totalSize, self.totalFiles) = self.ayum.getDownloadPkgs()
if not anaconda.id.getUpgrade():
- usrPart = anaconda.id.partitions.getRequestByMountPoint("/usr")
+ usrPart = None
+ for fs in anaconda.id.storage.devicetree.filesystems:
+ if fs.mountpoint == "/usr":
+ usrPart = fs
if usrPart is not None:
largePart = usrPart
else:
- largePart = anaconda.id.partitions.getRequestByMountPoint("/")
+ largePart = anaconda.id.storage.fsset.rootDevice
- if largePart and \
- largePart.getActualSize(anaconda.id.partitions, anaconda.id.diskset) < self.totalSize / 1024:
+ if largePart and largePart.size < self.totalSize / 1024:
rc = anaconda.intf.messageWindow(_("Error"),
_("Your selected packages require %d MB "
"of free space for installation, but "
@@ -1443,12 +1445,12 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
# If there are any protected partitions we want to mount, create their
# mount points now.
- protected = anaconda.id.partitions.protectedPartitions()
+ protected = anaconda.id.storage.protectedPartitions()
if protected:
for protectedDev in protected:
- request = anaconda.id.partitions.getRequestByDeviceName(protectedDev)
- if request and request.mountpoint:
- dirList.append(request.mountpoint)
+ request = anaconda.id.storage.devicetree.getDeviceByName(protectedDev)
+ if request and request.format.mountpoint:
+ dirList.append(request.format.mountpoint)
for i in dirList:
try: