depgraph: fix case insensitive search for unsat
authorZac Medico <zmedico@gentoo.org>
Sun, 4 Dec 2011 23:43:36 +0000 (15:43 -0800)
committerZac Medico <zmedico@gentoo.org>
Sun, 4 Dec 2011 23:43:36 +0000 (15:43 -0800)
This fixes an interaction between the code from commits
9ce6da43ab90c4dab97ebf3b8339e5dbc113a0a8 and
cbe44d92ff13b8a22f5b4215b73078ce600c6bf4, so that we don't discard
matches that are identical except for differnces in upper/lower case.

pym/_emerge/depgraph.py

index 3bda89442f7e520ca533d7c4711a4f0512ba7787..57619e0980d9d93cec153d93c59952afbe365d7d 100644 (file)
@@ -3296,9 +3296,17 @@ class depgraph(object):
                                        for other_cp in list(all_cp):
                                                other_pkg = portage.catsplit(other_cp)[1]
                                                if other_pkg == pkg:
-                                                       # discard dir containing no ebuilds
-                                                       all_cp.discard(other_cp)
-                                                       continue
+                                                       # Check for non-identical package that
+                                                       # differs only by upper/lower case.
+                                                       identical = True
+                                                       for cp_orig in orig_cp_map[other_cp]:
+                                                               if cp_orig != cp:
+                                                                       identical = False
+                                                                       break
+                                                       if identical:
+                                                               # discard dir containing no ebuilds
+                                                               all_cp.discard(other_cp)
+                                                               continue
                                                pkg_to_cp.setdefault(other_pkg, set()).add(other_cp)
                                        pkg_matches = difflib.get_close_matches(pkg, pkg_to_cp)
                                        matches = []