diff -ru work/anaconda-13.21.176/rescue.py work+patch/anaconda-13.21.176/rescue.py --- work/anaconda-13.21.176/rescue.py 2012-06-12 15:40:09.000000000 -0400 +++ work+patch/anaconda-13.21.176/rescue.py 2012-10-05 11:12:56.000000000 -0400 @@ -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 -ru work/anaconda-13.21.215/storage/__init__.py work+patch/anaconda-13.21.215/storage/__init__.py --- work/anaconda-13.21.215/storage/__init__.py 2014-01-02 10:16:53.197435613 -0500 +++ work+patched/anaconda-13.21.215/storage/__init__.py 2014-01-02 10:16:53.208435558 -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 -ru work/anaconda-13.21.176/upgrade.py work+patch/anaconda-13.21.176/upgrade.py --- work/anaconda-13.21.176/upgrade.py 2012-06-12 15:40:09.000000000 -0400 +++ work+patch/anaconda-13.21.176/upgrade.py 2012-10-05 15:45:16.000000000 -0400 @@ -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)) --- work/anaconda-13.21.195/textw/upgrade_text.py.orig 2013-03-30 17:15:24.000000000 -0400 +++ work/anaconda-13.21.195/textw/upgrade_text.py 2013-03-30 17:18:46.000000000 -0400 @@ -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,51 @@ partList = [] partList.append(_("Reinstall System")) - if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.id.upgrade: + if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.id.upgrade: default = 1 else: default = 0 - for (device, desc) in parts: - partList.append("%s (%s)" %(desc, device.path)) + 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] + + 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) + + if sys_is_not_upgradeable: + partList.append(_("Reboot system")) + (button, choice) = ListboxChoiceWindow(screen, header, + reason, partList, + [ TEXT_OK_BUTTON, + TEXT_BACK_BUTTON ], + width = 55, scroll = scroll, + height = height, + help = "upgraderoot", + default = 1) + + 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, --- work/anaconda-13.21.215/iw/examine_gui.py.orig 2013-08-02 09:47:00.000000000 -0400 +++ work/anaconda-13.21.215/iw/examine_gui.py 2014-01-03 16:42:55.686422730 -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")