diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-09-16 13:02:08 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-09-16 13:02:08 -0700 |
commit | db74640678f445f768922046bfe5d87c4822e249 (patch) | |
tree | 13ffcf83569c3301a0327a52eadd0242c46a1f3e | |
parent | portage.5: Add EAPI 5 profile IUSE injection (diff) | |
download | portage-db74640678f445f768922046bfe5d87c4822e249.tar.gz portage-db74640678f445f768922046bfe5d87c4822e249.tar.bz2 portage-db74640678f445f768922046bfe5d87c4822e249.zip |
repoman: reject "built" slot-operator atoms
-rw-r--r-- | pym/_emerge/Package.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py index 957d5d399..e10140f5c 100644 --- a/pym/_emerge/Package.py +++ b/pym/_emerge/Package.py @@ -12,6 +12,7 @@ from portage.dep import Atom, check_required_use, use_reduce, \ from portage.versions import _pkg_str, _unknown_repo from portage.eapi import _get_eapi_attrs from portage.exception import InvalidDependString +from portage.localization import _ from _emerge.Task import Task if sys.hexversion >= 0x3000000: @@ -197,11 +198,23 @@ class Package(Task): if not v: continue try: - validated_atoms.extend(use_reduce(v, eapi=dep_eapi, + atoms = use_reduce(v, eapi=dep_eapi, matchall=True, is_valid_flag=dep_valid_flag, - token_class=Atom, flat=True)) + token_class=Atom, flat=True) except InvalidDependString as e: self._metadata_exception(k, e) + else: + validated_atoms.extend(atoms) + if not self.built: + for atom in atoms: + if not isinstance(atom, Atom): + continue + if atom.slot_operator_built: + e = InvalidDependString( + _("Improper context for slot-operator " + "\"built\" atom syntax: %s") % + (atom.unevaluated_atom,)) + self._metadata_exception(k, e) self._validated_atoms = tuple(set(atom for atom in validated_atoms if isinstance(atom, Atom))) |