diff -ruN anaconda-13.21.215.orig/iw/examine_gui.py anaconda-13.21.215/iw/examine_gui.py --- anaconda-13.21.215.orig/iw/examine_gui.py 2013-08-02 09:47:00.000000000 -0400 +++ anaconda-13.21.215/iw/examine_gui.py 2014-01-03 17:27:24.869279559 -0500 @@ -139,7 +139,7 @@ self.upgradecombo.pack_start(cell, True) self.upgradecombo.set_attributes(cell, markup=0) - for (dev, desc) in self.parts: + for (dev, desc, arch) in self.parts: iter = model.append() if (desc is None) or len(desc) < 1: desc = _("Unknown Linux system") diff -ruN anaconda-13.21.215.orig/rescue.py anaconda-13.21.215/rescue.py --- anaconda-13.21.215.orig/rescue.py 2013-08-02 09:47:00.000000000 -0400 +++ anaconda-13.21.215/rescue.py 2014-01-03 17:27:24.866279573 -0500 @@ -340,7 +340,7 @@ scroll = 0 devList = [] - for (device, relstr) in disks: + for (device, relstr, arch) in disks: if getattr(device.format, "label", None): devList.append("%s (%s) - %s" % (device.name, device.format.label, relstr)) else: diff -ruN anaconda-13.21.215.orig/storage/__init__.py anaconda-13.21.215/storage/__init__.py --- anaconda-13.21.215.orig/storage/__init__.py 2014-01-03 17:26:52.544421863 -0500 +++ anaconda-13.21.215/storage/__init__.py 2014-01-03 17:27:24.868279564 -0500 @@ -1332,6 +1332,9 @@ def getReleaseString(mountpoint): relName = None relVer = None + arch = "32" + if os.path.isdir(mountpoint + "/usr/lib64"): + arch = '64' filename = "%s/etc/redhat-release" % mountpoint if os.access(filename, os.R_OK): @@ -1349,7 +1352,7 @@ relName = product relVer = version.split()[0] - return (relName, relVer) + return (relName, relVer, arch) def findExistingRootDevices(anaconda, upgradeany=False): """ Return a list of all root filesystems in the device tree. """ @@ -1358,7 +1361,6 @@ if not os.path.exists(anaconda.rootPath): iutil.mkdirChain(anaconda.rootPath) - roots = [] for device in anaconda.id.storage.devicetree.leaves: if not device.format.linuxNative or not device.format.mountable: continue @@ -1383,13 +1385,13 @@ continue if os.access(anaconda.rootPath + "/etc/fstab", os.R_OK): - (product, version) = getReleaseString(anaconda.rootPath) + (product, version, arch) = getReleaseString(anaconda.rootPath) if upgradeany or \ anaconda.id.instClass.productUpgradable(product, version): - rootDevs.append((device, "%s %s" % (product, version))) + rootDevs.append((device, "%s %s" % (product, version), arch)) else: - log.info("product %s version %s found on %s is not upgradable" - % (product, version, device.name)) + log.info("product %s version %s arch %s found on %s is not upgradable" + % (product, version, arch, device.name)) # this handles unmounting the filesystem device.teardown(recursive=True) diff -ruN anaconda-13.21.215.orig/textw/upgrade_text.py anaconda-13.21.215/textw/upgrade_text.py --- anaconda-13.21.215.orig/textw/upgrade_text.py 2013-08-02 09:47:00.000000000 -0400 +++ anaconda-13.21.215/textw/upgrade_text.py 2014-01-03 17:28:54.325885440 -0500 @@ -20,6 +20,9 @@ import isys import iutil import upgrade +import rpmUtils +import os +import sys from constants_text import * from snack import * from flags import flags @@ -218,6 +221,11 @@ upgrade.setUpgradeRoot(anaconda) parts = anaconda.id.rootParts + cur_arch = os.uname()[4] + if cur_arch == 'i686': + cur_arch = '32' + else: + cur_arch = '64' height = min(len(parts), 11) + 1 if height == 12: @@ -227,19 +235,39 @@ partList = [] partList.append(_("Reinstall System")) - if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.id.upgrade: - default = 1 - else: - default = 0 + default = 1 + + sys_is_not_upgradeable = 0 + + upgradeable_partitions = len(parts) + if upgradeable_partitions != 1: + sys_is_not_upgradeable = 1 + header = _("System has problem") + reason = _("Your system is not upgradeable. There is more than one SME server partition.") + + (drive, desc, arch) = parts[0] + #for (device, desc) in parts: + # partList.append("%s (%s)" %(desc, device.path)) + + if arch != cur_arch: + sys_is_not_upgradeable = 1 + header = _("Wrong SME server version") + reason = _("Your system is not upgradeable using this version of SME server. The currently installed system is a %s bit version, but this version of SME server is a %s bit version.") % (arch, cur_arch) - for (device, desc) in parts: - partList.append("%s (%s)" %(desc, device.path)) + if button == TEXT_BACK_CHECK: + return INSTALL_BACK + else: + if choice == 0: + anaconda.dispatch.skipStep("installtype", skip = 0) + anaconda.id.upgradeRoot = None + return INSTALL_OK + else: + sys.exit(1) + partList.append(_("Upgrade existing \"%s\" system") %(desc)) + (button, choice) = ListboxChoiceWindow(screen, _("System to Upgrade"), - _("There seem to be one or more existing Linux installations " - "on your system.\n\nPlease choose one to upgrade, " - "or select 'Reinstall System' to freshly install " - "your system."), partList, + _("Your system is upgradeable."), partList, [ TEXT_OK_BUTTON, TEXT_BACK_BUTTON ], width = 55, scroll = scroll, @@ -263,6 +291,7 @@ anaconda.id.rootParts = parts anaconda.dispatch.skipStep("installtype", skip = 1) else: + anaconda.id.setUpgrade(False) anaconda.dispatch.skipStep("installtype", skip = 0) anaconda.id.upgradeRoot = None diff -ruN anaconda-13.21.215.orig/upgrade.py anaconda-13.21.215/upgrade.py --- anaconda-13.21.215.orig/upgrade.py 2014-01-03 17:26:52.519421972 -0500 +++ anaconda-13.21.215/upgrade.py 2014-01-03 17:27:24.868279564 -0500 @@ -66,7 +66,7 @@ # kickstart can pass device as device name or uuid. No quotes allowed. if anaconda.isKickstart and anaconda.id.ksdata.upgrade.root_device is not None: root_device = anaconda.id.ksdata.upgrade.root_device - for (dev, label) in anaconda.id.rootParts: + for (dev, label, arch) in anaconda.id.rootParts: if ((root_device is not None) and (root_device == dev.name or root_device == "UUID=%s" % dev.format.uuid)): anaconda.id.upgradeRoot.insert(0, (dev,label))