public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico (zmedico)" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] portage r10848 - in main/trunk/pym: _emerge portage
Date: Sun, 29 Jun 2008 09:38:17 +0000	[thread overview]
Message-ID: <E1KCtMP-0004w9-GX@stork.gentoo.org> (raw)

Author: zmedico
Date: 2008-06-29 09:38:16 +0000 (Sun, 29 Jun 2008)
New Revision: 10848

Modified:
   main/trunk/pym/_emerge/__init__.py
   main/trunk/pym/portage/__init__.py
Log:
In EbuildBuild.execute(), call doebuild() separately for each phase since
it will be easier to add asynchronous support to doebuild() if it's called
this way.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2008-06-29 08:50:36 UTC (rev 10847)
+++ main/trunk/pym/_emerge/__init__.py	2008-06-29 09:38:16 UTC (rev 10848)
@@ -1529,6 +1529,8 @@
 	"""
 	__slots__ = ("pkg", "settings")
 
+	_phases = ("setup", "unpack", "compile", "test", "install")
+
 	def _get_hash_key(self):
 		hash_key = getattr(self, "_hash_key", None)
 		if hash_key is None:
@@ -1547,10 +1549,13 @@
 		if retval != os.EX_OK:
 			return retval
 
-		retval = portage.doebuild(ebuild_path, "install",
-			root_config.root, self.settings, debug,
-			mydbapi=portdb, tree="porttree")
-		return retval
+		for mydo in self._phases:
+			retval = portage.doebuild(ebuild_path, mydo,
+				root_config.root, self.settings, debug,
+				mydbapi=portdb, tree="porttree")
+			if retval != os.EX_OK:
+				return retval
+		return os.EX_OK
 
 class EbuildBinpkg(Task):
 	"""

Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py	2008-06-29 08:50:36 UTC (rev 10847)
+++ main/trunk/pym/portage/__init__.py	2008-06-29 09:38:16 UTC (rev 10848)
@@ -4161,7 +4161,8 @@
 
 # parse actionmap to spawn ebuild with the appropriate args
 def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None):
-	if alwaysdep or "noauto" not in mysettings.features:
+	if "EMERGE_FROM" not in mysettings and \
+		(alwaysdep or "noauto" not in mysettings.features):
 		# process dependency first
 		if "dep" in actionmap[mydo]:
 			retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile)
@@ -5298,7 +5299,8 @@
 		# unpack compile install`, we will try and fetch 4 times :/
 		need_distfiles = (mydo in ("fetch", "unpack") or \
 			mydo not in ("digest", "manifest") and "noauto" not in features)
-		if need_distfiles and not fetch(
+		if not ("EMERGE_FROM" in mysettings and mydo != "unpack") and \
+			need_distfiles and not fetch(
 			fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
 			if have_build_dirs:
 				# Create an elog message for this fetch failure since the
@@ -5330,10 +5332,8 @@
 				return 1
 
 		# See above comment about fetching only when needed
-		if not digestcheck(checkme, mysettings, ("strict" in features),
-			(mydo not in ["digest","fetch","unpack"] and \
-			mysettings.get("PORTAGE_CALLER", None) == "ebuild" and \
-			"noauto" in features)):
+		if not ("EMERGE_FROM" in mysettings and mydo != "unpack") and \
+			not digestcheck(checkme, mysettings, "strict" in features):
 			return 1
 
 		if mydo == "fetch":

-- 
gentoo-commits@lists.gentoo.org mailing list



                 reply	other threads:[~2008-06-29  9:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1KCtMP-0004w9-GX@stork.gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@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