[yum-cvs] cli.py
Seth Vidal
skvidal at linux.duke.edu
Tue Dec 4 19:13:23 UTC 2007
cli.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 2e794b2dc1fe815936e149754ec03b5cbaa3ee70
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Tue Dec 4 14:13:01 2007 -0500
make sure the summary errors show the highest amount disk space required
not the total b/c the totals don't normally make any sense.
diff --git a/cli.py b/cli.py
index 7832b74..39ddfba 100644
--- a/cli.py
+++ b/cli.py
@@ -246,9 +246,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
p = re.compile('needs (\d+)MB on the (\S+) filesystem')
disk = {}
for m in p.finditer(errstring):
- if not disk.has_key(m.group(2)):
- disk[m.group(2)]=0
- disk[m.group(2)] += int(m.group(1))
+ if not disk.has_key(m.group(2)):
+ disk[m.group(2)]= int(m.group(1))
+ if disk[m.group(2)] < int(m.group(1)):
+ disk[m.group(2)] == int(m.group(1))
+
if disk.keys():
summary += 'Disk Requirements:\n'
for k in disk.keys():
More information about the Yum-cvs-commits
mailing list