summaryrefslogtreecommitdiffstats
path: root/autopart.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-13 21:59:28 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-13 21:59:28 +0000
commitdb838fe23afd468ceb20bf012bcdac0c920e8262 (patch)
tree7fc032577cbbde4ce8765326f2ec1af418bbd800 /autopart.py
parentfa59be436f0c35fdbb1d288e548109610b8c9a86 (diff)
downloadanaconda-db838fe23afd468ceb20bf012bcdac0c920e8262.tar.gz
anaconda-db838fe23afd468ceb20bf012bcdac0c920e8262.tar.xz
anaconda-db838fe23afd468ceb20bf012bcdac0c920e8262.zip
don't remove protected partitions in auto partitioning (48622)
Diffstat (limited to 'autopart.py')
-rw-r--r--autopart.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/autopart.py b/autopart.py
index ed4c6add5..2540de252 100644
--- a/autopart.py
+++ b/autopart.py
@@ -744,7 +744,7 @@ def doClearPartAction(partitions, diskset):
disk = diskset.disks[drive]
part = disk.next_partition()
while part:
- if (part.type & parted.PARTITION_FREESPACE) or (part.type & parted.PARTITION_METADATA):
+ if not part.is_active() or (part.type == parted.PARTITION_EXTENDED):
part = disk.next_partition(part)
continue
if part.fs_type:
@@ -753,6 +753,10 @@ def doClearPartAction(partitions, diskset):
ptype = None
if (linuxOnly == 0) or (ptype and (ptype.isLinuxNativeFS())):
old = partitions.getRequestByDeviceName(get_partition_name(part))
+ if old.type == REQUEST_PROTECTED:
+ part = disk.next_partition(part)
+ continue
+
partitions.removeRequest(old)
drive = get_partition_drive(part)