summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-20 03:18:59 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-20 03:18:59 +0000
commitd3bd321b554cbc13fb78a797e5fc2a96e282267a (patch)
tree80af56744aa3af857a7f02255fe5d1c4f903db60
parent27d6e837d1ce90a8ed56adbffa7ce5baf2dd4e35 (diff)
downloadportage-d3bd321b554cbc13fb78a797e5fc2a96e282267a.tar.gz
portage-d3bd321b554cbc13fb78a797e5fc2a96e282267a.tar.bz2
portage-d3bd321b554cbc13fb78a797e5fc2a96e282267a.zip
Make dblink call back to the scheduler for "clean" and "cleanrm" phases, to
handle output redirection. Thanks to Arfrever for reporting. svn path=/main/trunk/; revision=11441
-rw-r--r--pym/_emerge/__init__.py2
-rw-r--r--pym/portage/dbapi/vartree.py23
2 files changed, 18 insertions, 7 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 411f0a16e..026395c02 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2790,7 +2790,7 @@ class EbuildProcess(SpawnProcess):
def _set_returncode(self, wait_retval):
SpawnProcess._set_returncode(self, wait_retval)
- if self.phase != "clean":
+ if self.phase not in ("clean", "cleanrm"):
self.returncode = portage._doebuild_exit_status_check_and_log(
self.settings, self.phase, self.returncode)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index cef86a284..0abe96846 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1925,10 +1925,15 @@ class dblink(object):
# process logs created during pre/postrm
elog_process(self.mycpv, self.settings, phasefilter=filter_unmergephases)
if retval == os.EX_OK:
- doebuild(myebuildpath, "cleanrm", self.myroot,
- self.settings, tree="vartree",
- mydbapi=self.vartree.dbapi,
- vartree=self.vartree)
+ if scheduler is None:
+ doebuild(myebuildpath, "cleanrm", self.myroot,
+ self.settings, tree="vartree",
+ mydbapi=self.vartree.dbapi,
+ vartree=self.vartree)
+ else:
+ scheduler.dblinkEbuildPhase(
+ self, self.vartree.dbapi,
+ myebuildpath, "cleanrm")
finally:
unlockdir(builddir_lock)
try:
@@ -3402,8 +3407,14 @@ class dblink(object):
if retval == os.EX_OK and "noclean" not in self.settings.features:
if myebuild is None:
myebuild = os.path.join(inforoot, self.pkg + ".ebuild")
- doebuild(myebuild, "clean", myroot, self.settings,
- tree=self.treetype, mydbapi=mydbapi, vartree=self.vartree)
+
+ if self._scheduler is None:
+ doebuild(myebuild, "clean", myroot,
+ self.settings, tree=self.treetype,
+ mydbapi=mydbapi, vartree=self.vartree)
+ else:
+ self._scheduler.dblinkEbuildPhase(
+ self, mydbapi, myebuild, "clean")
finally:
self.unlockdb()
return retval