Kaydet (Commit) 727ba796 authored tarafından Fatih Aşıcı's avatar Fatih Aşıcı

install: Read install.tar.lzma without extracting it

Do not waste time/space for extracting it from ZIP archive.
üst 86598d32
......@@ -120,17 +120,12 @@ class Package:
if self.impl.has_file(ctx.const.install_tar_lzma):
lzmafile = os.path.join(ctx.config.tmp_dir(), ctx.const.install_tar_lzma)
self.extract_file(ctx.const.install_tar_lzma, ctx.config.tmp_dir())
tar = archive.ArchiveTar(lzmafile, 'tarlzma', False, False)
lzmafile = self.impl.open(ctx.const.install_tar_lzma)
tar = archive.ArchiveTar(fileobj=lzmafile,
arch_type="tarlzma",
no_same_permissions=False,
no_same_owner=False)
tar.unpack_dir(outdir, callback=callback)
# cleanup install.tar.lzma and install.tar after installing
if os.path.exists(lzmafile):
os.unlink(lzmafile)
lzmafile = util.remove_suffix(ctx.const.lzma_suffix, lzmafile)
if os.path.exists(lzmafile):
os.unlink(lzmafile)
else:
self.extract_dir_flat('install', outdir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment