summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 3244fa4ee..a424dea0a 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -4403,17 +4403,23 @@ class dblink(object):
retval = self.treewalk(mergeroot, myroot, inforoot, myebuild,
cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
- if retval == os.EX_OK:
- phase = 'success_hooks'
- else:
- phase = 'die_hooks'
+ # If PORTAGE_BUILDDIR doesn't exist, then it probably means
+ # fail-clean is enabled, and the success/die hooks have
+ # already been called by _emerge.EbuildPhase (via
+ # self._scheduler.dblinkEbuildPhase) prior to cleaning.
+ if os.path.isdir(self.settings['PORTAGE_BUILDDIR']):
+
+ if retval == os.EX_OK:
+ phase = 'success_hooks'
+ else:
+ phase = 'die_hooks'
- if self._scheduler is None:
- portage._spawn_misc_sh(self.settings, [phase],
- phase=phase)
- else:
- self._scheduler.dblinkEbuildPhase(
- self, mydbapi, myebuild, phase)
+ if self._scheduler is None:
+ portage._spawn_misc_sh(self.settings, [phase],
+ phase=phase)
+ else:
+ self._scheduler.dblinkEbuildPhase(
+ self, mydbapi, myebuild, phase)
# Process ebuild logfiles
elog_process(self.mycpv, self.settings, phasefilter=filter_mergephases)