[yum-commits] Branch 'yum-3_2_X' - 2 commits - test/simpleobsoletestests.py yum/__init__.py

James Antill james at osuosl.org
Tue Jan 13 22:46:05 UTC 2009


 test/simpleobsoletestests.py |    6 ++++--
 yum/__init__.py              |    3 +--
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 1cfdc1503de9c920d967a778ee1251b5a8309105
Author: James Antill <james at and.org>
Date:   Tue Jan 13 17:45:59 2009 -0500

    Count pkgs properly, hopefully, when we try to download 2 at once

diff --git a/yum/__init__.py b/yum/__init__.py
index f422f13..5d2989c 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1227,10 +1227,10 @@ class YumBase(depsolve.Depsolve):
             #  Recheck if the file is there, works around a couple of weird
             # edge cases.
             local = po.localPkg()
+            i += 1
             if os.path.exists(local):
                 if self.verifyPkg(local, po, False):
                     self.verbose_logger.debug(_("using local copy of %s") %(po,))
-                    i -= 1
                     remote_size -= po.size
                     if hasattr(urlgrabber.progress, 'text_meter_total_size'):
                         urlgrabber.progress.text_meter_total_size(remote_size,
@@ -1239,7 +1239,6 @@ class YumBase(depsolve.Depsolve):
                 if os.path.getsize(local) >= po.size:
                     os.unlink(local)
 
-            i += 1
             checkfunc = (self.verifyPkg, (po, 1), {})
             dirstat = os.statvfs(po.repo.pkgdir)
             if (dirstat.f_bavail * dirstat.f_bsize) <= long(po.size):
commit f549fe91cde4edb367a9683ab7717c9d5009c11b
Author: James Antill <james at and.org>
Date:   Tue Jan 13 17:45:28 2009 -0500

    Add conflicts to model 479889, installing both is the rttd

diff --git a/test/simpleobsoletestests.py b/test/simpleobsoletestests.py
index 02a4d66..4fdf67c 100644
--- a/test/simpleobsoletestests.py
+++ b/test/simpleobsoletestests.py
@@ -428,13 +428,15 @@ class SimpleObsoletesTests(OperationsTests):
 
         aop1        = FakePackage('bar', '1', '1', '0', 'noarch')
         aop1.addObsoletes('foo', 'LT', ('0', '1', '2'))
+        aop1.addConflicts('bazing')
         aop2        = FakePackage('bazing', '1', '1', '0', 'noarch')
         aop2.addObsoletes('foo', 'LT', ('0', '1', '2'))
+        aop2.addConflicts('bar')
 
         res, msg = self.runOperation(['update'],
                                      [rp1], [aop1, aop2])
-        self.assert_(res=='ok', msg)
-        self.assertResult((aop1,))
+        self.assert_(res=='err', msg)
+        # self.assertResult((aop1,aop2))
 
 
 class GitMetapackageObsoletesTests(OperationsTests):


More information about the Yum-commits mailing list