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 1RKHeW-0006Dy-VT for garchives@archives.gentoo.org; Sat, 29 Oct 2011 22:45:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8A0D621C028; Sat, 29 Oct 2011 22:45:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 507ED21C028 for ; Sat, 29 Oct 2011 22:45:17 +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 B7F0564C5D for ; Sat, 29 Oct 2011 22:45:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1B80880042 for ; Sat, 29 Oct 2011 22:45:16 +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: Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: fea1962b7e8df9a8568b009a8f52b3c8ade67043 Date: Sat, 29 Oct 2011 22:45:16 +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: 3f1568e3bc22898eb41fcd16f582b9f8 commit: fea1962b7e8df9a8568b009a8f52b3c8ade67043 Author: Zac Medico gentoo org> AuthorDate: Sat Oct 29 22:43:35 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Oct 29 22:43:35 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dfea1962b action_metadata: clean up src entry validation This eliminates a bunch of redundant eclasses code that we handle with template.validate_entry() instead. --- pym/_emerge/actions.py | 44 ++++++++++--------------------------------= -- 1 files changed, 10 insertions(+), 34 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 036b471..7a1bcb5 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -1732,6 +1732,13 @@ def action_metadata(settings, portdb, myopts, port= trees=3DNone): continue ebuild_hash =3D hashed_path(ebuild_location) =20 + try: + if not tree_data.src_db.validate_entry(src, + ebuild_hash, tree_data.eclass_db): + continue + except CacheError: + continue + eapi =3D src.get('EAPI') if not eapi: eapi =3D '0' @@ -1758,6 +1765,9 @@ def action_metadata(settings, portdb, myopts, portt= rees=3DNone): =20 if src_chf !=3D dest_chf: # populate src entry with dest_chf_key + # (the validity of the dest_chf that we generate from the + # ebuild here relies on the fact that we already used + # validate_entry to validate the ebuild with src_chf) src[dest_chf_key] =3D dest_chf_getter(ebuild_hash) =20 if dest is not None: @@ -1781,40 +1791,6 @@ def action_metadata(settings, portdb, myopts, port= trees=3DNone): # so there's no need to overwrite it. continue =20 - try: - inherited =3D src.get('INHERITED', '') - eclasses =3D src.get('_eclasses_') - except CacheError: - continue - - if eclasses is not None: - if tree_data.eclass_db.validate_and_rewrite_cache( - src['_eclasses_'], tree_data.src_db.validation_chf, - tree_data.src_db.store_eclass_paths) is None: - continue - inherited =3D eclasses - else: - inherited =3D inherited.split() - - if tree_data.src_db.complete_eclass_entries and \ - eclasses is None: - continue - - if inherited: - # Even if _eclasses_ already exists, replace it with data from - # eclass_cache, in order to insert local eclass paths. - try: - eclasses =3D tree_data.eclass_db.get_eclass_data(inherited) - except KeyError: - # INHERITED contains a non-existent eclass. - continue - - if eclasses is None: - continue - src['_eclasses_'] =3D eclasses - else: - src['_eclasses_'] =3D {} - if not eapi_supported: src =3D { 'EAPI' : '-' + eapi,