Repoman only checks IUSE for USE deps, so don't evaluate conditional USE deps
authorZac Medico <zmedico@gentoo.org>
Tue, 27 May 2008 05:42:28 +0000 (05:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 27 May 2008 05:42:28 +0000 (05:42 -0000)
in this case.

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

pym/portage/__init__.py

index d9021a466425cba84fce52d0d0cd685ff9e926aa..1ff6f25b8202dab5b6a7d9b5182424de50adecf0 100644 (file)
@@ -5410,6 +5410,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
        # for new-style virtuals.  Repoman should enforce this.
        dep_keys = ["RDEPEND", "DEPEND", "PDEPEND"]
        portdb = trees[myroot]["porttree"].dbapi
+       repoman = isinstance(mydbapi, portdbapi)
        if kwargs["use_binaries"]:
                portdb = trees[myroot]["bintree"].dbapi
        myvirtuals = mysettings.getvirtuals()
@@ -5431,7 +5432,10 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                                        raise portage.exception.ParseError(
                                                "invalid atom: '%s'" % x)
 
-               if isinstance(x, portage.dep.Atom) and x.use:
+               # Repoman only checks IUSE for USE deps, so there's
+               # no need to evaluate conditionals.
+               if not repoman and \
+                       myuse is not None and isinstance(x, portage.dep.Atom) and x.use:
                        if x.use.conditional:
                                evaluated_atom = portage.dep.remove_slot(x)
                                if x.slot: