1 |
Author: zmedico |
2 |
Date: 2008-10-30 20:20:38 +0000 (Thu, 30 Oct 2008) |
3 |
New Revision: 11752 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Avoid unnecessary aux_get calls inside Scheduler._pkg() by getting the existing |
9 |
Package instance from the digraph. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/_emerge/__init__.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/_emerge/__init__.py 2008-10-30 19:54:19 UTC (rev 11751) |
15 |
+++ main/trunk/pym/_emerge/__init__.py 2008-10-30 20:20:38 UTC (rev 11752) |
16 |
@@ -10345,6 +10345,13 @@ |
17 |
if installed: |
18 |
operation = "nomerge" |
19 |
|
20 |
+ if self._digraph is not None: |
21 |
+ # Reuse existing instance when available. |
22 |
+ pkg = self._digraph.get( |
23 |
+ (type_name, root_config.root, cpv, operation)) |
24 |
+ if pkg is not None: |
25 |
+ return pkg |
26 |
+ |
27 |
tree_type = depgraph.pkg_tree_map[type_name] |
28 |
db = root_config.trees[tree_type].dbapi |
29 |
db_keys = list(self.trees[root_config.root][ |
30 |
@@ -10357,10 +10364,6 @@ |
31 |
settings.setcpv(pkg) |
32 |
pkg.metadata["USE"] = settings["PORTAGE_USE"] |
33 |
|
34 |
- if self._digraph is not None: |
35 |
- # Reuse existing instance when available. |
36 |
- pkg = self._digraph.get(pkg, pkg) |
37 |
- |
38 |
return pkg |
39 |
|
40 |
class MetadataRegen(PollScheduler): |