diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-06-12 06:50:53 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-06-12 06:50:53 +0000 |
commit | 847f7c9930e28a606f2037358bb11ae99b582e5b (patch) | |
tree | 74e5c41d7ce117e57a48936a8aa2f6a73030cd89 /iw | |
parent | b2a26d21724cf896c67c9a792d222106dfcd603c (diff) | |
download | anaconda-847f7c9930e28a606f2037358bb11ae99b582e5b.tar.gz anaconda-847f7c9930e28a606f2037358bb11ae99b582e5b.tar.xz anaconda-847f7c9930e28a606f2037358bb11ae99b582e5b.zip |
clean up display of logical volumes, handle preexisting logical volumes being deleted and format setup
Diffstat (limited to 'iw')
-rw-r--r-- | iw/partition_gui.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py index 8286ba27f..c74472d30 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -606,7 +606,7 @@ class PartitionWindow(InstallWindow): for lvrequest in lvmrequests[vgname]: iter = self.tree.append(vgparent) self.tree[iter]['Device'] = lvrequest.logicalVolumeName - if lvrequest.fstype and lvrequest.fstype.isMountable() and lvrequest.mountpoint: + if lvrequest.fstype and lvrequest.mountpoint: self.tree[iter]['Mount Point'] = lvrequest.mountpoint else: self.tree[iter]['Mount Point'] = "" @@ -614,7 +614,7 @@ class PartitionWindow(InstallWindow): self.tree[iter]['PyObject'] = str(lvrequest.uniqueID) ptype = lvrequest.fstype.getName() - self.tree[iter]['Format'] = gtk.TRUE + self.tree[iter]['Format'] = lvrequest.format self.tree[iter]['IsFormattable'] = lvrequest.fstype.isFormattable() self.tree[iter]['IsLeaf'] = gtk.TRUE self.tree[iter]['Type'] = ptype @@ -934,6 +934,22 @@ class PartitionWindow(InstallWindow): # first add the volume group if not isNew: + # if an lv was preexisting and isn't in the new lv requests, + # we need to add a delete for it. + for lv in origvolreqs: + if not lv.getPreExisting(): + continue + found = 0 + for newlv in logvolreqs: + if (newlv.getPreExisting() and + newlv.logicalVolumeName == lv.logicalVolumeName): + found = 1 + break + if found == 0: + delete = partRequests.DeleteLogicalVolumeSpec(lv.logicalVolumeName, + origvgrequest.volumeGroupName) + self.partitions.addDelete(delete) + for lv in origvolreqs: self.partitions.removeRequest(lv) @@ -944,7 +960,8 @@ class PartitionWindow(InstallWindow): # now add the logical volumes for lv in logvolreqs: lv.volumeGroup = vgID - lv.format = 1 + if not lv.getPreExisting(): + lv.format = 1 self.partitions.addRequest(lv) if self.refresh(): |