[yum-git] yum/sqlitesack.py
James Antill
james at linux.duke.edu
Wed Jan 23 17:19:56 UTC 2008
yum/sqlitesack.py | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit a9e4a62110d237224a2fa5c498117f9154d12eea
Author: James Antill <james at and.org>
Date: Wed Jan 23 12:19:53 2008 -0500
Skip loading packages for unused repos
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index d8ef478..405d2c6 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -856,6 +856,15 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
"""Returns a list of packages, only containing nevra information. The
packages are processed for excludes. """
+ # Skip unused repos completely, Eg. *-source
+ skip_all = True
+ for repo in self.added:
+ if repo not in self._all_excludes:
+ skip_all = False
+
+ if skip_all:
+ return []
+
returnList = []
if not hasattr(self, 'pkgobjlist'):
self._buildPkgObjList(repoid)
More information about the Yum-cvs-commits
mailing list