fixes #2879
This commit is contained in:
@@ -142,6 +142,8 @@ def finalize():
|
||||
if ctx.dbenv:
|
||||
ctx.dbenv.close()
|
||||
ctx.dbenv_lock.close()
|
||||
if ctx.build_leftover and os.path.exists(ctx.build_leftover):
|
||||
os.unlink(ctx.build_leftover)
|
||||
|
||||
ctx.ui.debug('PISI API finalized')
|
||||
ctx.ui.close()
|
||||
|
||||
@@ -814,6 +814,7 @@ class Builder:
|
||||
pkg.add_to_package(orgname, arcname)
|
||||
pkg.close()
|
||||
else: # default package format is 1.1, so make it fallback.
|
||||
ctx.build_leftover = join(self.pkg_dir(), "install.tar.lzma")
|
||||
tar = archive.ArchiveTar("install.tar.lzma", "tarlzma")
|
||||
for finfo in files.list:
|
||||
orgname = arcname = join("install", finfo.path)
|
||||
@@ -824,6 +825,7 @@ class Builder:
|
||||
pkg.add_to_package("install.tar.lzma")
|
||||
pkg.close()
|
||||
os.unlink("install.tar.lzma")
|
||||
ctx.build_leftover = None
|
||||
|
||||
os.chdir(c)
|
||||
self.set_state("buildpackages")
|
||||
|
||||
@@ -48,6 +48,12 @@ comar_sockname = None
|
||||
|
||||
initialized = False
|
||||
|
||||
# Bug #2879
|
||||
# FIXME: Maybe we can create a simple rollback mechanism. There are other
|
||||
# places which need this, too.
|
||||
# this is needed in build process to clean after if something goes wrong.
|
||||
build_leftover = None
|
||||
|
||||
#def register(_impl):
|
||||
# """ Register a UI implementation"""
|
||||
# ui = _impl
|
||||
|
||||
Reference in New Issue
Block a user