summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico2012-11-11 17:57:52 (GMT)
committerZac Medico2012-11-11 17:57:52 (GMT)
commitd80c5799a59a0420301f215add4c75b7d5e14d73 (patch)
treec945c53f720e6499807f76728b46304e6ab94d23
parent228a860476d7543608b469c569ec1d4e70aa7f59 (diff)
pkg_pretend: keep temp on failure for bug #442536
-rw-r--r--pym/_emerge/Scheduler.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 99493ea..5714faf 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: