build_dir = EbuildBuildDir(scheduler=sched_iface,
settings=settings)
build_dir.lock()
+ current_task = None
try:
if existing_buildir:
clean_phase = EbuildPhase(background=False,
phase='clean', scheduler=sched_iface, settings=settings)
+ current_task = clean_phase
clean_phase.start()
clean_phase.wait()
verifier = BinpkgVerifier(pkg=x,
scheduler=sched_iface)
+ current_task = verifier
verifier.start()
if verifier.wait() != os.EX_OK:
failures += 1
phase="pretend", scheduler=sched_iface,
settings=settings)
+ current_task = pretend_phase
pretend_phase.start()
ret = pretend_phase.wait()
if ret != os.EX_OK:
failures += 1
portage.elog.elog_process(x.cpv, settings)
finally:
+ if current_task is not None and current_task.isAlive():
+ current_task.cancel()
clean_phase = EbuildPhase(background=False,
phase='clean', scheduler=sched_iface, settings=settings)
clean_phase.start()