On Wed, 2007-06-13 at 18:13 -0400, Jeremy Katz wrote:
> As we know, parsePackages() is kind of slow...  someone was doing a
> kickstart specifying 600(!) packages by name and so there were 600 calls
> to it.  We can be smarter and just use matchPackageNames() in
> YumBase.install
> 
> Might also be worth going through the other calls to parsePackages() and
> see what else we can cut out

This time with a non-zero-length patch  (thanks jantill!)

Jeremy
Index: yum/__init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.332
diff -u -u -r1.332 __init__.py
--- yum/__init__.py	10 Jun 2007 16:33:17 -0000	1.332
+++ yum/__init__.py	13 Jun 2007 22:13:23 -0000
@@ -1774,8 +1774,7 @@
                 raise Errors.InstallError, 'Nothing specified to install'
 
             if kwargs.has_key('pattern'):
-                exactmatch, matched, unmatched = \
-                    parsePackages(self.pkgSack.returnPackages(),[kwargs['pattern']] , casematch=1)
+                exactmatch, matched, unmatched = self.pkgSack.matchPackageNames([kwargs['pattern']])
                 pkgs.extend(exactmatch)
                 pkgs.extend(matched)
 
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to