summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-12-17 11:32:59 -0800
committerZac Medico <zmedico@gentoo.org>2011-12-17 11:32:59 -0800
commit36a6673199602796bf1626a4bd4110b99e590e5c (patch)
tree425c42ebe289ce12a98570eb9f22facba10dbd27 /pym
parentbbb61dae0317ddd49c7db550e87f5231d60fdb7e (diff)
downloadportage-36a6673199602796bf1626a4bd4110b99e590e5c.tar.gz
portage-36a6673199602796bf1626a4bd4110b99e590e5c.tar.bz2
portage-36a6673199602796bf1626a4bd4110b99e590e5c.zip
_show_unsatisfied_dep: avoid invalid, bug #394995
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/depgraph.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index e7307c00c..63365cd96 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2985,12 +2985,20 @@ class depgraph(object):
repo = metadata.get('repository')
pkg = self._pkg(cpv, pkg_type, root_config,
installed=installed, myrepo=repo)
- if not atom_set.findAtomForPackage(pkg,
- modified_use=self._pkg_use_enabled(pkg)):
- continue
# pkg.metadata contains calculated USE for ebuilds,
# required later for getMissingLicenses.
metadata = pkg.metadata
+ if pkg.invalid:
+ # Avoid doing any operations with packages that
+ # have invalid metadata. It would be unsafe at
+ # least because it could trigger unhandled
+ # exceptions in places like check_required_use().
+ masked_packages.append(
+ (root_config, pkgsettings, cpv, repo, metadata, mreasons))
+ continue
+ if not atom_set.findAtomForPackage(pkg,
+ modified_use=self._pkg_use_enabled(pkg)):
+ continue
if pkg in self._dynamic_config._runtime_pkg_mask:
backtrack_reasons = \
self._dynamic_config._runtime_pkg_mask[pkg]