summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/Package.py5
-rw-r--r--pym/portage/tests/resolver/test_eapi.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 58c453ff9..992851bb1 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -8,6 +8,7 @@ import portage
from portage.cache.mappings import slot_dict_class
from portage.dep import isvalidatom, use_reduce, \
paren_enclose, _slot_re
+from portage.eapi import eapi_has_iuse_defaults
from _emerge.Task import Task
if sys.hexversion >= 0x3000000:
@@ -47,6 +48,10 @@ class Package(Task):
# Avoid an InvalidAtom exception when creating slot_atom.
# This package instance will be masked due to empty SLOT.
slot = '0'
+ if (self.iuse.enabled or self.iuse.enabled) and \
+ not eapi_has_iuse_defaults(self.metadata["EAPI"]):
+ self._invalid_metadata('IUSE.invalid',
+ "IUSE contains defaults, but EAPI doesn't allow them")
self.slot_atom = portage.dep.Atom("%s:%s" % (self.cp, slot))
self.category, self.pf = portage.catsplit(self.cpv)
self.cpv_split = portage.catpkgsplit(self.cpv)
diff --git a/pym/portage/tests/resolver/test_eapi.py b/pym/portage/tests/resolver/test_eapi.py
index a18b2c7c6..94cdd4a99 100644
--- a/pym/portage/tests/resolver/test_eapi.py
+++ b/pym/portage/tests/resolver/test_eapi.py
@@ -54,7 +54,7 @@ class EAPITestCase(TestCase):
}
requests = (
- #~ (["=dev-libs/A-1.0"], {}, None, False, None),
+ (["=dev-libs/A-1.0"], {}, None, False, None),
(["=dev-libs/A-1.1"], {}, None, True, ["dev-libs/A-1.1"]),
(["=dev-libs/A-1.2"], {}, None, True, ["dev-libs/A-1.2"]),
(["=dev-libs/A-1.3"], {}, None, True, ["dev-libs/A-1.3"]),