Commit 737a0c6b authored by Julien Muchembled's avatar Julien Muchembled

downloadunpacked: fix extraction of symlinks when using an external decompressor

parent f7bfa146
Pipeline #21963 passed with stage
in 0 seconds
......@@ -29,6 +29,7 @@ import os
import subprocess
import tarfile
import tempfile
from functools import partial
from setuptools import archive_util
from . import is_true, EnvironMixin, Shared
......@@ -118,8 +119,8 @@ def unpack_archive(recipe, *args):
with tempfile.NamedTemporaryFile() as uncompressed_archive:
subprocess.check_call(cmd + (filename,),
stdout=uncompressed_archive, env=recipe.environ)
archive_util.unpack_archive(
uncompressed_archive.name, extract_dir, progress_filter)
unpack_archive(uncompressed_archive.name,
extract_dir, progress_filter)
return True
raise archive_util.UnrecognizedFormat(
"%s is not a compressed or uncompressed tar file" % (filename,)
......@@ -149,5 +150,6 @@ def unpack_archive(recipe, *args):
pass
return True
return archive_util.unpack_archive(*args,
unpack_archive = partial(archive_util.unpack_archive,
drivers = archive_util.extraction_drivers[:2] + (unpack_tarfile_patched,))
return unpack_archive(*args)
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