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 ) id 1QUf46-0008QH-No for garchives@archives.gentoo.org; Thu, 09 Jun 2011 13:14:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EFFDA1C03D; Thu, 9 Jun 2011 13:14:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BBAB51C03D for ; Thu, 9 Jun 2011 13:14:16 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 57CFF1B4024 for ; Thu, 9 Jun 2011 13:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BE1928003E for ; Thu, 9 Jun 2011 13:14:15 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1f2d8bc9960221a9a04df57d21a54c868bb95b05.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/getmaskingreason.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 1f2d8bc9960221a9a04df57d21a54c868bb95b05 Date: Thu, 9 Jun 2011 13:14:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 290c33d698359dd58d564111dd5d1bc2 commit: 1f2d8bc9960221a9a04df57d21a54c868bb95b05 Author: Zac Medico gentoo org> AuthorDate: Thu Jun 9 13:13:32 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Jun 9 13:13:55 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D1f2d8bc9 getmaskingreason: EAPI metadata safety Return early since otherwise we might produce invalid results given that the EAPI is not supported. --- pym/portage/package/ebuild/getmaskingreason.py | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage= /package/ebuild/getmaskingreason.py index f027876..f2af638 100644 --- a/pym/portage/package/ebuild/getmaskingreason.py +++ b/pym/portage/package/ebuild/getmaskingreason.py @@ -47,6 +47,17 @@ def getmaskingreason(mycpv, metadata=3DNone, settings=3D= None, if myrepo is not None: myrepo =3D _gen_valid_repo(metadata["repository"]) =20 + if metadata is not None and \ + not portage.eapi_is_supported(metadata["EAPI"]): + # Return early since otherwise we might produce invalid + # results given that the EAPI is not supported. Also, + # metadata is mostly useless in this case since it doesn't + # contain essential things like SLOT. + if return_location: + return (None, None) + else: + return None + # Sometimes we can't access SLOT or repository due to corruption. pkg =3D mycpv if metadata is not None: