From 23bb5ad4d2383d84acf3a6d63d3271dc46268f5b Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 17 May 2006 19:36:04 +0000 Subject: Change findExistingRoots to use the anaconda class, which required a bunch of changes elsewhere in upgrade.py to also use anaconda. This required fixing up rescue mode (which was broken anyway) in the same way, which then required the same sort of stuff done in anaconda. Oh, and all that was so we could disable a meaningless error message on searching for existing installations on hard drive installs/upgrades. I forgot what I was really working on. --- upgrade.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'upgrade.py') diff --git a/upgrade.py b/upgrade.py index a52589957..6dbd91730 100644 --- a/upgrade.py +++ b/upgrade.py @@ -63,7 +63,7 @@ def findRootParts(anaconda): if anaconda.dir == DISPATCH_BACK: return if anaconda.id.rootParts is None: - anaconda.id.rootParts = findExistingRoots(anaconda.intf, anaconda.id, anaconda.rootPath) + anaconda.id.rootParts = findExistingRoots(anaconda) anaconda.id.upgradeRoot = [] for (dev, fs, meta) in anaconda.id.rootParts: @@ -77,23 +77,23 @@ def findRootParts(anaconda): anaconda.dispatch.skipStep("findinstall", skip = 1) anaconda.dispatch.skipStep("installtype", skip = 0) -def findExistingRoots(intf, id, chroot, upgradeany = 0): +def findExistingRoots(anaconda, upgradeany = 0): if not flags.setupFilesystems: - relstr = partedUtils.getReleaseString (chroot) + relstr = partedUtils.getReleaseString (anaconda.rootPath) if ((flags.cmdline.has_key("upgradeany")) or (upgradeany == 1) or (partedUtils.productMatches(relstr, productName))): - return [(chroot, 'ext2', "")] + return [(anaconda.rootPath, 'ext2', "")] return [] diskset = partedUtils.DiskSet() diskset.openDevices() - win = intf.progressWindow(_("Searching"), + win = anaconda.intf.progressWindow(_("Searching"), _("Searching for %s installations...") % (productName,), 5) - rootparts = diskset.findExistingRootPartitions(intf, chroot, + rootparts = diskset.findExistingRootPartitions(anaconda, upgradeany = upgradeany) for i in range(1, 6): time.sleep(0.25) -- cgit