--- iw/partition_dialog_gui.py | 10 +++++++++- kickstart.py | 17 ++++++++++------- storage/partitioning.py | 35 +++++++++++++++++------------------ 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py index 71c7333..bb4a730 100644 --- a/iw/partition_dialog_gui.py +++ b/iw/partition_dialog_gui.py @@ -160,15 +160,19 @@ class PartitionEditor: disks.append(disk) format = fmt_class(mountpoint=mountpoint) + weight = self.anaconda.platform.weight(mountpoint=mountpoint, + fstype=format.type) if self.isNew: request = self.storage.newPartition(size=size, grow=grow, maxsize=maxsize, primary=primary, format=format, - parents=disks) + parents=disks, + weight=weight) else: request = self.origrequest + request.weight = weight if self.lukscb and self.lukscb.get_active() and \ request.format.type != "luks": @@ -210,6 +214,7 @@ class PartitionEditor: # preexisting partition, just set mount point and format flag request = self.origrequest mountpoint = self.mountCombo.get_children()[0].get_text() + if self.fsoptionsDict.has_key("formatcb") and \ self.fsoptionsDict["formatcb"].get_active(): fmt_class = self.fsoptionsDict["fstypeCombo"].get_active_value() @@ -231,6 +236,9 @@ class PartitionEditor: elif request.format.mountable: request.format.mountpoint = mountpoint + request.weight = self.anaconda.platform.weight(mountpoint=mountpoint, + fstype=request.format.type) + if self.fsoptionsDict.has_key("migratecb") and \ self.fsoptionsDict["migratecb"].get_active(): actions.append(ActionMigrateFormat(request)) diff --git a/kickstart.py b/kickstart.py index 802cb43..69af959 100644 --- a/kickstart.py +++ b/kickstart.py @@ -590,12 +590,14 @@ class Partition(commands.partition.F9_Partition): type = pd.fstype else: type = storage.defaultFSType -# elif pd.mountpoint == 'appleboot': -# filesystem = fileSystemTypeGet("Apple Bootstrap") -# pd.mountpoint = "" -# elif pd.mountpoint == 'prepboot': -# filesystem = fileSystemTypeGet("PPC PReP Boot") -# pd.mountpoint = "" + elif pd.mountpoint == 'appleboot': + type = fileSystemTypeGet("Apple Bootstrap") + pd.mountpoint = "" + kwargs["weight"] = self.handler.anaconda.platform.weight(fstype="appleboot") + elif pd.mountpoint == 'prepboot': + type = fileSystemTypeGet("PPC PReP Boot") + pd.mountpoint = "" + kwargs["weight"] = self.handler.anaconda.platform.weight(fstype="prepboot") elif pd.mountpoint.startswith("raid."): type = "mdmember" kwargs["name"] = pd.mountpoint @@ -613,8 +615,9 @@ class Partition(commands.partition.F9_Partition): pd.mountpoint = "" elif pd.mountpoint == "/boot/efi": - type = "vfat" + type = fileSystemTypeGet("EFI System Partition") pd.fsopts = "defaults,uid=0,gid=0,umask=0077,shortname=winnt" + kwargs["weight"] = self.handler.anaconda.platform.weight(fstype="efi") else: if pd.fstype != "": type = pd.fstype diff --git a/storage/partitioning.py b/storage/partitioning.py index 8d8df75..5b32878 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -86,19 +86,19 @@ def _schedulePartitions(anaconda, disks): # First pass is for partitions only. We'll do LVs later. # for request in anaconda.id.storage.autoPartitionRequests: - (mountpoint, fstype, size, maxsize, grow, asvol) = request - if asvol: + if request.asVol: continue - if fstype is None: - fstype = anaconda.id.storage.defaultFSType + if request.fstype is None: + request.fstype = anaconda.id.storage.defaultFSType - dev = anaconda.id.storage.newPartition(fmt_type=fstype, - size=size, - grow=grow, - maxsize=maxsize, - mountpoint=mountpoint, - disks=disks) + dev = anaconda.id.storage.newPartition(fmt_type=request.fstype, + size=request.size, + grow=request.grow, + maxsize=request.maxSize, + mountpoint=request.mountpoint, + disks=disks, + weight=request.weight) # schedule the device for creation anaconda.id.storage.createDevice(dev) @@ -129,20 +129,19 @@ def _scheduleLVs(anaconda, devs): # # Second pass, for LVs only. for request in anaconda.id.storage.autoPartitionRequests: - (mountpoint, fstype, size, maxsize, grow, asvol) = request - if not asvol: + if not request.asVol: continue - if fstype is None: - fstype = anaconda.id.storage.defaultFSType + if request.fstype is None: + request.fstype = anaconda.id.storage.defaultFSType # FIXME: move this to a function and handle exceptions dev = anaconda.id.storage.newLV(vg=vg, fmt_type=fstype, - mountpoint=mountpoint, - grow=grow, - maxsize=maxsize, - size=size) + mountpoint=request.mountpoint, + grow=request.grow, + maxsize=request.maxSize, + size=request.size) # schedule the device for creation anaconda.id.storage.createDevice(dev) -- 1.6.1.3 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list