Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r10951 - main/trunk/pym/_emerge
Date: Sun, 06 Jul 2008 01:51:51 +0000

 1.1

Author: zmedico
Date: 2008-07-06 01:51:50 +0000 (Sun, 06 Jul 2008)
New Revision: 10951

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Add CompositeTask._final_exit() method and use it to fix breakage from the
previous commit.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2008-07-06 01:24:29 UTC (rev 10950)
+++ main/trunk/pym/_emerge/__init__.py	2008-07-06 01:51:50 UTC (rev 10951)
@@ -1552,6 +1552,19 @@
 			self._current_task = None
 		return task.returncode
 
+	def _final_exit(self, task):
+		"""
+		Assumes that task is the final task of this composite task.
+		Calls _default_exit() and sets self.returncode to the task's
+		returncode and sets self._current_task to None.
+
+		Subclasses can use this as a generic final task exit callback.
+
+		"""
+		self._default_exit(task)
+		self._current_task = None
+		self.returncode = task.returncode
+
 class TaskSequence(CompositeTask):
 	"""
 	A collection of tasks that executes sequentially. Each task
@@ -1585,6 +1598,8 @@
 		if self._default_exit(task) == os.EX_OK and \
 			self._task_queue:
 			self._start_next_task()
+		else:
+			self._final_exit(task)
 
 class SubProcess(AsynchronousTask):
 	__slots__ = ("pid",)
@@ -2022,7 +2037,7 @@
 				pkg=pkg, phase=phase, scheduler=scheduler,
 				settings=settings, tree=tree))
 
-		ebuild_phases.addExitListener(self._default_exit)
+		ebuild_phases.addExitListener(self._final_exit)
 		self._current_task = ebuild_phases
 		ebuild_phases.start()
 

-- 
gentoo-commits@g.o mailing list


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in dev-haskell/hmake: hmake-3.11.ebuild hmake-3.13.ebuild
Next by thread:
gentoo-x86 commit in sys-devel/gcc: ChangeLog gcc-4.3.1-r1.ebuild
Previous by date:
gentoo-x86 commit in dev-haskell/hmake: hmake-3.11.ebuild hmake-3.13.ebuild
Next by date:
gentoo-x86 commit in dev-lang/perl: ChangeLog


Oct 12, 2008

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.