1 |
commit: 3faeebbed6a3613d501c6892e3b6b03d9779fd22 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 4 23:43:36 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 4 23:43:36 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3faeebbe |
7 |
|
8 |
depgraph: fix case insensitive search for unsat |
9 |
|
10 |
This fixes an interaction between the code from commits |
11 |
9ce6da43ab90c4dab97ebf3b8339e5dbc113a0a8 and |
12 |
cbe44d92ff13b8a22f5b4215b73078ce600c6bf4, so that we don't discard |
13 |
matches that are identical except for differnces in upper/lower case. |
14 |
|
15 |
--- |
16 |
pym/_emerge/depgraph.py | 14 +++++++++++--- |
17 |
1 files changed, 11 insertions(+), 3 deletions(-) |
18 |
|
19 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
20 |
index 3bda894..57619e0 100644 |
21 |
--- a/pym/_emerge/depgraph.py |
22 |
+++ b/pym/_emerge/depgraph.py |
23 |
@@ -3296,9 +3296,17 @@ class depgraph(object): |
24 |
for other_cp in list(all_cp): |
25 |
other_pkg = portage.catsplit(other_cp)[1] |
26 |
if other_pkg == pkg: |
27 |
- # discard dir containing no ebuilds |
28 |
- all_cp.discard(other_cp) |
29 |
- continue |
30 |
+ # Check for non-identical package that |
31 |
+ # differs only by upper/lower case. |
32 |
+ identical = True |
33 |
+ for cp_orig in orig_cp_map[other_cp]: |
34 |
+ if cp_orig != cp: |
35 |
+ identical = False |
36 |
+ break |
37 |
+ if identical: |
38 |
+ # discard dir containing no ebuilds |
39 |
+ all_cp.discard(other_cp) |
40 |
+ continue |
41 |
pkg_to_cp.setdefault(other_pkg, set()).add(other_cp) |
42 |
pkg_matches = difflib.get_close_matches(pkg, pkg_to_cp) |
43 |
matches = [] |