From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-409884-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Rc00b-0000Cs-3h
	for garchives@archives.gentoo.org; Sat, 17 Dec 2011 19:33:25 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DD4EA21C118;
	Sat, 17 Dec 2011 19:33:15 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id B094221C118
	for <gentoo-commits@lists.gentoo.org>; Sat, 17 Dec 2011 19:33:15 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 338C31B4006
	for <gentoo-commits@lists.gentoo.org>; Sat, 17 Dec 2011 19:33:15 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 742848004A
	for <gentoo-commits@lists.gentoo.org>; Sat, 17 Dec 2011 19:33:14 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <36a6673199602796bf1626a4bd4110b99e590e5c.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/
X-VCS-Repository: proj/portage
X-VCS-Files: pym/_emerge/depgraph.py
X-VCS-Directories: pym/_emerge/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: 36a6673199602796bf1626a4bd4110b99e590e5c
Date: Sat, 17 Dec 2011 19:33:14 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: b858d624-84d5-4089-bd64-1a215aa5ccdc
X-Archives-Hash: 6239feac3b4a57622a10478a13a26a8b

commit:     36a6673199602796bf1626a4bd4110b99e590e5c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 17 19:32:59 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 17 19:32:59 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3D36a66731

_show_unsatisfied_dep: avoid invalid, bug #394995

---
 pym/_emerge/depgraph.py |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index e7307c0..63365cd 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2985,12 +2985,20 @@ class depgraph(object):
 							repo =3D metadata.get('repository')
 						pkg =3D self._pkg(cpv, pkg_type, root_config,
 							installed=3Dinstalled, myrepo=3Drepo)
-						if not atom_set.findAtomForPackage(pkg,
-							modified_use=3Dself._pkg_use_enabled(pkg)):
-							continue
 						# pkg.metadata contains calculated USE for ebuilds,
 						# required later for getMissingLicenses.
 						metadata =3D 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=3Dself._pkg_use_enabled(pkg)):
+							continue
 						if pkg in self._dynamic_config._runtime_pkg_mask:
 							backtrack_reasons =3D \
 								self._dynamic_config._runtime_pkg_mask[pkg]