diff -ru anaconda-11.1.2.263.orig/partedUtils.py anaconda-11.1.2.263/partedUtils.py --- anaconda-11.1.2.263.orig/partedUtils.py 2014-01-20 13:09:38.166469000 -0500 +++ anaconda-11.1.2.263/partedUtils.py 2014-01-20 14:49:08.673144000 -0500 @@ -533,6 +533,9 @@ return None def getReleaseString(mountpoint): + arch = '32' + if os.path.isdir(mountpoint + "/usr/lib64"): + arch = '64' if os.access(mountpoint + "/etc/e-smith-release", os.R_OK): f = open(mountpoint + "/etc/e-smith-release", "r") try: @@ -567,8 +570,8 @@ relstr = prod + " " + ver except: pass # don't worry, just use the relstr as we have it - return relstr - return "" + return (relstr, arch) + return () def productMatches(oldproduct, newproduct): """Determine if this is a reasonable product to upgrade old product""" @@ -829,7 +832,7 @@ if found: if os.access (self.anaconda.rootPath + '/etc/fstab', os.R_OK): - relstr = getReleaseString(self.anaconda.rootPath) + (relstr, arch) = getReleaseString(self.anaconda.rootPath) if ((upgradeany == 1) or (productMatches(relstr, productName))): @@ -838,7 +841,7 @@ except: label = None - rootparts.append ((theDev, fs, relstr, label)) + rootparts.append ((theDev, fs, relstr, label, arch)) isys.umount(self.anaconda.rootPath) # now, look for candidate lvm roots @@ -873,7 +876,7 @@ if found: if os.access (self.anaconda.rootPath + '/etc/fstab', os.R_OK): - relstr = getReleaseString(self.anaconda.rootPath) + (relstr, arch) = getReleaseString(self.anaconda.rootPath) if ((upgradeany == 1) or (productMatches(relstr, productName))): @@ -882,7 +885,7 @@ except: label = None - rootparts.append ((theDev, fs, relstr, label)) + rootparts.append ((theDev, fs, relstr, label, arch)) isys.umount(self.anaconda.rootPath) lvm.vgdeactivate() @@ -940,7 +943,7 @@ part = disk.next_partition(part) continue if os.access (self.anaconda.rootPath + '/etc/fstab', os.R_OK): - relstr = getReleaseString(self.anaconda.rootPath) + (relstr, arch) = getReleaseString(self.anaconda.rootPath) if ((upgradeany == 1) or (productMatches(relstr, productName))): @@ -950,7 +953,7 @@ label = None rootparts.append ((theDev, fstype, - relstr, label)) + relstr, label, arch)) isys.umount(self.anaconda.rootPath) part = disk.next_partition(part) diff -ru anaconda-11.1.2.263.orig/textw/upgrade_text.py anaconda-11.1.2.263/textw/upgrade_text.py --- anaconda-11.1.2.263.orig/textw/upgrade_text.py 2014-01-20 13:09:38.186525000 -0500 +++ anaconda-11.1.2.263/textw/upgrade_text.py 2014-01-20 15:09:05.919627000 -0500 @@ -194,6 +194,12 @@ def __call__ (self, screen, 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: scroll = 1 @@ -202,8 +208,42 @@ partList = [] partList.append(_("Erase ALL disks, and perform a fresh install")) - for (drive, fs, desc, label) in parts: - partList.append(_("Upgrade existing \"%s\" system") %(desc)) + 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, fs, desc, label, 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"), _("Your system is upgradeable."), partList, diff -ru anaconda-11.1.2.263.orig/upgrade.py anaconda-11.1.2.263/upgrade.py --- anaconda-11.1.2.263.orig/upgrade.py 2014-01-20 13:09:38.196525000 -0500 +++ anaconda-11.1.2.263/upgrade.py 2014-01-20 15:09:54.103502000 -0500 @@ -108,7 +108,7 @@ anaconda.id.rootParts = findExistingRoots(anaconda) anaconda.id.upgradeRoot = [] - for (dev, fs, meta, label) in anaconda.id.rootParts: + for (dev, fs, meta, label, arch) in anaconda.id.rootParts: anaconda.id.upgradeRoot.append( (dev, fs) ) if len(anaconda.id.rootParts) == 0 and anaconda.isKickstart: @@ -131,7 +131,7 @@ def findExistingRoots(anaconda, upgradeany = 0): if not flags.setupFilesystems: - relstr = partedUtils.getReleaseString (anaconda.rootPath) + (relstr, arch) = partedUtils.getReleaseString (anaconda.rootPath) if ((flags.cmdline.has_key("upgradeany")) or (upgradeany == 1) or (partedUtils.productMatches(relstr, productName))):