Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1527)

Unified Diff: download_from_google_storage.py

Issue 809123003: Fix setting the executable bit in download_from_google_storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: download_from_google_storage.py
diff --git a/download_from_google_storage.py b/download_from_google_storage.py
index f73b3bd0af547d1e808d52a30b553e1ccf5af47d..09be339d452bbaefbafd2055ecfe1458aa607e2d 100755
--- a/download_from_google_storage.py
+++ b/download_from_google_storage.py
@@ -248,15 +248,11 @@ def _downloader_worker_thread(thread_num, q, force, base_url,
elif sys.platform != 'win32':
# On non-Windows platforms, key off of the custom header
# "x-goog-meta-executable".
- #
- # TODO(hinoka): It is supposedly faster to use "gsutil stat" but that
- # doesn't appear to be supported by the gsutil currently in our tree. When
- # we update, this code should use that instead of "gsutil ls -L".
- code, out, _ = gsutil.check_call('ls', '-L', file_url)
+ code, out, _ = gsutil.check_call('stat', file_url)
if code != 0:
out_q.put('%d> %s' % (thread_num, err))
ret_codes.put((code, err))
- elif re.search('x-goog-meta-executable:', out):
+ elif re.search(r'executable:\s*1', out):
st = os.stat(output_filename)
os.chmod(output_filename, st.st_mode | stat.S_IEXEC)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698