--- anaconda-13.21.195/textw/partition_text.py 2012-11-26 12:42:03.000000000 -0800 +++ updates/textw/partition_text.py 2013-10-28 07:49:56.000000000 -0700 @@ -57,106 +57,18 @@ def __call__(self, screen, anaconda): self.anaconda = anaconda - - while 1: - g = GridFormHelp(screen, _("Partitioning Type"), "autopart", 1, 6) - - txt = TextboxReflowed(65, _("Installation requires partitioning of your hard drive. The default layout is suitable for most users. Select what space to use and which drives to use as the install target.")) - g.add(txt, 0, 0, (0, 0, 0, 0)) - - opts = ((_("Use entire drive"), CLEARPART_TYPE_ALL), - (_("Replace existing Linux system"), CLEARPART_TYPE_LINUX), - (_("Use free space"), CLEARPART_TYPE_NONE)) - typebox = Listbox(height = len(opts), scroll = 0) - for (txt, val) in opts: - typebox.append(txt, val) - - if anaconda.id.storage.clearPartType is None: - preselection = CLEARPART_TYPE_LINUX - else: - preselection = anaconda.id.storage.clearPartType - typebox.setCurrent(preselection) - - g.add(typebox, 0, 1, (0, 1, 0, 0)) - - # list of drives to select which to clear - subgrid = Grid(1, 2) - subgrid.setField(TextboxReflowed(55, _("Which drive(s) do you want to " - "use for this installation?")), - 0, 0) - drivelist = CheckboxTree(height=2, scroll=1) - subgrid.setField(drivelist, 0, 1) - g.add(subgrid, 0, 2, (0, 1, 0, 0)) - - bb = ButtonBar(screen, [ TEXT_OK_BUTTON, TEXT_BACK_BUTTON ]) - g.add(bb, 0, 5, (0,1,0,0)) - - - typebox.setCallback(self.typeboxChange, (typebox, drivelist)) - self.drivelist = drivelist - - g.addHotKey("F2") - screen.pushHelpLine (_(",<+>,<-> selection | Add drive | next screen")) - - # restore the drive list each time - disks = anaconda.id.storage.partitioned - cleardrives = anaconda.id.storage.clearPartDisks - - for disk in disks: - model = disk.model - - if not cleardrives or len(cleardrives) < 1: - selected = 1 - else: - if disk.name in cleardrives: - selected = 1 - else: - selected = 0 - - sizestr = "%8.0f MB" % (disk.size,) - diskdesc = "%6s %s (%s)" % (disk.name, sizestr, model[:23],) - - drivelist.append(diskdesc, selected = selected) - - rc = g.run() - - if len(self.drivelist.getSelection()) > 0: - sel = map(lambda s: s.split()[0], self.drivelist.getSelection()) - else: - sel = [] - partmethod_ans = typebox.current() - res = bb.buttonPressed(rc) - - self.clearDrivelist() - screen.popHelpLine() - screen.popWindow() - - if rc == "F2": - addDialog = addDriveDialog(anaconda) - if addDialog.addDriveDialog(screen) != INSTALL_BACK: - anaconda.id.storage.reset() - anaconda.id.bootloader.updateDriveList() - continue - - if res == TEXT_BACK_CHECK: - return INSTALL_BACK - - if anaconda.id.storage.checkNoDisks(): - continue - - if len(sel) < 1: - mustHaveSelectedDrive(anaconda.intf) - continue - - anaconda.dispatch.skipStep("autopartitionexecute", skip = 0) - anaconda.id.storage.doAutoPart = True - anaconda.id.storage.clearPartType = partmethod_ans - anaconda.id.storage.clearPartDisks = sel - break - - # ask to review autopartition layout - but only if it's not custom partitioning + anaconda.dispatch.skipStep("autopartitionexecute", skip = 0) + anaconda.id.storage.doAutoPart = True + anaconda.id.storage.clearPartType = CLEARPART_TYPE_ALL + anaconda.id.storage.clearPartDisks = map(lambda s: s.name, anaconda.id.storage.partitioned) anaconda.dispatch.skipStep("partition", skip = 1) anaconda.dispatch.skipStep("bootloader", skip = 1) + anaconda.dispatch.skipStep("bootloadersetup", skip = 0) + anaconda.dispatch.skipStep("bootloaderadvanced", skip = 1) + anaconda.dispatch.skipStep("instbootloader", skip = 0) + anaconda.id.bootloader.doUpgradeOnly = 1 + anaconda.id.bootloader.useGrubVal = 1 + #anaconda.id.bootloader.setDevice(self.bootDev) return INSTALL_OK --- anaconda-13.21.195.upstream/text.py 2012-11-26 12:42:03.000000000 -0800 +++ updates/text.py 2013-10-28 16:02:23.000000000 -0700 @@ -448,7 +448,6 @@ signal.signal(signal.SIGINT, signal.SIG_IGN) signal.signal(signal.SIGTSTP, signal.SIG_IGN) self.screen = SnackScreen() - self._initLabelAnswers = {} self._inconsistentLVMAnswers = {} def __del__(self): @@ -467,54 +466,12 @@ return True def resetInitializeDiskQuestion(self): - self._initLabelAnswers = {} + pass def questionInitializeDisk(self, path, description, size, details=""): - - retVal = False # The less destructive default - if not path: - return retVal - - # we are caching answers so that we don't - # ask in each storage.reset() again - if path in self._initLabelAnswers: - log.info("UI not asking about disk initialization, " - "using cached answer: %s" % self._initLabelAnswers[path]) - return self._initLabelAnswers[path] - elif "all" in self._initLabelAnswers: - log.info("UI not asking about disk initialization, " - "using cached answer: %s" % self._initLabelAnswers["all"]) - return self._initLabelAnswers["all"] - - rc = self.messageWindow(_("Warning"), - _("Error processing drive:\n\n" - "%(path)s\n%(size)-0.fMB\n%(description)s\n\n" - "This device may need to be reinitialized.\n\n" - "REINITIALIZING WILL CAUSE ALL DATA TO BE LOST!\n\n" - "This action may also be applied to all other disks " - "needing reinitialization.%(details)s") - % {'path': path, 'size': size, - 'description': description, 'details': details}, - type="custom", - custom_buttons = [ _("_Ignore"), - _("Ignore _all"), - _("_Re-initialize"), - _("Re-ini_tialize all") ], - custom_icon="question") - if rc == 0: - retVal = False - elif rc == 1: - path = "all" - retVal = False - elif rc == 2: - retVal = True - elif rc == 3: - path = "all" - retVal = True - - self._initLabelAnswers[path] = retVal - return retVal + return False + return True def resetReinitInconsistentLVMQuestion(self): self._inconsistentLVMAnswers = {}