1 |
Author: zmedico |
2 |
Date: 2008-05-09 01:49:28 +0000 (Fri, 09 May 2008) |
3 |
New Revision: 10255 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/bin/emerge |
7 |
Log: |
8 |
Optimize BlockerDB.findInstalledBlockers() so that it doesn't unnecessarily |
9 |
try to match packages against an empty set of blocker atoms. (trunk r10254) |
10 |
|
11 |
|
12 |
Modified: main/branches/2.1.2/bin/emerge |
13 |
=================================================================== |
14 |
--- main/branches/2.1.2/bin/emerge 2008-05-09 01:49:02 UTC (rev 10254) |
15 |
+++ main/branches/2.1.2/bin/emerge 2008-05-09 01:49:28 UTC (rev 10255) |
16 |
@@ -1750,13 +1750,14 @@ |
17 |
|
18 |
blocker_atoms = [atom[1:] for atom in atoms \ |
19 |
if atom.startswith("!")] |
20 |
- blocker_atoms = InternalPackageSet(initial_atoms=blocker_atoms) |
21 |
- for inst_pkg in installed_pkgs: |
22 |
- try: |
23 |
- blocker_atoms.iterAtomsForPackage(inst_pkg).next() |
24 |
- except (portage_exception.InvalidDependString, StopIteration): |
25 |
- continue |
26 |
- blocking_pkgs.add(inst_pkg) |
27 |
+ if blocker_atoms: |
28 |
+ blocker_atoms = InternalPackageSet(initial_atoms=blocker_atoms) |
29 |
+ for inst_pkg in installed_pkgs: |
30 |
+ try: |
31 |
+ blocker_atoms.iterAtomsForPackage(inst_pkg).next() |
32 |
+ except (portage_exception.InvalidDependString, StopIteration): |
33 |
+ continue |
34 |
+ blocking_pkgs.add(inst_pkg) |
35 |
|
36 |
return blocking_pkgs |
37 |
|
38 |
|
39 |
-- |
40 |
gentoo-commits@l.g.o mailing list |