| Index: dependency_manager/dependency_manager/dependency_manager_util.py
|
| diff --git a/dependency_manager/dependency_manager/dependency_manager_util.py b/dependency_manager/dependency_manager/dependency_manager_util.py
|
| index 7ec2ec632a9f4a49f2d4f4fae3eda64d43f5d03e..ca0174e01dd5b940c23f4bc2023fb792c2af9ff2 100644
|
| --- a/dependency_manager/dependency_manager/dependency_manager_util.py
|
| +++ b/dependency_manager/dependency_manager/dependency_manager_util.py
|
| @@ -5,6 +5,7 @@
|
| import os
|
| import shutil
|
| import stat
|
| +import subprocess
|
| import sys
|
| import zipfile_2_7_13 as zipfile
|
|
|
| @@ -87,6 +88,15 @@ def UnzipArchive(archive_path, unzip_path):
|
| 'Attempting to unzip a non-archive file at %s' % archive_path)
|
| if not os.path.exists(unzip_path):
|
| os.makedirs(unzip_path)
|
| + # The Python ZipFile does not support symbolic links, which makes it
|
| + # unsuitable for Mac builds. so use ditto instead. crbug.com/700097.
|
| + if sys.platform.startswith('darwin'):
|
| + assert os.path.isabs(unzip_path)
|
| + unzip_cmd = ['ditto', '-x', '-k', archive_path, unzip_path]
|
| + proc = subprocess.Popen(unzip_cmd, bufsize=0, stdout=subprocess.PIPE,
|
| + stderr=subprocess.PIPE)
|
| + proc.communicate()
|
| + return
|
| try:
|
| with zipfile.ZipFile(archive_path, 'r') as archive:
|
| VerifySafeArchive(archive)
|
|
|