public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/_emerge/
Date: Sun, 16 Oct 2011 20:26:59 +0000 (UTC)	[thread overview]
Message-ID: <1272f5c55baa5c6d68d5ab3a1dceef69cc47e69b.zmedico@gentoo> (raw)

commit:     1272f5c55baa5c6d68d5ab3a1dceef69cc47e69b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 16 20:26:46 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Oct 16 20:26:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1272f5c5

EbuildMetadataPhase: avoid redundant EAPI parsing

---
 pym/_emerge/EbuildMetadataPhase.py |    6 ++++--
 pym/portage/dbapi/porttree.py      |    2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py
index 2fbd29e..06cabe7 100644
--- a/pym/_emerge/EbuildMetadataPhase.py
+++ b/pym/_emerge/EbuildMetadataPhase.py
@@ -20,7 +20,7 @@ class EbuildMetadataPhase(SubProcess):
 	used to extract metadata from the ebuild.
 	"""
 
-	__slots__ = ("cpv", "ebuild_hash", "fd_pipes", "metadata_callback",
+	__slots__ = ("cpv", "eapi", "ebuild_hash", "fd_pipes", "metadata_callback",
 		"metadata", "portdb", "repo_path", "settings") + \
 		("_raw_metadata",)
 
@@ -33,7 +33,9 @@ class EbuildMetadataPhase(SubProcess):
 		settings.setcpv(self.cpv)
 		ebuild_path = self.ebuild_hash.location
 
-		eapi = None
+		# the caller can pass in eapi in order to avoid
+		# redundant _parse_eapi_ebuild_head calls
+		eapi = self.eapi
 		if eapi is None and \
 			'parse-eapi-ebuild-head' in settings.features:
 			eapi = portage._parse_eapi_ebuild_head(

diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 13c27e9..0ade59a 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -528,7 +528,7 @@ class portdbapi(dbapi):
 				mydata = self._metadata_callback(
 					mycpv, mylocation, {'EAPI':eapi}, ebuild_hash)
 			else:
-				proc = EbuildMetadataPhase(cpv=mycpv,
+				proc = EbuildMetadataPhase(cpv=mycpv, eapi=eapi,
 					ebuild_hash=ebuild_hash,
 					metadata_callback=self._metadata_callback, portdb=self,
 					repo_path=mylocation,



             reply	other threads:[~2011-10-16 20:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-16 20:26 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-04-03 20:03 [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/_emerge/ Zac Medico
2015-08-30 23:44 Zac Medico
2014-11-20  4:08 Zac Medico
2014-02-24  9:23 Alexander Berntsen
2013-03-13  5:56 Zac Medico
2013-01-23 16:19 Zac Medico
2013-01-05 15:20 Zac Medico
2012-12-23  5:33 Arfrever Frehtes Taifersar Arahesis
2012-11-24 21:57 Zac Medico
2012-04-22 18:57 Zac Medico
2012-04-21  6:51 Zac Medico
2012-02-17 22:19 Zac Medico
2012-02-16  0:33 Zac Medico
2012-02-14 23:40 Zac Medico
2012-02-10  1:28 Zac Medico
2012-02-08  1:16 Zac Medico
2012-02-08  0:36 Zac Medico
2011-10-28  2:34 Zac Medico
2011-10-15  5:10 Zac Medico
2011-06-03 10:16 Zac Medico
2011-05-24  5:31 Zac Medico
2011-05-24  0:33 Zac Medico
2011-05-09  5:16 Zac Medico
2011-03-26  7:39 Zac Medico
2011-03-26  3:24 Zac Medico
2011-03-25  4:34 Zac Medico
2011-03-25  4:34 Zac Medico
2011-03-25  4:34 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272f5c55baa5c6d68d5ab3a1dceef69cc47e69b.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox