iuse_implicit_match = self.settings._iuse_effective_match
else:
iuse_implicit_match = self.settings._iuse_implicit_match
- iuse = frozenset(x.lstrip('+-') for x in metadata["IUSE"].split())
+ usealiases = self.settings._use_manager.getUseAliases(self._pkg_str(cpv, metadata["repository"]))
+ iuse = Package._iuse(None, metadata["IUSE"].split(), iuse_implicit_match, usealiases, metadata["EAPI"])
for x in atom.unevaluated_atom.use.required:
- if x not in iuse and not iuse_implicit_match(x):
+ if iuse.get_real_flag(x) is None:
return False
if atom.use is None:
# data corruption). The enabled flags must be consistent
# with implicit IUSE, in order to avoid potential
# inconsistencies in USE dep matching (see bug #453400).
- use = frozenset(x for x in metadata["USE"].split()
- if x in iuse or iuse_implicit_match(x))
- missing_enabled = frozenset(x for x in
- atom.use.missing_enabled if not
- (x in iuse or iuse_implicit_match(x)))
- missing_disabled = frozenset(x for x in
- atom.use.missing_disabled if not
- (x in iuse or iuse_implicit_match(x)))
-
- if atom.use.enabled:
- if any(x in atom.use.enabled for x in missing_disabled):
+ use = frozenset(x for x in metadata["USE"].split() if iuse.get_real_flag(x) is not None)
+ missing_enabled = frozenset(x for x in atom.use.missing_enabled if iuse.get_real_flag(x) is None)
+ missing_disabled = frozenset(x for x in atom.use.missing_disabled if iuse.get_real_flag(x) is None)
+ enabled = frozenset((iuse.get_real_flag(x) or x) for x in atom.use.enabled)
+ disabled = frozenset((iuse.get_real_flag(x) or x) for x in atom.use.disabled)
+
+ if enabled:
+ if any(x in enabled for x in missing_disabled):
return False
- need_enabled = atom.use.enabled.difference(use)
+ need_enabled = enabled.difference(use)
if need_enabled:
if any(x not in missing_enabled for x in need_enabled):
return False
- if atom.use.disabled:
- if any(x in atom.use.disabled for x in missing_enabled):
+ if disabled:
+ if any(x in disabled for x in missing_enabled):
return False
- need_disabled = atom.use.disabled.intersection(use)
+ need_disabled = disabled.intersection(use)
if need_disabled:
if any(x not in missing_disabled for x in need_disabled):
return False
# Check unsatisfied use-default deps
if atom.use.enabled:
- missing_disabled = frozenset(x for x in
- atom.use.missing_disabled if not
- (x in iuse or iuse_implicit_match(x)))
+ missing_disabled = frozenset(x for x in atom.use.missing_disabled if iuse.get_real_flag(x) is None)
if any(x in atom.use.enabled for x in missing_disabled):
return False
if atom.use.disabled:
- missing_enabled = frozenset(x for x in
- atom.use.missing_enabled if not
- (x in iuse or iuse_implicit_match(x)))
+ missing_enabled = frozenset(x for x in atom.use.missing_enabled if iuse.get_real_flag(x) is None)
if any(x in atom.use.disabled for x in missing_enabled):
return False