Pass is_valid_flag to use_reduce if possible
authorSebastian Luther <SebastianLuther@gmx.de>
Mon, 16 Aug 2010 12:44:51 +0000 (14:44 +0200)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 12:47:04 +0000 (05:47 -0700)
pym/_emerge/Package.py
pym/_emerge/depgraph.py

index 0ac5b84c6c6f7b10410d73d9d5065a527e2e8b01..2941b273ddba08ec4fb1d7d9bb5196753ed42788 100644 (file)
@@ -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().
index 643cc3edfa996a88848758417af9a2ea1fe1bf43..01afa88c1701a78e9390879d018e5762962e20aa 100644 (file)
@@ -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