fix: makedirs problem while unpacking to /

This commit is contained in:
Faik Uygur
2006-05-23 08:37:17 +00:00
parent 6ad14d2732
commit e2f243809a
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -74,9 +74,10 @@ class ArchiveTar(ArchiveBase):
def unpack(self, target_dir, clean_dir = False):
"""Unpack tar archive to a given target directory(target_dir)."""
# FIX: do we need this for tar archives?
# super(ArchiveTar, self).unpack(target_dir, clean_dir)
super(ArchiveTar, self).unpack(target_dir, clean_dir)
self.unpack_dir(target_dir)
def unpack_dir(self, target_dir):
rmode = ""
if self.type == 'tar':
rmode = 'r:'
+1 -1
View File
@@ -120,7 +120,7 @@ class Package:
def extract_install(self, outdir):
self.extract_file('install.tar.lzma', ctx.config.tmp_dir())
tar = archive.ArchiveTar(join(ctx.config.tmp_dir(), 'install.tar.lzma'), 'tarlzma')
tar.unpack(outdir)
tar.unpack_dir(outdir)
def extract_dir_flat(self, dir, outdir):
"""Extract directory recursively, this function