Atom.without_use: handle unevaluated_atom.use
authorZac Medico <zmedico@gentoo.org>
Thu, 16 Dec 2010 02:41:24 +0000 (18:41 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 16 Dec 2010 09:04:18 +0000 (01:04 -0800)
Atom.unevaluated_atom.use is used for IUSE checks when matching
packages, so it must not propagate to Atom.without_use.

pym/portage/dep/__init__.py

index 1f956e39bd594b56209ed384e7c0417dd41c8f69..52009fea3c09ea0de2bcea1382b8b9db354fdeb1 100644 (file)
@@ -1134,7 +1134,14 @@ class Atom(_atom_base):
                        without_use = Atom(m.group('without_use'), allow_repo=allow_repo)
                else:
                        use = None
-                       without_use = self
+                       if unevaluated_atom is not None and \
+                               unevaluated_atom.use is not None:
+                               # unevaluated_atom.use is used for IUSE checks when matching
+                               # packages, so it must not propagate to without_use
+                               without_use = Atom(s, allow_wildcard=allow_wildcard,
+                                       allow_repo=allow_repo)
+                       else:
+                               without_use = self
 
                self.__dict__['use'] = use
                self.__dict__['without_use'] = without_use