1 |
charliebrady |
1.1 |
diff -ru work/anaconda-13.21.176/rescue.py work+patch/anaconda-13.21.176/rescue.py |
2 |
|
|
--- work/anaconda-13.21.176/rescue.py 2012-06-12 15:40:09.000000000 -0400 |
3 |
|
|
+++ work+patch/anaconda-13.21.176/rescue.py 2012-10-05 11:12:56.000000000 -0400 |
4 |
|
|
@@ -340,7 +340,7 @@ |
5 |
|
|
scroll = 0 |
6 |
|
|
|
7 |
|
|
devList = [] |
8 |
|
|
- for (device, relstr) in disks: |
9 |
|
|
+ for (device, relstr, arch) in disks: |
10 |
|
|
if getattr(device.format, "label", None): |
11 |
|
|
devList.append("%s (%s) - %s" % (device.name, device.format.label, relstr)) |
12 |
|
|
else: |
13 |
charliebrady |
1.2 |
diff -ru work/anaconda-13.21.215/storage/__init__.py work+patch/anaconda-13.21.215/storage/__init__.py |
14 |
|
|
--- work/anaconda-13.21.215/storage/__init__.py 2014-01-02 10:16:53.197435613 -0500 |
15 |
|
|
+++ work+patched/anaconda-13.21.215/storage/__init__.py 2014-01-02 10:16:53.208435558 -0500 |
16 |
|
|
@@ -1332,6 +1332,9 @@ |
17 |
charliebrady |
1.1 |
def getReleaseString(mountpoint): |
18 |
|
|
relName = None |
19 |
|
|
relVer = None |
20 |
|
|
+ arch = "32" |
21 |
|
|
+ if os.path.isdir(mountpoint + "/usr/lib64"): |
22 |
|
|
+ arch = '64' |
23 |
|
|
|
24 |
|
|
filename = "%s/etc/redhat-release" % mountpoint |
25 |
|
|
if os.access(filename, os.R_OK): |
26 |
charliebrady |
1.2 |
@@ -1349,7 +1352,7 @@ |
27 |
charliebrady |
1.1 |
relName = product |
28 |
|
|
relVer = version.split()[0] |
29 |
|
|
|
30 |
|
|
- return (relName, relVer) |
31 |
|
|
+ return (relName, relVer, arch) |
32 |
|
|
|
33 |
|
|
def findExistingRootDevices(anaconda, upgradeany=False): |
34 |
|
|
""" Return a list of all root filesystems in the device tree. """ |
35 |
charliebrady |
1.2 |
@@ -1358,7 +1361,6 @@ |
36 |
charliebrady |
1.1 |
if not os.path.exists(anaconda.rootPath): |
37 |
|
|
iutil.mkdirChain(anaconda.rootPath) |
38 |
|
|
|
39 |
|
|
- roots = [] |
40 |
|
|
for device in anaconda.id.storage.devicetree.leaves: |
41 |
|
|
if not device.format.linuxNative or not device.format.mountable: |
42 |
|
|
continue |
43 |
charliebrady |
1.2 |
@@ -1383,13 +1385,13 @@ |
44 |
charliebrady |
1.1 |
continue |
45 |
|
|
|
46 |
|
|
if os.access(anaconda.rootPath + "/etc/fstab", os.R_OK): |
47 |
|
|
- (product, version) = getReleaseString(anaconda.rootPath) |
48 |
|
|
+ (product, version, arch) = getReleaseString(anaconda.rootPath) |
49 |
|
|
if upgradeany or \ |
50 |
|
|
anaconda.id.instClass.productUpgradable(product, version): |
51 |
|
|
- rootDevs.append((device, "%s %s" % (product, version))) |
52 |
|
|
+ rootDevs.append((device, "%s %s" % (product, version), arch)) |
53 |
|
|
else: |
54 |
|
|
- log.info("product %s version %s found on %s is not upgradable" |
55 |
|
|
- % (product, version, device.name)) |
56 |
|
|
+ log.info("product %s version %s arch %s found on %s is not upgradable" |
57 |
|
|
+ % (product, version, arch, device.name)) |
58 |
|
|
|
59 |
|
|
# this handles unmounting the filesystem |
60 |
|
|
device.teardown(recursive=True) |
61 |
|
|
diff -ru work/anaconda-13.21.176/upgrade.py work+patch/anaconda-13.21.176/upgrade.py |
62 |
|
|
--- work/anaconda-13.21.176/upgrade.py 2012-06-12 15:40:09.000000000 -0400 |
63 |
|
|
+++ work+patch/anaconda-13.21.176/upgrade.py 2012-10-05 15:45:16.000000000 -0400 |
64 |
|
|
@@ -66,7 +66,7 @@ |
65 |
|
|
# kickstart can pass device as device name or uuid. No quotes allowed. |
66 |
|
|
if anaconda.isKickstart and anaconda.id.ksdata.upgrade.root_device is not None: |
67 |
|
|
root_device = anaconda.id.ksdata.upgrade.root_device |
68 |
|
|
- for (dev, label) in anaconda.id.rootParts: |
69 |
|
|
+ for (dev, label, arch) in anaconda.id.rootParts: |
70 |
|
|
if ((root_device is not None) and |
71 |
|
|
(root_device == dev.name or root_device == "UUID=%s" % dev.format.uuid)): |
72 |
|
|
anaconda.id.upgradeRoot.insert(0, (dev,label)) |
73 |
|
|
--- work/anaconda-13.21.195/textw/upgrade_text.py.orig 2013-03-30 17:15:24.000000000 -0400 |
74 |
|
|
+++ work/anaconda-13.21.195/textw/upgrade_text.py 2013-03-30 17:18:46.000000000 -0400 |
75 |
|
|
@@ -20,6 +20,9 @@ |
76 |
|
|
import isys |
77 |
|
|
import iutil |
78 |
|
|
import upgrade |
79 |
|
|
+import rpmUtils |
80 |
|
|
+import os |
81 |
|
|
+import sys |
82 |
|
|
from constants_text import * |
83 |
|
|
from snack import * |
84 |
|
|
from flags import flags |
85 |
|
|
@@ -218,6 +221,11 @@ |
86 |
|
|
upgrade.setUpgradeRoot(anaconda) |
87 |
|
|
|
88 |
|
|
parts = anaconda.id.rootParts |
89 |
|
|
+ cur_arch = os.uname()[4] |
90 |
|
|
+ if cur_arch == 'i686': |
91 |
|
|
+ cur_arch = '32' |
92 |
|
|
+ else: |
93 |
|
|
+ cur_arch = '64' |
94 |
|
|
|
95 |
|
|
height = min(len(parts), 11) + 1 |
96 |
|
|
if height == 12: |
97 |
|
|
@@ -227,19 +235,51 @@ |
98 |
|
|
partList = [] |
99 |
|
|
partList.append(_("Reinstall System")) |
100 |
|
|
|
101 |
|
|
- if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.id.upgrade: |
102 |
|
|
+ if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.id.upgrade: |
103 |
|
|
default = 1 |
104 |
|
|
else: |
105 |
|
|
default = 0 |
106 |
|
|
|
107 |
|
|
- for (device, desc) in parts: |
108 |
|
|
- partList.append("%s (%s)" %(desc, device.path)) |
109 |
|
|
+ sys_is_not_upgradeable = 0 |
110 |
|
|
+ |
111 |
|
|
+ upgradeable_partitions = len(parts) |
112 |
|
|
+ if upgradeable_partitions != 1: |
113 |
|
|
+ sys_is_not_upgradeable = 1 |
114 |
|
|
+ header = _("System has problem") |
115 |
|
|
+ reason = _("Your system is not upgradeable. There is more than one SME server partition.") |
116 |
|
|
+ |
117 |
|
|
+ (drive, desc, arch) = parts[0] |
118 |
|
|
+ |
119 |
|
|
+ if arch != cur_arch: |
120 |
|
|
+ sys_is_not_upgradeable = 1 |
121 |
|
|
+ header = _("Wrong SME server version") |
122 |
|
|
+ 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) |
123 |
|
|
+ |
124 |
|
|
+ if sys_is_not_upgradeable: |
125 |
|
|
+ partList.append(_("Reboot system")) |
126 |
|
|
+ (button, choice) = ListboxChoiceWindow(screen, header, |
127 |
|
|
+ reason, partList, |
128 |
|
|
+ [ TEXT_OK_BUTTON, |
129 |
|
|
+ TEXT_BACK_BUTTON ], |
130 |
|
|
+ width = 55, scroll = scroll, |
131 |
|
|
+ height = height, |
132 |
|
|
+ help = "upgraderoot", |
133 |
|
|
+ default = 1) |
134 |
|
|
+ |
135 |
|
|
+ if button == TEXT_BACK_CHECK: |
136 |
|
|
+ return INSTALL_BACK |
137 |
|
|
+ else: |
138 |
|
|
+ if choice == 0: |
139 |
|
|
+ anaconda.dispatch.skipStep("installtype", skip = 0) |
140 |
|
|
+ anaconda.id.upgradeRoot = None |
141 |
|
|
+ return INSTALL_OK |
142 |
|
|
+ else: |
143 |
|
|
+ sys.exit(1) |
144 |
|
|
+ |
145 |
|
|
+ partList.append(_("Upgrade existing \"%s\" system") %(desc)) |
146 |
|
|
|
147 |
|
|
(button, choice) = ListboxChoiceWindow(screen, _("System to Upgrade"), |
148 |
|
|
- _("There seem to be one or more existing Linux installations " |
149 |
|
|
- "on your system.\n\nPlease choose one to upgrade, " |
150 |
|
|
- "or select 'Reinstall System' to freshly install " |
151 |
|
|
- "your system."), partList, |
152 |
|
|
+ _("Your system is upgradeable."), partList, |
153 |
|
|
[ TEXT_OK_BUTTON, |
154 |
|
|
TEXT_BACK_BUTTON ], |
155 |
|
|
width = 55, scroll = scroll, |
156 |
charliebrady |
1.2 |
--- work/anaconda-13.21.215/iw/examine_gui.py.orig 2013-08-02 09:47:00.000000000 -0400 |
157 |
|
|
+++ work/anaconda-13.21.215/iw/examine_gui.py 2014-01-03 16:42:55.686422730 -0500 |
158 |
|
|
@@ -139,7 +139,7 @@ |
159 |
|
|
self.upgradecombo.pack_start(cell, True) |
160 |
|
|
self.upgradecombo.set_attributes(cell, markup=0) |
161 |
|
|
|
162 |
|
|
- for (dev, desc) in self.parts: |
163 |
|
|
+ for (dev, desc, arch) in self.parts: |
164 |
|
|
iter = model.append() |
165 |
|
|
if (desc is None) or len(desc) < 1: |
166 |
|
|
desc = _("Unknown Linux system") |