From: Zac Medico Date: Sun, 11 Nov 2012 17:57:52 +0000 (-0800) Subject: pkg_pretend: keep temp on failure for bug #442536 X-Git-Tag: v2.2.0_alpha143~44 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d80c5799a59a0420301f215add4c75b7d5e14d73;p=portage.git pkg_pretend: keep temp on failure for bug #442536 --- diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 99493ea6a..5714faf7d 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -905,13 +905,18 @@ class Scheduler(PollScheduler): failures += 1 portage.elog.elog_process(x.cpv, settings) finally: - if current_task is not None and current_task.isAlive(): - current_task.cancel() - current_task.wait() - clean_phase = EbuildPhase(background=False, - phase='clean', scheduler=sched_iface, settings=settings) - clean_phase.start() - clean_phase.wait() + + if current_task is not None: + if current_task.isAlive(): + current_task.cancel() + current_task.wait() + if current_task.returncode == os.EX_OK: + clean_phase = EbuildPhase(background=False, + phase='clean', scheduler=sched_iface, + settings=settings) + clean_phase.start() + clean_phase.wait() + build_dir.unlock() if failures: