[yum-cvs] yum/packages.py
James Antill
james at linux.duke.edu
Wed Dec 12 02:53:10 UTC 2007
yum/packages.py | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
New commits:
commit 7fddc251cac67a447e38c54265dc859ec2082fa6
Author: James Antill <james at and.org>
Date: Tue Dec 11 21:51:41 2007 -0500
Revert "Make parsePackages() faster for common case"
This reverts commit 616141b3a263097a6a3efac8d331b471aa6f8e5b.
diff --git a/yum/packages.py b/yum/packages.py
index 207ef37..add3afd 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -92,26 +92,7 @@ def parsePackages(pkgs, usercommands, casematch=0):
return True
return False
- # If we can match on only the name, do so as it uses much less CPU/RAM
- # for the pkgdict. And most of the time poepl use: foo or foo*
- name_only_match = True
- for command in usercommands:
- if command[-1] == '*': # Can still match on name only, for prefix
- command = command[:-1]
- if contains(command, "*,[]{}?.-"):
- name_only_match = False
- break
-
- if not name_only_match:
- pkgdict = buildPkgRefDict(pkgs, bool(casematch))
- else:
- pkgdict = {}
- for pkg in pkgs:
- n = pkg.name
- if not casematch:
- n = n.lower()
- pkgdict.setdefault(n, []).append(pkg)
-
+ pkgdict = buildPkgRefDict(pkgs, bool(casematch))
exactmatch = []
matched = []
unmatched = []
More information about the Yum-cvs-commits
mailing list