From 36a6673199602796bf1626a4bd4110b99e590e5c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 17 Dec 2011 11:32:59 -0800 Subject: [PATCH] _show_unsatisfied_dep: avoid invalid, bug #394995 --- pym/_emerge/depgraph.py | 14 +++++++++++--- 1 file 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] -- 2.26.2