summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-05-08 12:32:42 -0500
committerDavid Lehman <dlehman@redhat.com>2009-05-08 14:59:26 -0500
commit72d46dbe2b99c4486f7d3153b3f481d30c976721 (patch)
treebceaac0d70b0b787ed724a77121e73fe4f2b3d5e /storage
parentbbf0adeaffe9f818fc21c0b6339e70a869d50de5 (diff)
downloadanaconda-72d46dbe2b99c4486f7d3153b3f481d30c976721.tar.gz
anaconda-72d46dbe2b99c4486f7d3153b3f481d30c976721.tar.xz
anaconda-72d46dbe2b99c4486f7d3153b3f481d30c976721.zip
Once a partition is part of another device it cannot be modified. (#496760)
Diffstat (limited to 'storage')
-rw-r--r--storage/partitioning.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py
index 66be38bd9..1a6ee0ef3 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -555,9 +555,16 @@ def doPartitioning(storage, exclusiveDisks=None):
for disk in disks:
disk.setup()
- partitions = storage.partitions
- for part in partitions:
+ partitions = storage.partitions[:]
+ for part in storage.partitions:
part.req_bootable = False
+
+ if part.exists or storage.deviceImmutable(part):
+ # if the partition is preexisting or part of a complex device
+ # then we shouldn't modify it
+ partitions.remove(part)
+ continue
+
if not part.exists:
# start over with flexible-size requests
part.req_size = part.req_base_size
@@ -577,7 +584,7 @@ def doPartitioning(storage, exclusiveDisks=None):
# The number and thus the name of partitions may have changed now,
# allocatePartitions() takes care of this for new partitions, but not
# for pre-existing ones, so we update the name of all partitions here
- for part in partitions:
+ for part in storage.partitions:
# needed because of XXX hack below
if part.isExtended:
continue