Ensure that the code for bug #165382 only affects name collisions with virtuals....
authorZac Medico <zmedico@gentoo.org>
Mon, 5 Feb 2007 22:00:44 +0000 (22:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 5 Feb 2007 22:00:44 +0000 (22:00 -0000)
svn path=/main/branches/2.1.2/; revision=5901

pym/portage.py

index 5c4389c9ca98b3df125b25569d80b60a067ab412..f6dfdcf84792fbbc78f6978653ccde7ee4667613 100644 (file)
@@ -4435,6 +4435,7 @@ def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
                                if mydb.cp_list(x+"/"+myp,use_cache=use_cache):
                                        matches.append(x+"/"+myp)
                if len(matches) > 1:
+                       virtual_name_collision = False
                        if len(matches) == 2:
                                for x in matches:
                                        if not x.startswith("virtual/"):
@@ -4443,8 +4444,9 @@ def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
                                                # installed packages (during reverse blocker detection,
                                                # for example).
                                                mykey = x
-                                               break
-                       if mykey is None:
+                                       else:
+                                               virtual_name_collision = True
+                       if not virtual_name_collision:
                                raise ValueError, matches
                elif matches:
                        mykey=matches[0]