/[smeserver]/rpms/anaconda/sme8/0019-upgrade-archcheck.patch
ViewVC logotype

Annotation of /rpms/anaconda/sme8/0019-upgrade-archcheck.patch

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


Revision 1.2 - (hide annotations) (download)
Sun Feb 2 06:26:31 2014 UTC (10 years, 4 months ago) by wellsi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
* Sat Feb 1 2014 Ian Wells <esmith@wellsi.com> 11.1.2-263-4.el5.sme
- Correct indentation in last patch. [SME: 8054]

1 charliebrady 1.1 diff -ru anaconda-11.1.2.263.orig/partedUtils.py anaconda-11.1.2.263/partedUtils.py
2     --- anaconda-11.1.2.263.orig/partedUtils.py 2014-01-20 13:09:38.166469000 -0500
3     +++ anaconda-11.1.2.263/partedUtils.py 2014-01-20 14:49:08.673144000 -0500
4     @@ -533,6 +533,9 @@
5     return None
6    
7     def getReleaseString(mountpoint):
8     + arch = '32'
9     + if os.path.isdir(mountpoint + "/usr/lib64"):
10     + arch = '64'
11     if os.access(mountpoint + "/etc/e-smith-release", os.R_OK):
12     f = open(mountpoint + "/etc/e-smith-release", "r")
13     try:
14     @@ -567,8 +570,8 @@
15     relstr = prod + " " + ver
16     except:
17     pass # don't worry, just use the relstr as we have it
18     - return relstr
19     - return ""
20     + return (relstr, arch)
21     + return ()
22    
23     def productMatches(oldproduct, newproduct):
24     """Determine if this is a reasonable product to upgrade old product"""
25     @@ -829,7 +832,7 @@
26    
27     if found:
28     if os.access (self.anaconda.rootPath + '/etc/fstab', os.R_OK):
29     - relstr = getReleaseString(self.anaconda.rootPath)
30     + (relstr, arch) = getReleaseString(self.anaconda.rootPath)
31    
32     if ((upgradeany == 1) or
33     (productMatches(relstr, productName))):
34     @@ -838,7 +841,7 @@
35     except:
36     label = None
37    
38     - rootparts.append ((theDev, fs, relstr, label))
39     + rootparts.append ((theDev, fs, relstr, label, arch))
40     isys.umount(self.anaconda.rootPath)
41    
42     # now, look for candidate lvm roots
43     @@ -873,7 +876,7 @@
44    
45     if found:
46     if os.access (self.anaconda.rootPath + '/etc/fstab', os.R_OK):
47     - relstr = getReleaseString(self.anaconda.rootPath)
48     + (relstr, arch) = getReleaseString(self.anaconda.rootPath)
49    
50     if ((upgradeany == 1) or
51     (productMatches(relstr, productName))):
52     @@ -882,7 +885,7 @@
53     except:
54     label = None
55    
56     - rootparts.append ((theDev, fs, relstr, label))
57     + rootparts.append ((theDev, fs, relstr, label, arch))
58     isys.umount(self.anaconda.rootPath)
59    
60     lvm.vgdeactivate()
61     @@ -940,7 +943,7 @@
62     part = disk.next_partition(part)
63     continue
64     if os.access (self.anaconda.rootPath + '/etc/fstab', os.R_OK):
65     - relstr = getReleaseString(self.anaconda.rootPath)
66     + (relstr, arch) = getReleaseString(self.anaconda.rootPath)
67    
68     if ((upgradeany == 1) or
69     (productMatches(relstr, productName))):
70     @@ -950,7 +953,7 @@
71     label = None
72    
73     rootparts.append ((theDev, fstype,
74     - relstr, label))
75     + relstr, label, arch))
76     isys.umount(self.anaconda.rootPath)
77    
78     part = disk.next_partition(part)
79     diff -ru anaconda-11.1.2.263.orig/textw/upgrade_text.py anaconda-11.1.2.263/textw/upgrade_text.py
80     --- anaconda-11.1.2.263.orig/textw/upgrade_text.py 2014-01-20 13:09:38.186525000 -0500
81     +++ anaconda-11.1.2.263/textw/upgrade_text.py 2014-01-20 15:09:05.919627000 -0500
82     @@ -194,6 +194,12 @@
83     def __call__ (self, screen, anaconda):
84     parts = anaconda.id.rootParts
85    
86     + cur_arch = os.uname()[4]
87     + if cur_arch == 'i686':
88     + cur_arch = '32'
89     + else:
90     + cur_arch = '64'
91     +
92     height = min(len(parts), 11) + 1
93     if height == 12:
94     scroll = 1
95     @@ -202,8 +208,42 @@
96     partList = []
97     partList.append(_("Erase ALL disks, and perform a fresh install"))
98    
99     - for (drive, fs, desc, label) in parts:
100     - partList.append(_("Upgrade existing \"%s\" system") %(desc))
101     + sys_is_not_upgradeable = 0
102     +
103     + upgradeable_partitions = len(parts)
104     + if upgradeable_partitions != 1:
105     + sys_is_not_upgradeable = 1
106     + header = _("System has problem")
107     + reason = _("Your system is not upgradeable. There is more than one SME server partition.")
108     +
109     + (drive, fs, desc, label, arch) = parts[0]
110     + if arch != cur_arch:
111     + sys_is_not_upgradeable = 1
112     + header = _("Wrong SME server version")
113     + 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)
114     +
115     + if sys_is_not_upgradeable:
116     + partList.append(_("Reboot system"))
117 wellsi 1.2 + (button, choice) = ListboxChoiceWindow(screen, header,
118 charliebrady 1.1 + reason, partList,
119     + [ TEXT_OK_BUTTON,
120     + TEXT_BACK_BUTTON ],
121     + width = 55, scroll = scroll,
122     + height = height,
123     + help = "upgraderoot",
124     + default = 1)
125     +
126     + if button == TEXT_BACK_CHECK:
127     + return INSTALL_BACK
128     + else:
129     + if choice == 0:
130     + anaconda.dispatch.skipStep("installtype", skip = 0)
131     + anaconda.id.upgradeRoot = None
132     + return INSTALL_OK
133     + else:
134     + sys.exit(1)
135     +
136     + partList.append(_("Upgrade existing \"%s\" system") %(desc))
137    
138     (button, choice) = ListboxChoiceWindow(screen, _("System to Upgrade"),
139     _("Your system is upgradeable."), partList,
140     diff -ru anaconda-11.1.2.263.orig/upgrade.py anaconda-11.1.2.263/upgrade.py
141     --- anaconda-11.1.2.263.orig/upgrade.py 2014-01-20 13:09:38.196525000 -0500
142     +++ anaconda-11.1.2.263/upgrade.py 2014-01-20 15:09:54.103502000 -0500
143     @@ -108,7 +108,7 @@
144     anaconda.id.rootParts = findExistingRoots(anaconda)
145    
146     anaconda.id.upgradeRoot = []
147     - for (dev, fs, meta, label) in anaconda.id.rootParts:
148     + for (dev, fs, meta, label, arch) in anaconda.id.rootParts:
149     anaconda.id.upgradeRoot.append( (dev, fs) )
150    
151     if len(anaconda.id.rootParts) == 0 and anaconda.isKickstart:
152     @@ -131,7 +131,7 @@
153    
154     def findExistingRoots(anaconda, upgradeany = 0):
155     if not flags.setupFilesystems:
156     - relstr = partedUtils.getReleaseString (anaconda.rootPath)
157     + (relstr, arch) = partedUtils.getReleaseString (anaconda.rootPath)
158     if ((flags.cmdline.has_key("upgradeany")) or
159     (upgradeany == 1) or
160     (partedUtils.productMatches(relstr, productName))):

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