def __call__(self, screen, anaconda): parts = anaconda.id.rootParts height = min(len(parts), 11) + 1 if height == 12: scroll = 1 else: scroll = 0 partList = [] partList.append(_("Reinstall System")) if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype") ) or anaconda.id.upgrade: default = 1 else: default = 0 for (device, desc) in parts: partList.append("%s (%s)" % (desc, device.path)) (button, choice) = ListboxChoiceWindow( screen, _("System to Upgrade"), _("There seem to be one or more existing Linux installations " "on your system.\n\nPlease choose one to upgrade, " "or select 'Reinstall System' to freshly install " "your system."), partList, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON], width=55, scroll=scroll, height=height, default=default, help="upgraderoot") if button == TEXT_BACK_CHECK: return INSTALL_BACK else: if choice == 0: root = None else: root = parts[choice - 1] if root is not None: upgrade.setSteps(anaconda) anaconda.id.setUpgrade(True) anaconda.id.upgradeRoot = [(root[0], root[1])] anaconda.id.rootParts = parts anaconda.dispatch.skipStep("installtype", skip=1) else: anaconda.dispatch.skipStep("installtype", skip=0) anaconda.id.upgradeRoot = None return INSTALL_OK
def __call__ (self, screen, anaconda): parts = anaconda.rootParts height = min(len(parts), 11) + 1 if height == 12: scroll = 1 else: scroll = 0 partList = [] partList.append(_("Reinstall System")) global seenExamineScreen if (not seenExamineScreen and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.upgrade: default = 1 else: default = 0 for (device, desc) in parts: partList.append("%s (%s)" %(desc, device.path)) (button, choice) = ListboxChoiceWindow(screen, _("System to Upgrade"), _("There seem to be one or more existing Linux installations " "on your system.\n\nPlease choose one to rescue, " "or select 'Reinstall System' to freshly install " "your system."), partList, [ TEXT_OK_BUTTON, TEXT_BACK_BUTTON ], width = 55, scroll = scroll, height = height, default = default, help = "upgraderoot") if button == TEXT_BACK_CHECK: return INSTALL_BACK else: if choice == 0: root = None else: root = parts[choice - 1] if root is not None: upgrade.setSteps(anaconda) anaconda.upgrade = True anaconda.upgradeRoot = [(root[0], root[1])] anaconda.rootParts = parts anaconda.dispatch.skipStep("installtype", skip = 1) else: anaconda.dispatch.skipStep("installtype", skip = 0) anaconda.upgradeRoot = None seenExamineScreen = True return INSTALL_OK
def getNext (self): if self.doupgrade: upgrade.setSteps(self.anaconda) self.anaconda.upgrade = True rootfs = self.parts[self.upgradecombo.get_active()] self.anaconda.upgradeRoot = [(rootfs[0], rootfs[1])] self.anaconda.rootParts = self.parts self.anaconda.dispatch.skipStep("installtype", skip = 1) self.anaconda.upgrade = True else: self.anaconda.dispatch.skipStep("installtype", skip = 0) self.anaconda.upgrade = False return None
def getNext(self): if self.doupgrade: upgrade.setSteps(self.anaconda) self.anaconda.id.setUpgrade(True) rootfs = self.parts[self.upgradecombo.get_active()] self.anaconda.id.upgradeRoot = [(rootfs[0], rootfs[1])] self.anaconda.id.rootParts = self.parts self.anaconda.dispatch.skipStep("installtype", skip=1) self.anaconda.id.upgrade = True else: self.anaconda.dispatch.skipStep("installtype", skip=0) self.anaconda.id.upgrade = False return None
def __call__ (self, screen, anaconda): if anaconda.dir == DISPATCH_BACK: # reset storage to catch any changes anaconda.id.storage.reset(examine_all=True) # we might get here after storage reset that obsoleted # root device objects we had found if not anaconda.id.rootParts: anaconda.id.rootParts = upgrade.findExistingRoots(anaconda, flags.cmdline.has_key("upgradeany")) upgrade.setUpgradeRoot(anaconda) parts = anaconda.id.rootParts height = min(len(parts), 11) + 1 if height == 12: scroll = 1 else: scroll = 0 partList = [] partList.append(_("Reinstall System")) if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.id.upgrade: default = 1 else: default = 0 for (device, desc) in parts: partList.append("%s (%s)" %(desc, device.path)) (button, choice) = ListboxChoiceWindow(screen, _("System to Upgrade"), _("There seem to be one or more existing Linux installations " "on your system.\n\nPlease choose one to upgrade, " "or select 'Reinstall System' to freshly install " "your system."), partList, [ TEXT_OK_BUTTON, TEXT_BACK_BUTTON ], width = 55, scroll = scroll, height = height, default = default, help = "upgraderoot") if button == TEXT_BACK_CHECK: return INSTALL_BACK else: if choice == 0: root = None else: root = parts[choice - 1] if root is not None: upgrade.setSteps(anaconda) anaconda.id.setUpgrade(True) anaconda.id.upgradeRoot = [(root[0], root[1])] anaconda.id.rootParts = parts anaconda.dispatch.skipStep("installtype", skip = 1) else: anaconda.dispatch.skipStep("installtype", skip = 0) anaconda.id.upgradeRoot = None return INSTALL_OK
def __call__(self, screen, anaconda): if anaconda.dir == DISPATCH_BACK: # reset storage to catch any changes anaconda.id.storage.reset(examine_all=True) # we might get here after storage reset that obsoleted # root device objects we had found if not anaconda.id.rootParts: anaconda.id.rootParts = upgrade.findExistingRoots( anaconda, flags.cmdline.has_key("upgradeany")) upgrade.setUpgradeRoot(anaconda) parts = anaconda.id.rootParts height = min(len(parts), 11) + 1 if height == 12: scroll = 1 else: scroll = 0 partList = [] partList.append(_("Reinstall System")) if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype") ) or anaconda.id.upgrade: default = 1 else: default = 0 for (device, desc) in parts: partList.append("%s (%s)" % (desc, device.path)) (button, choice) = ListboxChoiceWindow( screen, _("System to Upgrade"), _("There seem to be one or more existing Linux installations " "on your system.\n\nPlease choose one to upgrade, " "or select 'Reinstall System' to freshly install " "your system."), partList, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON], width=55, scroll=scroll, height=height, default=default, help="upgraderoot") if button == TEXT_BACK_CHECK: return INSTALL_BACK else: if choice == 0: root = None else: root = parts[choice - 1] if root is not None: upgrade.setSteps(anaconda) anaconda.id.setUpgrade(True) anaconda.id.upgradeRoot = [(root[0], root[1])] anaconda.id.rootParts = parts anaconda.dispatch.skipStep("installtype", skip=1) else: anaconda.dispatch.skipStep("installtype", skip=0) anaconda.id.upgradeRoot = None return INSTALL_OK