[yum-commits] Branch 'yum-3_2_X' - 4 commits - test/operationstests.py test/testbase.py yum/depsolve.py yum/packageSack.py
James Antill
james at osuosl.org
Mon Feb 2 20:04:15 UTC 2009
test/operationstests.py | 6 +++---
test/testbase.py | 1 +
yum/depsolve.py | 2 +-
yum/packageSack.py | 5 +++++
4 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 99cd6e7b9708dd2e147c49b59db8835bed524ce0
Author: James Antill <james at and.org>
Date: Mon Feb 2 15:02:45 2009 -0500
Give the FakePackages a pkgKey
diff --git a/test/testbase.py b/test/testbase.py
index d0ff1c3..9487441 100644
--- a/test/testbase.py
+++ b/test/testbase.py
@@ -72,6 +72,7 @@ class FakePackage(packages.YumAvailablePackage):
# Just a unique integer
self.id = self.__hash__()
+ self.pkgKey = self.__hash__()
def addProvides(self, name, flag=None, evr=(None, None, None)):
self.prco['provides'].append((name, flag, evr))
commit ed902c72ec317b1a4411b566423834aa41385788
Author: James Antill <james at and.org>
Date: Mon Feb 2 15:02:22 2009 -0500
Have the base returnPackages follow the patterns API guarantees
diff --git a/yum/packageSack.py b/yum/packageSack.py
index f3d2a4d..b95d1a7 100644
--- a/yum/packageSack.py
+++ b/yum/packageSack.py
@@ -23,6 +23,7 @@ import warnings
import re
import fnmatch
import misc
+from packages import parsePackages
class PackageSackBase(object):
"""Base class that provides the interface for PackageSacks."""
@@ -752,6 +753,10 @@ class PackageSack(PackageSackBase):
# nothing to return
pass
+ if patterns:
+ returnList = parsePackages(returnList, patterns, not ignore_case,
+ unique='repo-pkgkey')
+ returnList = returnList[0] + returnList[1]
return returnList
def returnNewestByNameArch(self, naTup=None,
commit 52f620ea4beb28716ddf3f535c465c0a56a8bb62
Author: James Antill <james at and.org>
Date: Mon Feb 2 14:46:43 2009 -0500
Run all 3 testKernelInstall tests
diff --git a/test/operationstests.py b/test/operationstests.py
index 12a1627..df52f9a 100644
--- a/test/operationstests.py
+++ b/test/operationstests.py
@@ -127,17 +127,17 @@ class KernelTests(OperationsTests):
pkgs.avail.append(FakePackage('kernel', '2.6.23.1', '42',arch='i686'))
pkgs.avail.append(FakePackage('kernel', '2.6.23.1', '42',arch='i586'))
- def testKernelInstall(self):
+ def testKernelInstall1(self):
p = self.pkgs
res, msg = self.runOperation(['install','kernel'], p.inst, p.avail)
self.assertResult(p.inst)
- def testKernelInstall(self):
+ def testKernelInstall2(self):
p = self.pkgs
res, msg = self.runOperation(['install','kernel-2.6.23.1-42'], p.inst, p.avail)
self.assertResult(p.inst + [ p.avail[4] ] )
- def testKernelInstall(self):
+ def testKernelInstall3(self):
p = self.pkgs
res, msg = self.runOperation(['install','kernel-2.6.23.8'], p.inst, p.avail)
self.assertResult(p.inst)
commit 05b3273e5910a19692fc39edff71780431471f94
Author: James Antill <james at and.org>
Date: Mon Feb 2 14:45:53 2009 -0500
Look at the arch properly for no reqPo in compare_providers
diff --git a/yum/depsolve.py b/yum/depsolve.py
index ff66b4b..c375fe0 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -1090,7 +1090,7 @@ class Depsolve(object):
if reqpo:
arches = (reqpo.arch, getBestArch())
else:
- arches = (getBestArch())
+ arches = (getBestArch(),)
for thisarch in arches:
res = _compare_arch_distance(po, nextpo, thisarch)
More information about the Yum-commits
mailing list