Prevent premature expansion of old-style virtuals
authorZac Medico <zmedico@gentoo.org>
Fri, 26 Oct 2007 04:38:59 +0000 (04:38 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 26 Oct 2007 04:38:59 +0000 (04:38 -0000)
inside depgraph.select_files().

svn path=/main/trunk/; revision=8306

pym/_emerge/__init__.py

index 0d730b78399fd32b792fbea2d36f2916c7aeb929..17e130c223f0e325a0fbadb64a001b5b58b557ad 100644 (file)
@@ -1685,6 +1685,16 @@ class depgraph(object):
                                        portage.writemsg("!!! Please check ebuild(5) for full details.\n")
                                        portage.writemsg("!!! (Did you specify a version but forget to prefix with '='?)\n")
                                        return (0,[])
+                               # Don't expand categories or old-style virtuals here unless
+                               # necessary. Expansion of old-style virtuals here causes at
+                               # least the following problems:
+                               #   1) It's more difficult to determine which set(s) an atom
+                               #      came from, if any.
+                               #   2) It takes away freedom from the resolver to choose other
+                               #      possible expansions when necessary.
+                               if "/" in x:
+                                       arg_atoms.append((x, x))
+                                       continue
                                try:
                                        try:
                                                for db, pkg_type, built, installed, db_keys in dbs: