[yum-cvs] yum/yum __init__.py,1.331,1.332
James Bowes
jbowes at linux.duke.edu
Sun Jun 10 16:33:19 UTC 2007
Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv3154/yum
Modified Files:
__init__.py
Log Message:
Save 15% on "list all" commands.
Have "list all" only loop through the rpmdb once. Patch by James Antill.
Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.331
retrieving revision 1.332
diff -u -r1.331 -r1.332
--- __init__.py 7 Jun 2007 22:53:24 -0000 1.331
+++ __init__.py 10 Jun 2007 16:33:17 -0000 1.332
@@ -1016,17 +1016,18 @@
# list all packages - those installed and available, don't 'think about it'
if pkgnarrow == 'all':
+ dinst = {}
for po in self.rpmdb:
- installed.append(po)
+ dinst[po.pkgtup] = po;
+ installed = dinst.values()
if self.conf.showdupesfromrepos:
avail = self.pkgSack.returnPackages()
else:
avail = self.pkgSack.returnNewestByNameArch()
- self.rpmdb._make_header_dict()
for pkg in avail:
- if not self.rpmdb._header_dict.has_key(pkg.pkgtup):
+ if not dinst.has_key(pkg.pkgtup):
available.append(pkg)
# produce the updates list of tuples
More information about the Yum-cvs-commits
mailing list