def getPlatform(anaconda): """Check the architecture of the system and return an instance of a Platform subclass to match. If the architecture could not be determined, raise an exception.""" if iutil.isAlpha(): return Alpha(anaconda) elif iutil.isIA64(): return IA64(anaconda) elif iutil.isPPC(): ppcMachine = iutil.getPPCMachine() if (ppcMachine == "PMac" and iutil.getPPCMacGen() == "NewWorld"): return NewWorldPPC(anaconda) elif ppcMachine in ["iSeries", "pSeries"]: return IPSeriesPPC(anaconda) elif ppcMachine == "PS3": return PS3(anaconda) else: raise SystemError, "Unsupported PPC machine type" elif iutil.isS390(): return S390(anaconda) elif iutil.isSparc(): return Sparc(anaconda) elif iutil.isX86(): return X86(anaconda) else: raise SystemError, "Could not determine system architecture."
def getBootloader(anaconda): """Get the bootloader info object for your architecture""" if iutil.isX86(): import x86 return x86.x86BootloaderInfo(anaconda) elif iutil.isIA64(): import ia64 return ia64.ia64BootloaderInfo(anaconda) elif iutil.isS390(): import s390 return s390.s390BootloaderInfo(anaconda) elif iutil.isAlpha(): import alpha return alpha.alphaBootloaderInfo(anaconda) elif iutil.isPPC(): import ppc return ppc.ppcBootloaderInfo(anaconda) elif iutil.isSparc(): import sparc return sparc.sparcBootloaderInfo(anaconda) else: return bootloaderInfo(anaconda)