Ejemplo n.º 1
0
    def nextCheck(self):
        if self.ui.autopartType.currentRow() == CUSTOM:
            self.storage.clearPartType = CLEARPART_TYPE_NONE
            self.storage.doAutoPart = False
            #If user return back next screen or choose not permitted
            #option(like chosing free space installation however not
            #enough free space to install), we have to reset increment
            ctx.mainScreen.step_increment = 1
            return True
        else:
            self.storage.doAutoPart = True
            if self.ui.autopartType.currentRow() == SHRINK_CURRENT:
                shrinkeditor = ShrinkEditor(self, self.storage)
                rc, operations = shrinkeditor.run()
                if rc:
                    for operation in operations:
                        self.storage.devicetree.addOperation(operation)
                else:
                    return False
                self.storage.clearPartType = CLEARPART_TYPE_NONE
            elif self.ui.autopartType.currentRow() == USE_ALL_SPACE:
                self.storage.clearPartType = CLEARPART_TYPE_ALL
            elif self.ui.autopartType.currentRow() == FREE_SPACE:
                self.storage.clearPartType = CLEARPART_TYPE_NONE

            ctx.mainScreen.step_increment = 2
            self.storage.autoPartitionRequests = defaultPartitioning(
                self.storage, quiet=0, asVol=ctx.flags.partitioning_lvm)

            try:
                returncode = doAutoPartition(self.storage)
            except Exception, msg:
                ctx.logger.debug(msg)
                ctx.mainScreen.enableBack()
            else:
Ejemplo n.º 2
0
    def nextCheck(self):
        if self.ui.autopartType.currentRow() == createCustom:
            self.storage.clearPartType = CLEARPART_TYPE_NONE
            self.storage.doAutoPart = False
            #If user return back next screen or choose not permitted
            #option(like chosing free space installation however not
            #enough free space to install), we have to reset increment
            ctx.mainScreen.stepIncrement = 1
            return True
        else:
            self.storage.doAutoPart = True
            if self.ui.autopartType.currentRow() == shrinkCurrent:
                shrinkeditor = ShrinkEditor(self, self.storage)
                rc, operations = shrinkeditor.run()
                if rc:
                    for operation in operations:
                        self.storage.devicetree.addOperation(operation)
                else:
                    return False
                self.storage.clearPartType = CLEARPART_TYPE_NONE
            elif self.ui.autopartType.currentRow() == useAllSpace:
                self.storage.clearPartType = CLEARPART_TYPE_ALL
            elif self.ui.autopartType.currentRow() == useFreeSpace:
                self.storage.clearPartType = CLEARPART_TYPE_NONE

            ctx.mainScreen.stepIncrement = 2
            self.storage.autoPartitionRequests = defaultPartitioning(self.storage, quiet=0)
            return doAutoPartition(self.storage)

        return False
Ejemplo n.º 3
0
    def nextCheck(self):
        if self.ui.autopartType.currentRow() == createCustom:
            self.storage.clearPartType = CLEARPART_TYPE_NONE
            self.storage.doAutoPart = False
            return True
        else:
            self.storage.doAutoPart = True
            if self.ui.autopartType.currentRow() == shrinkCurrent:
                shrinkeditor = ShrinkEditor(self, self.storage)
                rc, operations = shrinkeditor.run()
                if rc:
                    for operation in operations:
                        self.storage.devicetree.addOperation(operation)
                else:
                    return False
                self.storage.clearPartType = CLEARPART_TYPE_NONE
            elif self.ui.autopartType.currentRow() == useAllSpace:
                self.storage.clearPartType = CLEARPART_TYPE_ALL
            elif self.ui.autopartType.currentRow() == replaceExistingLinux:
                self.storage.clearPartType = CLEARPART_TYPE_LINUX
            elif self.ui.autopartType.currentRow() == useFreeSpace:
                self.storage.clearPartType = CLEARPART_TYPE_NONE

            ctx.mainScreen.stepIncrement = 2
            self.storage.autoPartitionRequests = defaultPartitioning(self.storage, quiet=0)
            return doAutoPartition(self.storage)

        return False
Ejemplo n.º 4
0
    def nextCheck(self):
        if self.ui.autopartType.currentRow() == CUSTOM:
            self.storage.clearPartType = CLEARPART_TYPE_NONE
            self.storage.doAutoPart = False
            #If user return back next screen or choose not permitted
            #option(like chosing free space installation however not
            #enough free space to install), we have to reset increment
            ctx.mainScreen.step_increment = 1
            return True
        else:
            self.storage.doAutoPart = True
            if self.ui.autopartType.currentRow() == SHRINK_CURRENT:
                shrinkeditor = ShrinkEditor(self, self.storage)
                rc, operations = shrinkeditor.run()
                if rc:
                    for operation in operations:
                        self.storage.devicetree.addOperation(operation)
                else:
                    return False
                self.storage.clearPartType = CLEARPART_TYPE_NONE
            elif self.ui.autopartType.currentRow() == USE_ALL_SPACE:
                self.storage.clearPartType = CLEARPART_TYPE_ALL
            elif self.ui.autopartType.currentRow() == FREE_SPACE:
                self.storage.clearPartType = CLEARPART_TYPE_NONE

            ctx.mainScreen.step_increment = 2
            self.storage.autoPartitionRequests = defaultPartitioning(self.storage,
                                                                     quiet=0,
                                                                     asVol=ctx.flags.partitioning_lvm)

            try:
                returncode = doAutoPartition(self.storage)
            except Exception, msg:
                ctx.logger.debug(msg)
                ctx.mainScreen.enableBack()
            else: