depgraph: reject USE conditionals in arguments
authorZac Medico <zmedico@gentoo.org>
Sun, 10 Jul 2011 03:24:49 +0000 (20:24 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 10 Jul 2011 03:24:49 +0000 (20:24 -0700)
pym/_emerge/depgraph.py

index 64ed50e2770929998daec20e06823568346c65f8..2a5848ce7c5918a1b21c37f5996081f9e68533b8 100644 (file)
@@ -2082,6 +2082,14 @@ class depgraph(object):
                                        else:
                                                atom = null_atom
 
+                               if atom.use and atom.use.conditional:
+                                       writemsg(
+                                               ("\n\n!!! '%s' contains a conditional " + \
+                                               "which is not allowed.\n") % (x,), noiselevel=-1)
+                                       writemsg("!!! Please check ebuild(5) for full details.\n")
+                                       self._dynamic_config._skip_restart = True
+                                       return (0,[])
+
                                args.append(AtomArg(arg=x, atom=atom,
                                        root_config=root_config))