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 1RFfdP-0000pv-No for garchives@archives.gentoo.org; Mon, 17 Oct 2011 05:21:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB7D521C024; Mon, 17 Oct 2011 05:21:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id ABD8521C024 for ; Mon, 17 Oct 2011 05:21:03 +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 1F2991B404C for ; Mon, 17 Oct 2011 05:21:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3A2B380042 for ; Mon, 17 Oct 2011 05:21:02 +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: <7ddb7d3068f53025e064e5f23bcfaf068401b9bd.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/porttree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 7ddb7d3068f53025e064e5f23bcfaf068401b9bd Date: Mon, 17 Oct 2011 05:21:02 +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: bcb6bbd262424c2dfaa6ec7bf30b343a commit: 7ddb7d3068f53025e064e5f23bcfaf068401b9bd Author: Zac Medico gentoo org> AuthorDate: Mon Oct 17 05:20:10 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Oct 17 05:20:10 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D7ddb7d30 portdbapi.aux_get: remove redunant EAPI code This code only needs to exist in _metadata_callback. --- pym/portage/dbapi/porttree.py | 19 ++++++++----------- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.p= y index a0b7d7e..6ad7a6b 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -405,8 +405,11 @@ class portdbapi(dbapi): eapi =3D "0" metadata["EAPI"] =3D eapi if not eapi_is_supported(eapi): - for k in set(metadata).difference(("_mtime_", "_eclasses_")): - metadata[k] =3D "" + keys =3D set(metadata) + keys.discard('_eclasses_') + keys.discard('_mtime_') + keys.discard('_%s_' % chf) + metadata.update((k, '') for k in keys) metadata["EAPI"] =3D "-" + eapi.lstrip("-") =20 if cache is not None: @@ -455,6 +458,7 @@ class portdbapi(dbapi): eapi =3D metadata.get('EAPI', '').strip() if not eapi: eapi =3D '0' + metadata['EAPI'] =3D eapi if eapi[:1] =3D=3D '-' and eapi_is_supported(eapi[1:]): continue if auxdb.validate_entry(metadata, ebuild_hash, eclass_db): @@ -544,21 +548,14 @@ class portdbapi(dbapi): =20 mydata =3D proc.metadata =20 - # do we have a origin repository name for the current package mydata["repository"] =3D self.repositories.get_name_for_location(myloc= ation) - mydata["INHERITED"] =3D ' '.join(mydata.get("_eclasses_", [])) mydata["_mtime_"] =3D ebuild_hash.mtime - eapi =3D mydata.get("EAPI") if not eapi: eapi =3D "0" mydata["EAPI"] =3D eapi - if not eapi_is_supported(eapi): - keys =3D set(mydata) - keys.discard("_eclasses_") - keys.discard("_mtime_") - mydata.update((k, '') for k in keys) - mydata["EAPI"] =3D "-" + eapi.lstrip("-") + if eapi_is_supported(eapi): + mydata["INHERITED"] =3D " ".join(mydata.get("_eclasses_", [])) =20 #finally, we look at our internal cache entry and return the requested= data. returnme =3D [mydata.get(x, "") for x in mylist]