1 |
Author: zmedico |
2 |
Date: 2009-04-30 06:48:06 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 13427 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Inside depgraph.validate_blockers(), prevent false positives in PROVIDE |
9 |
virtual blocker matches that can occur for packages for packages that don't |
10 |
actual have the appropriate value in PROVIDE (triggered by profile 'virtuals' |
11 |
settings). Thanks to Ned Ludd <solar@g.o> for reporting. (trunk r13248) |
12 |
|
13 |
Modified: main/branches/2.1.6/pym/_emerge/__init__.py |
14 |
=================================================================== |
15 |
--- main/branches/2.1.6/pym/_emerge/__init__.py 2009-04-30 06:47:55 UTC (rev 13426) |
16 |
+++ main/branches/2.1.6/pym/_emerge/__init__.py 2009-04-30 06:48:06 UTC (rev 13427) |
17 |
@@ -6738,10 +6738,15 @@ |
18 |
final_db = self.mydbapi[myroot] |
19 |
|
20 |
provider_virtual = False |
21 |
- if blocker.cp in virtuals and \ |
22 |
+ if blocker.cp.startswith('virtual/') and \ |
23 |
not self._have_new_virt(blocker.root, blocker.cp): |
24 |
provider_virtual = True |
25 |
|
26 |
+ # Use this to check PROVIDE for each matched package |
27 |
+ # when necessary. |
28 |
+ atom_set = InternalPackageSet( |
29 |
+ initial_atoms=[blocker.atom]) |
30 |
+ |
31 |
if provider_virtual: |
32 |
atoms = [] |
33 |
for provider_entry in virtuals[blocker.cp]: |
34 |
@@ -6752,13 +6757,17 @@ |
35 |
else: |
36 |
atoms = [blocker.atom] |
37 |
|
38 |
- blocked_initial = [] |
39 |
+ blocked_initial = set() |
40 |
for atom in atoms: |
41 |
- blocked_initial.extend(initial_db.match_pkgs(atom)) |
42 |
+ for pkg in initial_db.match_pkgs(atom): |
43 |
+ if atom_set.findAtomForPackage(pkg): |
44 |
+ blocked_initial.add(pkg) |
45 |
|
46 |
- blocked_final = [] |
47 |
+ blocked_final = set() |
48 |
for atom in atoms: |
49 |
- blocked_final.extend(final_db.match_pkgs(atom)) |
50 |
+ for pkg in final_db.match_pkgs(atom): |
51 |
+ if atom_set.findAtomForPackage(pkg): |
52 |
+ blocked_final.add(pkg) |
53 |
|
54 |
if not blocked_initial and not blocked_final: |
55 |
parent_pkgs = self._blocker_parents.parent_nodes(blocker) |