diff options
author | Chris Lumens <clumens@redhat.com> | 2009-03-26 13:53:45 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-03-30 17:27:10 -0400 |
commit | 78b930d80ecddb3a8c28b077a5c96ef06a78d8e2 (patch) | |
tree | 0eba527dc926320aeb5761b12b8c0f7f163bc8fa | |
parent | 9f0fdbf1078d114e98c4a4ecf84122bd7d6f9b34 (diff) | |
download | anaconda-78b930d80ecddb3a8c28b077a5c96ef06a78d8e2.tar.gz anaconda-78b930d80ecddb3a8c28b077a5c96ef06a78d8e2.tar.xz anaconda-78b930d80ecddb3a8c28b077a5c96ef06a78d8e2.zip |
Take the base request weight into account when sorting partitions.
-rw-r--r-- | storage/partitioning.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py index 8e8d080d5..0e035d3c1 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -356,6 +356,12 @@ def partitionCompare(part1, part2): """ ret = 0 + if part1.req_base_weight: + ret -= part1.req_base_weight + + if part2.req_base_weight: + ret += part2.req_base_weight + # bootable partitions to the front ret -= cmp(part1.req_bootable, part2.req_bootable) * 1000 |