From: Sebastian Luther Date: Mon, 16 Aug 2010 12:44:51 +0000 (+0200) Subject: Pass is_valid_flag to use_reduce if possible X-Git-Tag: v2.2_rc68~159 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d0599abd69e2d32da12dbc3f5e949dea8fe685eb;p=portage.git Pass is_valid_flag to use_reduce if possible --- diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py index 0ac5b84c6..2941b273d 100644 --- a/pym/_emerge/Package.py +++ b/pym/_emerge/Package.py @@ -319,7 +319,8 @@ class _PackageMetadataWrapper(_PackageMetadataWrapperBase): if k in self._use_conditional_keys: if self._pkg.root_config.settings.local_config and '?' in v: try: - v = paren_enclose(use_reduce(v, uselist=self._pkg.use.enabled)) + v = paren_enclose(use_reduce(v, uselist=self._pkg.use.enabled, \ + is_valid_flag=self._pkg.iuse.is_valid_flag)) except portage.exception.InvalidDependString: # This error should already have been registered via # self._pkg._invalid_metadata(). diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 643cc3edf..01afa88c1 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1037,7 +1037,7 @@ class depgraph(object): try: dep_string = portage.dep.use_reduce(dep_string, - uselist=self._pkg_use_enabled(pkg)) + uselist=self._pkg_use_enabled(pkg), is_valid_flag=pkg.iuse.is_valid_flag) dep_string = list(self._queue_disjunctive_deps( pkg, dep_root, dep_priority, dep_string)) @@ -2454,8 +2454,8 @@ class depgraph(object): for key in "DEPEND", "RDEPEND", "PDEPEND", "LICENSE": dep = pkg.metadata[key] - old_val = set(portage.dep.use_reduce(dep, pkg.use.enabled)) - new_val = set(portage.dep.use_reduce(dep, new_use)) + old_val = set(portage.dep.use_reduce(dep, pkg.use.enabled, is_valid_flag=pkg.iuse.is_valid_flag)) + new_val = set(portage.dep.use_reduce(dep, new_use, is_valid_flag=pkg.iuse.is_valid_flag)) if old_val != new_val: return True