[yum-git] Branch 'yum-3_2_X' - yum/sqlitesack.py
James Antill
james at linux.duke.edu
Mon Aug 18 21:17:45 UTC 2008
yum/sqlitesack.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 98d334d04c6fd4366aab22b4f63f016602e0b296
Author: James Antill <james at and.org>
Date: Mon Aug 18 17:17:35 2008 -0400
Really do the API compat. fix for excludeArchs() now, not just make it work
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index 1dd5ac3..8813005 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -281,7 +281,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
'requires' : { },
}
self._key2pkg = {}
- self._arch_allowed = set()
+ self._arch_allowed = None
@catchSqliteException
def _sql_MD(self, MD, repo, sql, *args):
@@ -392,7 +392,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
def _pkgArchExcluded(self, pkgarch):
""" Test the arch for a package against the archlist we were passed. """
- if pkgarch not in self._arch_allowed:
+ if self._arch_allowed is not None and pkgarch not in self._arch_allowed:
return True
return False
@@ -1199,8 +1199,11 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
@catchSqliteException
def excludeArchs(self, archlist):
"""excludes incompatible arches - archlist is a list of compat arches"""
-
- self._arch_allowed.update(archlist)
+
+ if self._arch_allowed is None:
+ self._arch_allowed = set(archlist)
+ else:
+ self._arch_allowed = self._arch_allowed.intersection(archlist)
sarchlist = map(lambda x: "'%s'" % x , archlist)
arch_query = ",".join(sarchlist)
More information about the Yum-cvs-commits
mailing list