summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOussama Ben Abdelbaki <obenabde@google.com>2019-02-06 10:54:42 -0500
committerOussama Ben Abdelbaki <obenabde@google.com>2019-02-06 16:23:32 +0000
commit45deb1cf7d8e82923a088f75bf263c75b30f7876 (patch)
tree8cfdbab51bed5e49f7e3a84ac398a4a1cbf0c5db
parent4793b9e12c0286975bc692079a47b2617672bff3 (diff)
downloadsdk-45deb1cf7d8e82923a088f75bf263c75b30f7876.tar.gz
Print the command being ran in fetch.
Error message being printed is regardless of the actual error. Knowing the command that was run means the user can run it locally and see the actual error for themselves. Also updates target names from "support_library" to "androidx", and the m2repository file name to the correct one as well. Test: just run it. Change-Id: I2916fb1dd5dd311f850823d209b099ce9b4e5706
-rwxr-xr-xupdate_prebuilts/update_prebuilts.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/update_prebuilts/update_prebuilts.py b/update_prebuilts/update_prebuilts.py
index 9c8674bbb..c4f1edcdc 100755
--- a/update_prebuilts/update_prebuilts.py
+++ b/update_prebuilts/update_prebuilts.py
@@ -519,6 +519,7 @@ def fetch_artifact(target, build_id, artifact_path):
os.makedirs(download_to)
fetch_cmd = [FETCH_ARTIFACT, '--bid', str(build_id), '--target', target, artifact_path,
download_to]
+ print("Running: " + ' '.join(fetch_cmd))
try:
subprocess.check_output(fetch_cmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
@@ -569,7 +570,7 @@ def update_support(target, build_id, local_file):
def update_androidx(target, build_id, local_file):
if build_id:
- repo_file = 'top-of-tree-m2repository-%s.zip' % build_id.fs_id
+ repo_file = 'top-of-tree-m2repository-all-%s.zip' % build_id.fs_id
repo_dir = fetch_and_extract(target, build_id.url_id, repo_file, None)
else:
repo_dir = fetch_and_extract(target, None, None, local_file)
@@ -861,20 +862,20 @@ try:
print_e('Failed to update Constraint Layout X, aborting...')
sys.exit(1)
if args.support:
- if update_support('support_library', getBuildId(args), getFile(args)):
+ if update_support('androidx', getBuildId(args), getFile(args)):
components = append(components, 'Support Library')
else:
print_e('Failed to update Support Library, aborting...')
sys.exit(1)
if args.androidx:
- if update_androidx('support_library', \
+ if update_androidx('androidx', \
getBuildId(args), getFile(args)):
components = append(components, 'AndroidX')
else:
print_e('Failed to update AndroidX, aborting...')
sys.exit(1)
if args.jetifier:
- if update_jetifier('support_library', getBuildId(args)):
+ if update_jetifier('androidx', getBuildId(args)):
components = append(components, 'Jetifier')
else:
print_e('Failed to update Jetifier, aborting...')