portage.dep.dep_check: Make sure we don't allow slot deps in EAPi-0 ebuilds
authorSebastian Luther <SebastianLuther@gmx.de>
Wed, 11 Aug 2010 10:29:35 +0000 (12:29 +0200)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Aug 2010 10:32:22 +0000 (03:32 -0700)
pym/portage/dep/dep_check.py
pym/portage/tests/resolver/test_eapi.py

index 691e1b50bd0c324b5da15ce33c3139cbaee374db..be24ad81a1ea48281e87b3b79882aa26447b540f 100644 (file)
@@ -8,7 +8,7 @@ import logging
 import portage
 from portage.dep import Atom, dep_opconvert, match_from_list, \
        remove_slot, use_reduce
-from portage.eapi import eapi_has_strong_blocks, eapi_has_use_deps
+from portage.eapi import eapi_has_strong_blocks, eapi_has_use_deps, eapi_has_slot_deps
 from portage.exception import InvalidAtom, InvalidDependString, ParseError
 from portage.localization import _
 from portage.util import writemsg, writemsg_level
@@ -72,6 +72,9 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                                if x.use and not eapi_has_use_deps(eapi):
                                        raise ParseError(
                                                _("invalid atom: '%s'") % (x,))
+                               if x.slot and not eapi_has_slot_deps(eapi):
+                                       raise ParseError(
+                                               _("invalid atom: '%s'") % (x,))
 
                if repoman:
                        x = x._eval_qa_conditionals(use_mask, use_force)
index d9f34f43e856fc6c9d718beecf04c9c1a06a41aa..a18b2c7c6d0cb6214d112d4afd3ffe1c6e8c087e 100644 (file)
@@ -60,7 +60,7 @@ class EAPITestCase(TestCase):
                                (["=dev-libs/A-1.3"], {}, None, True, ["dev-libs/A-1.3"]),
                                #~ (["=dev-libs/A-1.4"], {}, None, True, ["dev-libs/A-1.4"]),
 
-                               #~ (["=dev-libs/A-2.0"], {}, None, False, None),
+                               (["=dev-libs/A-2.0"], {}, None, False, None),
                                (["=dev-libs/A-2.1"], {}, None, True, ["dev-libs/B-1", "dev-libs/A-2.1"]),
                                (["=dev-libs/A-2.2"], {}, None, True, ["dev-libs/B-1", "dev-libs/A-2.2"]),
                                (["=dev-libs/A-2.3"], {}, None, True, ["dev-libs/B-1", "dev-libs/A-2.3"]),