mycat = None
mypkg = None
did_merge_phase = False
+ success = False
try:
""" Don't lock the tbz2 file because the filesytem could be readonly or
shared by a cluster."""
retval = mylink.merge(pkgloc, infloc, myroot, myebuild, cleanup=0,
mydbapi=mydbapi, prev_mtimes=prev_mtimes)
did_merge_phase = True
+ success = retval == os.EX_OK
return retval
finally:
mysettings.pop("PORTAGE_BINPKG_FILE", None)
from portage.elog import elog_process
elog_process(mycat + "/" + mypkg, mysettings)
try:
- shutil.rmtree(builddir)
+ if success:
+ shutil.rmtree(builddir)
except (IOError, OSError), e:
if e.errno != errno.ENOENT:
raise