This commit is contained in:
Faik Uygur
2006-06-02 20:09:03 +00:00
parent 1086534ccd
commit 1442e9ecdc
3 changed files with 10 additions and 0 deletions
+2
View File
@@ -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()
+2
View File
@@ -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")
+6
View File
@@ -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