Fixup: Display curl output when downloading chroot tarball.
Currently, curl is used to download the chroot tarball. However,
we do not get any progress information from it. This CL displays
the output of curl so users know how long it will take to
download the tarball.
BUG=none
TEST=manual test
Change-Id: I0b1e5180054521e30e62aad31ab509a24d7329e0
Reviewed-on: https://chromium-review.googlesource.com/276244
Reviewed-by: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Ralph Nathan <ralphnathan@chromium.org>
Commit-Queue: Ralph Nathan <ralphnathan@chromium.org>
Trybot-Ready: Ralph Nathan <ralphnathan@chromium.org>
diff --git a/scripts/cros_sdk.py b/scripts/cros_sdk.py
index d6613b0..d4442fb 100644
--- a/scripts/cros_sdk.py
+++ b/scripts/cros_sdk.py
@@ -132,8 +132,8 @@
content_length = 0
logging.debug('Attempting download from %s', url)
result = retry_util.RunCurl(
- ['-I', url], fail=False, redirect_stdout=True, redirect_stderr=True,
- print_cmd=False)
+ ['-I', url], fail=False, capture_output=False, redirect_stdout=True,
+ redirect_stderr=True, print_cmd=False, debug_level=logging.NOTICE)
successful = False
for header in result.output.splitlines():
# We must walk the output to find the string '200 OK' for use cases where
@@ -162,7 +162,7 @@
if current_size < content_length:
retry_util.RunCurl(
['-L', '-y', '30', '-C', '-', '--output', tarball_dest, url],
- print_cmd=False)
+ print_cmd=False, capture_output=False, debug_level=logging.NOTICE)
# Cleanup old tarballs now since we've successfull fetched; only cleanup
# the tarballs for our prefix, or unknown ones. This gets a bit tricky