diff options
author | Sebastian Luther <SebastianLuther@gmx.de> | 2010-04-27 22:33:02 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-04-27 14:17:59 -0700 |
commit | fa25599654c32a6c72810fda98b9c665a673f12e (patch) | |
tree | 063b114c0396970070b1f82ec4148d2db90d707e | |
parent | dd512c0e119eb1e07053ec1bb349f044e465d44e (diff) | |
download | portage-fa25599654c32a6c72810fda98b9c665a673f12e.tar.gz portage-fa25599654c32a6c72810fda98b9c665a673f12e.tar.bz2 portage-fa25599654c32a6c72810fda98b9c665a673f12e.zip |
--update: don't ignore higher versions because of missing IUSE
-rw-r--r-- | pym/_emerge/depgraph.py | 13 | ||||
-rw-r--r-- | pym/portage/dbapi/__init__.py | 7 | ||||
-rw-r--r-- | pym/portage/package/ebuild/config.py | 5 |
3 files changed, 19 insertions, 6 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 65df15c55..4214abdfc 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2442,7 +2442,7 @@ class depgraph(object): if want_reinstall and matched_packages: continue - for pkg in self._iter_match_pkgs(root_config, pkg_type, atom, + for pkg in self._iter_match_pkgs(root_config, pkg_type, atom.without_use, onlydeps=onlydeps): if pkg in self._dynamic_config._runtime_pkg_mask: # The package has been masked by the backtracking logic @@ -2459,6 +2459,17 @@ class depgraph(object): if higher_version_rejected: continue + if atom.use: + for x in atom.use.required: + if x not in pkg.iuse.all and \ + pkg.root_config.settings.iuse_implicit_re.match(x) is None: + missing_iuse = True + break + if missing_iuse: + if not pkg.installed: + packages_with_invalid_use_config.append(pkg) + continue + cpv = pkg.cpv # Make --noreplace take precedence over --newuse. if not pkg.installed and noreplace and \ diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index c86616a95..f8fe89769 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -23,7 +23,6 @@ class dbapi(object): _category_re = re.compile(r'^\w[-.+\w]*$') _pkg_dir_name_re = re.compile(r'^\w[-+\w]*$') _categories = None - _iuse_implicit_re = None _use_mutable = False _known_keys = frozenset(x for x in auxdbkeys if not x.startswith("UNUSED_0")) @@ -146,10 +145,8 @@ class dbapi(object): 1) Check for required IUSE intersection (need implicit IUSE here). 2) Check enabled/disabled flag states. """ - if self._iuse_implicit_re is None: - self._iuse_implicit_re = re.compile("^(%s)$" % \ - "|".join(self.settings._get_implicit_iuse())) - iuse_implicit_re = self._iuse_implicit_re + + iuse_implicit_re = self.settings.iuse_implicit_re for cpv in cpv_iter: try: iuse, slot, use = self.aux_get(cpv, ["IUSE", "SLOT", "USE"]) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index a3998cc79..239eced4a 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -426,6 +426,8 @@ class config(object): self._license_groups = copy.deepcopy(clone._license_groups) self._accept_properties = copy.deepcopy(clone._accept_properties) self._ppropertiesdict = copy.deepcopy(clone._ppropertiesdict) + + self.iuse_implicit_re = clone.iuse_implicit_re else: def check_var_directory(varname, var): @@ -1011,6 +1013,9 @@ class config(object): _validate_cache_for_unsupported_eapis = False _glep_55_enabled = True + self.iuse_implicit_re = re.compile("^(%s)$" % \ + "|".join(self._get_implicit_iuse())) + for k in self._case_insensitive_vars: if k in self: self[k] = self[k].lower() |