mirror of https://gitlab.com/ita1024/waf.git
Another Python regression
This commit is contained in:
parent
c816802d87
commit
8971304c36
|
@ -40,7 +40,10 @@ else:
|
|||
with open(tf, 'wb') as f:
|
||||
f.write(pkgdata)
|
||||
with tarfile.open(tf) as f:
|
||||
f.extractall(tmp)
|
||||
if hasattr(tarfile, 'data_filter'):
|
||||
f.extractall(tmp, filter='data')
|
||||
else:
|
||||
f.extractall(tmp)
|
||||
os.remove(tf)
|
||||
os.rename(tmp, dest)
|
||||
finally:
|
||||
|
|
|
@ -100,7 +100,11 @@ def unpack_wafdir(dir, src):
|
|||
err("Waf cannot be unpacked, check that bzip2 support is present")
|
||||
|
||||
try:
|
||||
for x in t: t.extract(x)
|
||||
for x in t:
|
||||
if hasattr(tarfile, 'data_filter'):
|
||||
t.extract(x, filter='data')
|
||||
else:
|
||||
t.extract(x)
|
||||
finally:
|
||||
t.close()
|
||||
|
||||
|
|
|
@ -561,7 +561,10 @@ class DistCheck(Dist):
|
|||
|
||||
with tarfile.open(self.get_arch_name()) as t:
|
||||
for x in t:
|
||||
t.extract(x)
|
||||
if hasattr(tarfile, 'data_filter'):
|
||||
t.extract(x, filter='data')
|
||||
else:
|
||||
t.extract(x)
|
||||
|
||||
instdir = tempfile.mkdtemp('.inst', self.get_base_name())
|
||||
cmd = self.make_distcheck_cmd(instdir)
|
||||
|
|
|
@ -363,7 +363,10 @@ class package_reader(Context.Context):
|
|||
with tarfile.open(tmpfile) as f:
|
||||
temp = tempfile.mkdtemp(dir=pkgdir)
|
||||
try:
|
||||
f.extractall(temp)
|
||||
if hasattr(tarfile, 'data_filter'):
|
||||
f.extractall(temp, filter='data')
|
||||
else:
|
||||
f.extractall(temp)
|
||||
os.rename(temp, os.path.join(pkgdir, subdir))
|
||||
finally:
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue