diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-25 22:05:42 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-25 22:05:42 -0700 |
commit | ac72755e1671842352f9f38f3c868c2d123139cc (patch) | |
tree | c4fd635ad3ec8d8dbafb63a375510bca3cbec48b | |
parent | 5b92ff7df1da825be1daed6734ba65dd71c944e4 (diff) | |
download | portage-ac72755e1671842352f9f38f3c868c2d123139cc.tar.gz portage-ac72755e1671842352f9f38f3c868c2d123139cc.tar.bz2 portage-ac72755e1671842352f9f38f3c868c2d123139cc.zip |
Make _get_masking_status() return masking reasons for installed packages
with invalid metadata, and remove show_invalid_depstring_notice()
calls for installed packages since depgraph.display_problems() will
now show the invalid metadata masking reasons when it displays installed
packages that are masked.
-rw-r--r-- | pym/_emerge/depgraph.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index f933378aa..0dad451e2 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1050,8 +1050,7 @@ class depgraph(object): dep_string = portage.dep.use_reduce(dep_string, uselist=self._pkg_use_enabled(pkg)) except portage.exception.InvalidDependString as e: - # TODO: show in display_problems() - show_invalid_depstring_notice(pkg, dep_string, str(e)) + self._dynamic_config._masked_installed.add(pkg) del e continue @@ -1060,8 +1059,7 @@ class depgraph(object): pkg, dep_root, dep_priority, dep_string)) except portage.exception.InvalidDependString as e: if pkg.installed: - # TODO: show in display_problems() - show_invalid_depstring_notice(pkg, dep_string, str(e)) + self._dynamic_config._masked_installed.add(pkg) del e continue @@ -1120,8 +1118,7 @@ class depgraph(object): strict=strict, priority=dep_priority) except portage.exception.InvalidDependString as e: if pkg.installed: - # TODO: show in display_problems() - show_invalid_depstring_notice(pkg, dep_string, str(e)) + self._dynamic_config._masked_installed.add(pkg) return 1 # should have been masked before it was selected @@ -6138,11 +6135,6 @@ def _get_masking_status(pkg, pkgsettings, root_config, use=None): if not pkgsettings._accept_chost(pkg.cpv, pkg.metadata): mreasons.append(_MaskReason("CHOST", "CHOST: %s" % \ pkg.metadata["CHOST"])) - if pkg.invalid: - for msg_type, msgs in pkg.invalid.items(): - for msg in msgs: - mreasons.append( - _MaskReason("invalid", "invalid: %s" % (msg,))) if pkg.metadata["REQUIRED_USE"] and \ eapi_has_required_use(pkg.metadata["EAPI"]): @@ -6159,6 +6151,12 @@ def _get_masking_status(pkg, pkgsettings, root_config, use=None): msg = "violated use flag constraints: '%s'" % required_use mreasons.append(_MaskReason("REQUIRED_USE", "REQUIRED_USE violated")) + if pkg.invalid: + for msg_type, msgs in pkg.invalid.items(): + for msg in msgs: + mreasons.append( + _MaskReason("invalid", "invalid: %s" % (msg,))) + if not pkg.metadata["SLOT"]: mreasons.append( _MaskReason("invalid", "SLOT: undefined")) |