diff -up anaconda-11.1.2.168/anaconda.smepatches anaconda-11.1.2.168/anaconda --- anaconda-11.1.2.168/anaconda.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/anaconda 2009-04-14 12:35:22.000000000 -0600 @@ -992,6 +992,9 @@ if __name__ == "__main__": anaconda.dispatch.skipStep("bootloadersetup", permanent = 1) anaconda.dispatch.skipStep("instbootloader", permanent = 1) + # we don't want to waste time probing + opts.isHeadless = 1 + # set up the headless case if opts.isHeadless == 1: anaconda.id.setHeadless(opts.isHeadless) diff -up anaconda-11.1.2.168/bootloader.py.smepatches anaconda-11.1.2.168/bootloader.py --- anaconda-11.1.2.168/bootloader.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/bootloader.py 2009-04-14 12:36:12.000000000 -0600 @@ -210,11 +210,6 @@ def writeBootloader(anaconda): except bootloaderInfo.BootyNoKernelWarning: if not justConfigFile: w.pop() - if anaconda.intf: - anaconda.intf.messageWindow(_("Warning"), - _("No kernel packages were installed on your " - "system. Your boot loader configuration " - "will not be changed.")) dosync() diff -up anaconda-11.1.2.168/findpackageset.py.smepatches anaconda-11.1.2.168/findpackageset.py --- anaconda-11.1.2.168/findpackageset.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/findpackageset.py 2009-04-14 12:38:55.000000000 -0600 @@ -108,21 +108,15 @@ def findpackageset(hdrlist, dbPath='/'): # loop through packages and find ones which are a newer # version than what we have for ( name, arch ) in instDict.keys(): - if ( name, arch ) in availDict.keys(): - # Exact arch upgrade - h = instDict[(name, arch)] - pkg = availDict[(name,arch)] - comparePackageForUpgrade(updDict, h, pkg) - else: - # See if we have a better arch than that installed - if name in availNames.keys(): - bestarch = findBestArch(availNames[name]) - if not bestarch: - continue - if availDict.has_key((name,bestarch)): - h = instDict[(name,arch)] - pkg = availDict[(name,bestarch)] - comparePackageForUpgrade(updDict, h, pkg) + # See if we have a better arch than that installed + if name in availNames.keys(): + bestarch = findBestArch(availNames[name]) + if not bestarch: + continue + if availDict.has_key((name,bestarch)): + h = instDict[(name,arch)] + pkg = availDict[(name,bestarch)] + comparePackageForUpgrade(updDict, h, pkg) # handle obsoletes for pkg in hdlist: diff -up anaconda-11.1.2.168/fsset.py.smepatches anaconda-11.1.2.168/fsset.py --- anaconda-11.1.2.168/fsset.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/fsset.py 2009-04-14 12:47:12.000000000 -0600 @@ -1456,7 +1456,6 @@ class FileSystemSet: cf = """ # mdadm.conf written out by anaconda DEVICE partitions -MAILADDR root """ for ent in self.entries: if ent.device.getName() != "RAIDDevice": @@ -1611,6 +1610,7 @@ MAILADDR root if bootDev.getName() == "RAIDDevice": ret['boot'] = (bootDev.device, N_("RAID Device")) + ret['mbr'] = (bl.drivelist[0], N_("Master Boot Record (MBR)")) return ret if iutil.getPPCMacGen() == "NewWorld": @@ -1900,6 +1900,10 @@ MAILADDR root entry.device.setupDevice(chroot, vgdevice = vg) self.volumesCreated = 1 + def createBootRaid (self, chroot='/'): + bootDev = self.getBootDev() + if bootDev.getDevice().startswith('md'): + bootDev.setupDevice(chroot) def makeFilesystems (self, chroot='/'): formatted = [] @@ -2478,11 +2482,20 @@ class RAIDDevice(Device): self.minor) def raidTab (self, devPrefix='/dev'): + if self.level == 1: + nDisks = max(2, self.numDisks) + elif self.level == 5: + nDisks = max(3, self.numDisks) + elif self.level == 6: + nDisks = max(4, self.numDisks) + else: + nDisks = self.numDisks + entry = "" entry = entry + "raiddev %s/%s\n" % (devPrefix, self.device,) entry = entry + "raid-level %d\n" % (self.level,) - entry = entry + "nr-raid-disks %d\n" % (self.numDisks,) + entry = entry + "nr-raid-disks %d\n" % (nDisks,) entry = entry + "chunk-size %s\n" %(self.chunksize,) entry = entry + "persistent-superblock 1\n" entry = entry + "nr-spare-disks %d\n" % (self.spares,) @@ -2492,6 +2505,10 @@ class RAIDDevice(Device): device) entry = entry + " raid-disk %d\n" % (i,) i = i + 1 + while i < nDisks: + entry = entry + " device dev/null\n" + entry = entry + " failed-disk %d\n" % (i,) + i = i + 1 i = 0 for device in [m.getDevice() for m in self.members[self.numDisks:]]: entry = entry + " device %s/%s\n" % (devPrefix, @@ -2504,6 +2521,15 @@ class RAIDDevice(Device): def devify(x): return "/dev/%s" %(x,) + if self.level == 1: + nDisks = max(2, self.numDisks) + elif self.level == 5: + nDisks = max(3, self.numDisks) + elif self.level == 6: + nDisks = max(4, self.numDisks) + else: + nDisks = self.numDisks + node = "%s/%s" % (devPrefix, self.device) isys.makeDevInode(self.device, node) @@ -2516,12 +2542,18 @@ class RAIDDevice(Device): args = ["--create", "/dev/%s" %(self.device,), "--run", "--chunk=%s" %(self.chunksize,), "--level=%s" %(self.level,), - "--raid-devices=%s" %(self.numDisks,)] + "--raid-devices=%s" %(nDisks,)] if self.spares > 0: args.append("--spare-devices=%s" %(self.spares,),) args.extend(memberDevs) + + i = 0 + while self.numDisks + i < nDisks: + args.append("missing") + i = i + 1 + log.info("going to run: %s" %(["/usr/sbin/mdadm"] + args,)) iutil.execWithRedirect ("/usr/sbin/mdadm", args, stderr="/dev/tty5", stdout="/dev/tty5") diff -up anaconda-11.1.2.168/instdata.py.smepatches anaconda-11.1.2.168/instdata.py --- anaconda-11.1.2.168/instdata.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/instdata.py 2009-04-14 12:48:55.000000000 -0600 @@ -145,8 +145,7 @@ class InstallData: def write(self): self.instLanguage.write (self.anaconda.rootPath) - if not self.isHeadless: - self.keyboard.write (self.anaconda.rootPath) + self.keyboard.write (self.anaconda.rootPath) self.timezone.write (self.anaconda.rootPath) @@ -264,8 +263,8 @@ class InstallData: f.write("key %s\n" %(self.instClass.installkey,)) self.instLanguage.writeKS(f) + self.keyboard.writeKS(f) if not self.isHeadless: - self.keyboard.writeKS(f) self.xsetup.writeKS(f, self.desktop, self.ksdata) self.network.writeKS(f) self.zfcp.writeKS(f) diff -up anaconda-11.1.2.168/kickstart.py.smepatches anaconda-11.1.2.168/kickstart.py --- anaconda-11.1.2.168/kickstart.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/kickstart.py 2009-04-14 12:50:06.000000000 -0600 @@ -835,6 +835,15 @@ class Kickstart(cobject): w.pop() def postAction(self, anaconda, serial): + win = anaconda.intf.waitWindow(_("Post Install Script"), + _("The post installation script is running...")) + + script = ( "#!/bin/sh\nmkdir -p /var/lib/dhcp; /sbin/syslogd ; sleep 2; /sbin/e-smith/signal-event post-install\n" ) + s = Script(script, interp="/bin/sh", inChroot=1) + log.info("%s", s) + s.run(anaconda.rootPath, serial) + win.pop() + postScripts = filter (lambda s: s.type == KS_SCRIPT_POST, self.ksdata.scripts) diff -up anaconda-11.1.2.168/lang-table.smepatches anaconda-11.1.2.168/lang-table --- anaconda-11.1.2.168/lang-table.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/lang-table 2009-04-14 12:52:14.000000000 -0600 @@ -1,54 +1,20 @@ -Afrikaans af latarcyrheb-sun16 af_ZA.UTF-8 us Africa/Johannesburg -Arabic ar latarcyrheb-sun16 ar_SA.UTF-8 us Asia/Riyadh -Assamese as none as_IN.UTF-8 us Asia/Calcutta -Bengali bn none bn_BD.UTF-8 us Asia/Dhaka -Bengali(India) bn none bn_IN.UTF-8 us Asia/Calcutta Bulgarian bg latarcyrheb-sun16 bg_BG.UTF-8 bg Europe/Sofia -Catalan ca latarcyrheb-sun16 ca_ES.UTF-8 es Europe/Madrid Chinese(Simplified) zh_CN none zh_CN.UTF-8 us Asia/Shanghai -Chinese(Traditional) zh_TW none zh_TW.UTF-8 us Asia/Taipei -Croatian hr latarcyrheb-sun16 hr_HR.UTF-8 croat Europe/Zagreb -Czech cs latarcyrheb-sun16 cs_CZ.UTF-8 cz-lat2 Europe/Prague Danish da latarcyrheb-sun16 da_DK.UTF-8 dk Europe/Copenhagen Dutch nl latarcyrheb-sun16 nl_NL.UTF-8 nl Europe/Amsterdam English en latarcyrheb-sun16 en_US.UTF-8 us America/New_York -Estonian et latarcyrheb-sun16 et_EE.UTF-8 et Europe/Tallinn -Finnish fi latarcyrheb-sun16 fi_FI.UTF-8 fi Europe/Helsinki French fr latarcyrheb-sun16 fr_FR.UTF-8 fr-latin1 Europe/Paris German de latarcyrheb-sun16 de_DE.UTF-8 de-latin1-nodeadkeys Europe/Berlin Greek el iso07u-16 el_GR.UTF-8 gr Europe/Athens -Gujarati gu none gu_IN.UTF-8 us Asia/Calcutta -Hindi hi none hi_IN.UTF-8 us Asia/Calcutta Hungarian hu latarcyrheb-sun16 hu_HU.UTF-8 hu Europe/Budapest -Icelandic is latarcyrheb-sun16 is_IS.UTF-8 is-latin1 Atlantic/Reykjavik Indonesian id latarcryheb-sun16 id_ID.UTF-8 us Asia/Jakarta Italian it latarcyrheb-sun16 it_IT.UTF-8 it Europe/Rome Japanese ja none ja_JP.UTF-8 jp106 Asia/Tokyo -Kannada kn none kn_IN.UTF-8 us Asia/Calcutta -Korean ko none ko_KR.UTF-8 us Asia/Seoul -Macedonian mk latarcyrheb-sun16 mk_MK.UTF-8 mk Europe/Skopje -Malay ms latarcyrheb-sun16 ms_MY.UTF-8 us Asia/Kuala_Lumpur -Malayalam ml none ml_IN.UTF-8 us Asia/Calcutta -Marathi mr none mr_IN.UTF-8 us Asia/Calcutta Norwegian nb latarcyrheb-sun16 nb_NO.UTF-8 no Europe/Oslo -Northern Sotho nso latarcyrheb-sun16 nso_ZA.UTF-8 us Africa/Johannesburg -Oriya or none or_IN.UTF-8 us Asia/Calcutta -Polish pl latarcyrheb-sun16 pl_PL.UTF-8 pl2 Europe/Warsaw Portuguese pt latarcyrheb-sun16 pt_PT.UTF-8 pt-latin1 Europe/Lisbon Portuguese(Brazilian) pt_BR latarcyrheb-sun16 pt_BR.UTF-8 br-abnt2 America/Sao_Paulo -Punjabi pa none pa_IN.UTF-8 us Asia/Calcutta Russian ru latarcyrheb-sun16 ru_RU.UTF-8 ru Europe/Moscow -Serbian sr latarcyrheb-sun16 sr_CS.UTF-8 sr-cy Europe/Belgrade -Serbian(Latin) sr@Latn latarcyrheb-sun16 sr_CS.UTF-8@Latn sr-cy Europe/Belgrade -Sinhala si none si_LK.UTF-8 us Asia/Colombo -Slovak sk latarcyrheb-sun16 sk_SK.UTF-8 sk-qwerty Europe/Bratislava Slovenian sl latarcyrheb-sun16 sl_SI.UTF-8 slovene Europe/Ljubljana Spanish es latarcyrheb-sun16 es_ES.UTF-8 es Europe/Madrid Swedish sv latarcyrheb-sun16 sv_SE.UTF-8 sv-latin1 Europe/Stockholm -Tamil ta none ta_IN.UTF-8 us Asia/Calcutta -Telugu te none te_IN.UTF-8 us Asia/Calcutta Turkish tr latarcyrheb-sun16 tr_TR.UTF-8 trq Europe/Istanbul -Ukrainian uk latarcyrheb-sun16 uk_UA.UTF-8 ua-utf Europe/Kiev -Vietnamese vi latarcyrheb-sun16 vi_VN.UTF-8 us Asia/Saigon -Welsh cy latarcyrheb-sun16 cy_GB.UTF-8 uk Europe/London -Zulu zu latarcyrheb-sun16 zu_ZA.UTF-8 us Africa/Johannesburg diff -up anaconda-11.1.2.168/language.py.smepatches anaconda-11.1.2.168/language.py --- anaconda-11.1.2.168/language.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/language.py 2009-04-14 12:57:23.000000000 -0600 @@ -57,7 +57,9 @@ class Language: self.current = "en_US.UTF-8" # English name -> native name mapping - search = ('lang-names', '/usr/lib/anaconda/lang-names') + search = ('lang-names', '/tmp/updates/lang-names', + '/mnt/source/RHupdates/lang-names', + '/usr/lib/anaconda/lang-names') for path in search: if os.access(path, os.R_OK): f = open(path, 'r') @@ -109,6 +111,8 @@ class Language: def getNickByName (self, name): for k in self.localeInfo.keys(): + if k == 'C': + continue row = self.localeInfo[k] if row[0] == name: return k diff -up anaconda-11.1.2.168/packages.py.smepatches anaconda-11.1.2.168/packages.py --- anaconda-11.1.2.168/packages.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/packages.py 2009-04-14 12:58:23.000000000 -0600 @@ -147,6 +147,7 @@ def turnOnFilesystems(anaconda): anaconda.id.diskset.savePartitions () anaconda.id.partitions.doEncryptionRetrofits() anaconda.id.fsset.checkBadblocks(anaconda.rootPath) + anaconda.id.fsset.createBootRaid(anaconda.rootPath) if not anaconda.id.fsset.volumesCreated: try: anaconda.id.fsset.createLogicalVolumes(anaconda.rootPath) diff -up anaconda-11.1.2.168/partedUtils.py.smepatches anaconda-11.1.2.168/partedUtils.py --- anaconda-11.1.2.168/partedUtils.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/partedUtils.py 2009-04-14 12:59:39.000000000 -0600 @@ -513,8 +513,8 @@ def sniffFilesystemType(device): return None def getReleaseString(mountpoint): - if os.access(mountpoint + "/etc/redhat-release", os.R_OK): - f = open(mountpoint + "/etc/redhat-release", "r") + if os.access(mountpoint + "/etc/e-smith-release", os.R_OK): + f = open(mountpoint + "/etc/e-smith-release", "r") try: lines = f.readlines() except IOError: @@ -556,6 +556,7 @@ def productMatches(oldproduct, newproduc return 1 productUpgrades = { + "SME Server": ("Mitel Networks", "SME Server", "e-smith server", ), "Red Hat Enterprise Linux Server": ("Red Hat Enterprise Linux Client release 5", "Red Hat Enterprise Linux Server release 5"), "Red Hat Enterprise Linux Client": ("Red Hat Enterprise Linux Client release 5", diff -up anaconda-11.1.2.168/raid.py.smepatches anaconda-11.1.2.168/raid.py --- anaconda-11.1.2.168/raid.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/raid.py 2009-04-14 13:05:17.000000000 -0600 @@ -123,7 +123,17 @@ def scanForRaid(drives): raidList = [] for key in raidSets.keys(): (level, totalDisks, mdMinor, devices) = raidSets[key] - if len(devices) < totalDisks: + if len(devices) == totalDisks - 1 and level in (1, 5, 6): + log.info("missing components of raid device md%d. The " + "raid device needs %d drive(s) and only %d (was/were) found. " + "This raid device will be started in degraded mode.", mdMinor, + totalDisks, len(devices)) + elif len(devices) == totalDisks - 2 and level == 6: + log.info("missing components of raid device md%d. The " + "raid device needs %d drive(s) and only %d (was/were) found. " + "This raid device will be started in degraded mode.", mdMinor, + totalDisks, len(devices)) + elif len(devices) < totalDisks: log.warning("missing components of raid device md%d. The " "raid device needs %d drive(s) and only %d (was/were) " "found. This raid device will not be started.", mdMinor, @@ -177,11 +187,11 @@ def get_raid_min_members(raidlevel): if isRaid0(raidlevel): return 2 elif isRaid1(raidlevel): - return 2 + return 1 elif isRaid5(raidlevel): - return 3 + return 2 elif isRaid6(raidlevel): - return 4 + return 2 else: raise ValueError, "invalid raidlevel in get_raid_min_members" diff -up anaconda-11.1.2.168/text.py.smepatches anaconda-11.1.2.168/text.py --- anaconda-11.1.2.168/text.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/text.py 2009-04-14 13:06:35.000000000 -0600 @@ -716,7 +716,8 @@ class InstallInterface: "from here. You will have to try " "again."), buttons=[_("OK")]) - anaconda.dispatch.gotoPrev() + else: + anaconda.dispatch.gotoPrev() else: anaconda.dispatch.gotoNext() diff -up anaconda-11.1.2.168/textw/confirm_text.py.smepatches anaconda-11.1.2.168/textw/confirm_text.py --- anaconda-11.1.2.168/textw/confirm_text.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/textw/confirm_text.py 2009-04-14 12:37:34.000000000 -0600 @@ -19,6 +19,13 @@ from image import presentRequiredMediaMe class BeginInstallWindow: def __call__ (self, screen, anaconda): + rc = anaconda.intf.messageWindow(_("Warning"), + _("All disks will be reformatted and any data will be lost. Proceed?"), + type = "yesno", default = "no") + + if rc == 0: + return INSTALL_BACK + rc = ButtonChoiceWindow (screen, _("Installation to begin"), _("A complete log of your installation will be in " "%s after rebooting your system. You " diff -up anaconda-11.1.2.168/textw/progress_text.py.smepatches anaconda-11.1.2.168/textw/progress_text.py --- anaconda-11.1.2.168/textw/progress_text.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/textw/progress_text.py 2009-04-14 12:26:15.000000000 -0600 @@ -115,8 +115,8 @@ class InstallProgressWindow: currow = 0 - width = 47 + max (len (name), len (size), len (sum)) - self.name = Label(" " * 48) + width = 60 + max (len (name), len (size), len (sum)) + self.name = Label(" " * 59) self.size = Label(" ") detail = Grid(2, 2) detail.setField(Label(name), 0, 0, anchorLeft = 1) diff -up anaconda-11.1.2.168/textw/timezone_text.py.smepatches anaconda-11.1.2.168/textw/timezone_text.py --- anaconda-11.1.2.168/textw/timezone_text.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/textw/timezone_text.py 2009-04-14 12:28:01.000000000 -0600 @@ -37,8 +37,7 @@ class TimezoneWindow: def updateSysClock(self): args = ["--hctosys"] - if self.c.selected(): - args.append("--utc") + args.append("--utc") iutil.execWithRedirect("hwclock", args, searchPath=1) self.g.setTimer(500) @@ -83,14 +82,14 @@ class TimezoneWindow: self.l.setCurrent(default) # self.l.setCallback(self.updateClock) - self.c = Checkbox(_("System clock uses UTC"), isOn = asUtc) +# self.c = Checkbox(_("System clock uses UTC"), isOn = asUtc) # self.c.setCallback(self.updateSysClock) self.g = GridFormHelp(screen, _("Time Zone Selection"), "timezone", 1, 5) self.g.add(t, 0, 0) # self.g.add(self.label, 0, 1, padding = (0, 1, 0, 0), anchorLeft = 1) - self.g.add(self.c, 0, 2, padding = (0, 1, 0, 1), anchorLeft = 1) +# self.g.add(self.c, 0, 2, padding = (0, 1, 0, 1), anchorLeft = 1) self.g.add(self.l, 0, 3, padding = (0, 0, 0, 1)) self.g.add(bb, 0, 4, growx = 1) @@ -118,7 +117,7 @@ class TimezoneWindow: break screen.popWindow() - anaconda.id.timezone.setTimezoneInfo(self.l.current(), asUtc = self.c.selected()) + anaconda.id.timezone.setTimezoneInfo(self.l.current(), asUtc = 1) return INSTALL_OK diff -up anaconda-11.1.2.168/textw/upgrade_bootloader_text.py.smepatches anaconda-11.1.2.168/textw/upgrade_bootloader_text.py --- anaconda-11.1.2.168/textw/upgrade_bootloader_text.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/textw/upgrade_bootloader_text.py 2009-04-14 12:31:24.000000000 -0600 @@ -44,75 +44,24 @@ class UpgradeBootloaderWindow: else: nobl = 1 - if self.type is not None and self.bootDev is not None: - t = TextboxReflowed(53, - _("The installer has detected the %s boot " - "loader currently installed on %s.") - % (self.type, self.bootDev)) - - self.update_radio = blradio.add(_("Update boot loader configuration"), - "update", update) + if nobl == 1: + self.dispatch.skipStep("bootloadersetup", skip = 1) + self.dispatch.skipStep("bootloader", skip = 1) + self.dispatch.skipStep("bootloaderadvanced", skip = 1) + self.dispatch.skipStep("instbootloader", skip = 1) + elif newbl == 1: + self.dispatch.skipStep("bootloadersetup", skip = 0) + self.dispatch.skipStep("bootloader", skip = 1) + self.dispatch.skipStep("bootloaderadvanced", skip = 1) + self.dispatch.skipStep("instbootloader", skip = 0) + self.bl.doUpgradeOnly = 0 else: - t = TextboxReflowed(53, - _("The installer is unable to detect the boot loader " - "currently in use on your system.")) - - self.update_radio = blradio.add(_("Update boot loader configuration"), - "update", update) - self.update_radio.w.checkboxSetFlags(FLAG_DISABLED, FLAGS_SET) - - self.nobl_radio = blradio.add(_("Skip boot loader updating"), - "nobl", nobl) - self.newbl_radio = blradio.add(_("Create new boot loader " - "configuration"), - "newbl", newbl) - - buttons = ButtonBar(screen, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON]) - - grid = GridFormHelp(screen, _("Upgrade Boot Loader Configuration"), - "bl-upgrade", 1, 5) - - grid.add(t, 0, 0, (0,0,0,1)) - grid.add(self.update_radio, 0, 1, (0,0,0,0)) - grid.add(self.nobl_radio, 0, 2, (0,0,0,0)) - grid.add(self.newbl_radio, 0, 3, (0,0,0,1)) - grid.add(buttons, 0, 4, growx = 1) - - - while 1: - result = grid.run() - - button = buttons.buttonPressed(result) - - if button == TEXT_BACK_CHECK: - screen.popWindow() - return INSTALL_BACK - - if blradio.getSelection() == "nobl": - self.dispatch.skipStep("bootloadersetup", skip = 1) - self.dispatch.skipStep("bootloader", skip = 1) - self.dispatch.skipStep("bootloaderadvanced", skip = 1) - self.dispatch.skipStep("instbootloader", skip = 1) - elif blradio.getSelection() == "newbl": - self.dispatch.skipStep("bootloadersetup", skip = 0) - self.dispatch.skipStep("bootloader", skip = 0) - self.dispatch.skipStep("bootloaderadvanced", skip = 0) - self.dispatch.skipStep("instbootloader", skip = 0) - self.bl.doUpgradeOnly = 0 - else: - self.dispatch.skipStep("bootloadersetup", skip = 0) - self.dispatch.skipStep("bootloader", skip = 1) - self.dispatch.skipStep("bootloaderadvanced", skip = 1) - self.dispatch.skipStep("instbootloader", skip = 0) - self.bl.doUpgradeOnly = 1 - - if self.type == "GRUB": - self.bl.useGrubVal = 1 - else: - self.bl.useGrubVal = 0 - self.bl.setDevice(self.bootDev) - - + self.dispatch.skipStep("bootloadersetup", skip = 0) + self.dispatch.skipStep("bootloader", skip = 1) + self.dispatch.skipStep("bootloaderadvanced", skip = 1) + self.dispatch.skipStep("instbootloader", skip = 0) + self.bl.doUpgradeOnly = 1 + self.bl.useGrubVal = 1 + self.bl.setDevice(self.bootDev) - screen.popWindow() - return INSTALL_OK + return INSTALL_OK diff -up anaconda-11.1.2.168/textw/upgrade_text.py.smepatches anaconda-11.1.2.168/textw/upgrade_text.py --- anaconda-11.1.2.168/textw/upgrade_text.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/textw/upgrade_text.py 2009-04-14 12:34:32.000000000 -0600 @@ -20,8 +20,8 @@ from snack import * from fsset import * from flags import flags from constants import * -import upgradeclass -UpgradeClass = upgradeclass.InstallClass +import smeupgradeclass +UpgradeClass = smeupgradeclass.InstallClass from rhpl.translate import _ import rhpl @@ -200,26 +200,19 @@ class UpgradeExamineWindow: else: scroll = 0 partList = [] - partList.append(_("Reinstall System")) + partList.append(_("Erase ALL disks, and perform a fresh install")) for (drive, fs, desc, label) in parts: - if drive[:5] != "/dev/": - devname = "/dev/" + drive - else: - devname = drive - partList.append("%s (%s)" %(desc, drive)) + partList.append(_("Upgrade existing \"%s\" system") %(desc)) (button, choice) = ListboxChoiceWindow(screen, _("System to Upgrade"), - _("One or more existing Linux installations " - "have been found " - "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, height = height, - help = "upgraderoot") + help = "upgraderoot", + default = 1) if button == TEXT_BACK_CHECK: return INSTALL_BACK diff -up anaconda-11.1.2.168/upgrade.py.smepatches anaconda-11.1.2.168/upgrade.py --- anaconda-11.1.2.168/upgrade.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/upgrade.py 2009-04-14 13:07:55.000000000 -0600 @@ -123,7 +123,7 @@ def findRootParts(anaconda): if anaconda.id.rootParts is not None and len(anaconda.id.rootParts) > 0: anaconda.dispatch.skipStep("findinstall", skip = 0) - if productName.find("Red Hat Enterprise Linux") == -1: + if productName.find("SME Server") == -1: anaconda.dispatch.skipStep("installtype", skip = 1) else: anaconda.dispatch.skipStep("findinstall", skip = 1) diff -up anaconda-11.1.2.168/yuminstall.py.smepatches anaconda-11.1.2.168/yuminstall.py --- anaconda-11.1.2.168/yuminstall.py.smepatches 2008-12-18 03:21:19.000000000 -0700 +++ anaconda-11.1.2.168/yuminstall.py 2009-04-14 13:11:12.000000000 -0600 @@ -1071,7 +1071,8 @@ class YumBackend(AnacondaBackend): if foundModule == 1: for (n, arch, tag) in kernelVersions: - recreateInitrd(n, anaconda.rootPath) + if os.access("/boot/System.map-%s" %(n,), os.X_OK): + recreateInitrd(n, anaconda.rootPath) def selectBestKernel(self, anaconda): """Find the best kernel package which is available and select it.""" @@ -1642,10 +1643,10 @@ class YumBackend(AnacondaBackend): # Figure out current version for upgrade nag and for determining weird # upgrade cases supportedUpgradeVersion = -1 - for pkgtup in self.ayum.rpmdb.whatProvides('redhat-release', None, None): + for pkgtup in self.ayum.rpmdb.whatProvides('e-smith-release', None, None): n, a, e, v, r = pkgtup if supportedUpgradeVersion <= 0: - val = rpmUtils.miscutils.compareEVR((None, '3', '1'), + val = rpmUtils.miscutils.compareEVR(('26', '7.0', '01'), (e, v,r)) if val > 0: supportedUpgradeVersion = 0 @@ -1653,9 +1654,6 @@ class YumBackend(AnacondaBackend): supportedUpgradeVersion = 1 break - if productName.find("Red Hat Enterprise Linux") == -1: - supportedUpgradeVersion = 1 - if supportedUpgradeVersion == 0: rc = anaconda.intf.messageWindow(_("Warning"), _("You appear to be upgrading from a system " @@ -1669,7 +1667,7 @@ class YumBackend(AnacondaBackend): try: os.unlink("%s/var/lib/rpm/%s" %(anaconda.rootPath, rpmfile)) except: - log.info("error %s removing file: /var/lib/rpm/%s" %(e,rpmfile)) + #log.info("error %s removing file: /var/lib/rpm/%s" %(e,rpmfile)) pass sys.exit(0) @@ -1718,7 +1716,8 @@ class YumBackend(AnacondaBackend): # to the old method. if len(self._installedDriverModules) > 0 and len(self._installedDriverModules) == len(anaconda.id.extraModules): for (n, arch, tag) in self.kernelVersionList(): - recreateInitrd(n, anaconda.rootPath) + if os.access("/boot/System.map-%s" %(n,), os.X_OK): + recreateInitrd(n, anaconda.rootPath) else: modulesList = filter(lambda m: m not in self._installedDriverModules, anaconda.id.extraModules) self.copyExtraModules(anaconda, modulesList)