Commit d795ab89 authored by Jeremy Apthorp's avatar Jeremy Apthorp Committed by Commit Bot

Use system unzip on macOS

Modern macOS has no problem unzipping big zip files. To test:

$ gsutil cp gs://chromium-git-cache/chromium.googlesource.com-chromium-src/516491.zip test.zip
$ unzip -l test.zip

Change-Id: I84b3cff21cb9b7033c04b427e23f27a75ab1d8ae
Reviewed-on: https://chromium-review.googlesource.com/1152294
Commit-Queue: Jeremy Apthorp <jeremya@chromium.org>
Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
parent 3e65878e
...@@ -357,15 +357,12 @@ class Mirror(object): ...@@ -357,15 +357,12 @@ class Mirror(object):
""" """
if not self.bootstrap_bucket: if not self.bootstrap_bucket:
return False return False
python_fallback = False python_fallback = (
if (sys.platform.startswith('win') and (sys.platform.startswith('win') and
not gclient_utils.FindExecutable('7z')): not gclient_utils.FindExecutable('7z')) or
python_fallback = True (not gclient_utils.FindExecutable('unzip')) or
elif sys.platform.startswith('darwin'): ('ZIP64_SUPPORT' not in subprocess.check_output(["unzip", "-v"]))
# The OSX version of unzip doesn't support zip64. )
python_fallback = True
elif not gclient_utils.FindExecutable('unzip'):
python_fallback = True
gs_folder = 'gs://%s/%s' % (self.bootstrap_bucket, self.basedir) gs_folder = 'gs://%s/%s' % (self.bootstrap_bucket, self.basedir)
gsutil = Gsutil(self.gsutil_exe, boto_path=None) gsutil = Gsutil(self.gsutil_exe, boto_path=None)
......
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