[yum-cvs] Branch 'yum-3_0_X' - cli.py

Seth Vidal skvidal at linux.duke.edu
Tue Dec 4 19:15:26 UTC 2007


 cli.py |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit afc8958fad04dacec80231bdfc5b8e63961583a3
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Dec 4 14:15:04 2007 -0500

    apply disk space required summary check to yum 3.0.X, too

diff --git a/cli.py b/cli.py
index 6af2c97..eed6b36 100644
--- a/cli.py
+++ b/cli.py
@@ -345,9 +345,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