/[smeserver]/rpms/anaconda/sme9/0011-CheckArch.patch
ViewVC logotype

Annotation of /rpms/anaconda/sme9/0011-CheckArch.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Fri Jan 3 22:31:52 2014 UTC (10 years, 10 months ago) by charliebrady
Branch: MAIN
CVS Tags: anaconda-13_21_229-1_el6_sme_3, anaconda-13_21_215-1_el6_sme_7, anaconda-13_21_239-1_el6_sme_1, anaconda-13_21_215-1_el6_sme_9, anaconda-13_21_215-1_el6_sme_10, anaconda-13_21_215-1_el6_sme_11, anaconda-13_21_215-1_el6_sme_12, anaconda-13_21_263-1_el6_sme_1, anaconda-13_21_229-1_el6_sme_2, anaconda-13_21_229-1_el6_sme_1, anaconda-13_21_239-1_el6_sme, anaconda-13_21_215-1_el6_sme_8, anaconda-13_21_239_1-1_el6_sme, anaconda-13_21_215-1_el6_sme_6, anaconda-13_21_254-1_el6_sme_2, anaconda-13_21_254-1_el6_sme_1, anaconda-13_21_215-1_el6_sme_5, anaconda-13_21_215-1_el6_sme_4, anaconda-13_21_239-1_el6_sme_2, HEAD
Fix references to Mitel in architecture check patch.

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed