Ejemplo n.º 1
0
    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 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 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.upgrade = True

            anaconda.upgradeRoot = [(root[0], root[1])]
            anaconda.rootParts = parts
        else:
            anaconda.upgradeRoot = None

        seenExamineScreen = True
        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 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 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.upgrade = True

            anaconda.upgradeRoot = [(root[0], root[1])]
            anaconda.rootParts = parts
        else:
            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.upgrade = True
        else:
            self.anaconda.upgrade = False

        return None
Ejemplo n.º 4
0
    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.upgrade = True
        else:
            self.anaconda.upgrade = False

        return None