summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-07-12 12:15:44 -0700
committerZac Medico <zmedico@gentoo.org>2011-07-12 12:15:44 -0700
commitf3429167e69a1da2a9c90ad8d62a0080710760a9 (patch)
treea6c23e42063a0f08e11467255d9afc1f0da907ac
parent197ab88070b624296a9779da827fc194df95c32e (diff)
downloadportage-f3429167e69a1da2a9c90ad8d62a0080710760a9.tar.gz
portage-f3429167e69a1da2a9c90ad8d62a0080710760a9.tar.bz2
portage-f3429167e69a1da2a9c90ad8d62a0080710760a9.zip
unmerge: reject USE conditionals in arguments
-rw-r--r--pym/_emerge/actions.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index e57fd9345..62dadeec2 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -2535,8 +2535,7 @@ def action_uninstall(settings, trees, ldpath_mtimes,
(ignore_missing_eq and is_valid_package_atom('=' + x)):
try:
- valid_atoms.append(
- dep_expand(x, mydb=vardb, settings=settings))
+ atom = dep_expand(x, mydb=vardb, settings=settings)
except portage.exception.AmbiguousPackageName as e:
msg = "The short ebuild name \"" + x + \
"\" is ambiguous. Please specify " + \
@@ -2550,6 +2549,17 @@ def action_uninstall(settings, trees, ldpath_mtimes,
level=logging.ERROR, noiselevel=-1)
writemsg_level("\n", level=logging.ERROR, noiselevel=-1)
return 1
+ else:
+ if atom.use and atom.use.conditional:
+ writemsg_level(
+ ("\n\n!!! '%s' contains a conditional " + \
+ "which is not allowed.\n") % (x,),
+ level=logging.ERROR, noiselevel=-1)
+ writemsg_level(
+ "!!! Please check ebuild(5) for full details.\n",
+ level=logging.ERROR)
+ return 1
+ valid_atoms.append(atom)
elif x.startswith(os.sep):
if not x.startswith(root):