summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-06-01 14:26:27 -0400
committerChris Lumens <clumens@redhat.com>2009-06-01 14:26:27 -0400
commit86fb9ed2ad5f846b7f490940bca5528ae397c643 (patch)
tree201b3751865a18795657dfd048a044308ea61190 /upgrade.py
parent2aa6d8f67c6bb9a08948e6d520011900e8d1de61 (diff)
downloadanaconda-86fb9ed2ad5f846b7f490940bca5528ae397c643.tar.gz
anaconda-86fb9ed2ad5f846b7f490940bca5528ae397c643.tar.xz
anaconda-86fb9ed2ad5f846b7f490940bca5528ae397c643.zip
We no longer write out /etc/rpm/platform, so don't offer to upgrade it.
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py68
1 files changed, 0 insertions, 68 deletions
diff --git a/upgrade.py b/upgrade.py
index cb9c07fc2..d5ecdd081 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -46,73 +46,6 @@ import rpm
import logging
log = logging.getLogger("anaconda")
-def guessGuestArch(rootdir):
- """root path -> None|"architecture"
- Guess the architecture of installed system
- """
- iutil.resetRpmDb(rootdir)
- ts = rpm.ts(rootdir)
-
- packages = ["filesystem", "initscripts"]
-
- #get information from packages
- for pkg in packages:
- try:
- mi=ts.dbMatch("name",pkg)
- for hdr in mi:
- return hdr["arch"]
- except:
- pass
-
- return None
-
-
-def isUpgradingArch(anaconda):
- """anaconda -> (bool, oldarch)
- Check if the upgrade should change architecture of installation"""
-
- def compareArch(a, b):
- import re
- if re.match("i.86", a) and re.match("i.86", b):
- return True
- else:
- return a == b
-
- try:
- rpmplatform = open(anaconda.rootPath+"/etc/rpm/platform").readline().strip()
- rpmarch = rpmplatform[:rpmplatform.index("-")]
- return compareArch(rhpl.arch.canonArch, rpmarch), rpmarch
- except IOError:
- #try some fallback methods
- rpmarch = guessGuestArch(anaconda.rootPath)
- if rpmarch:
- return compareArch(rhpl.arch.canonArch, rpmarch), rpmarch
- else:
- return False, "unknown"
-
-def queryUpgradeArch(anaconda):
- archupgrade, oldrpmarch = isUpgradingArch(anaconda) #Check if we are to upgrade the architecture of previous product
-
- if anaconda.dir == DISPATCH_FORWARD or not archupgrade:
- return DISPATCH_FORWARD
-
- rc = anaconda.intf.messageWindow(_("Proceed with upgrade?"),
- _("You have choosen the upgrade for %s "
- "architecture, but the installed system "
- "is for %s architecture. "
- "\n\n" % (rhpl.arch.canonArch, oldrpmarch,)) +
- _("Would you like to upgrade "
- " the installed system to the %s architecture?" % (rhpl.arch.canonArch,)),
- type="custom", custom_icon=["error","error"],
- custom_buttons=[_("_Exit installer"), _("_Continue")])
-
- if rc == 0:
- sys.exit(0)
-
- flags.updateRpmPlatform = True
-
- return DISPATCH_FORWARD
-
def queryUpgradeContinue(anaconda):
if anaconda.dir == DISPATCH_FORWARD:
return
@@ -337,7 +270,6 @@ def setSteps(anaconda):
"upgrademount",
"upgrademigfind",
"upgrademigratefs",
- "upgradearchitecture",
"enablefilesystems",
"upgradecontinue",
"reposetup",