aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hansson <hansson@google.com>2022-05-02 18:45:55 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-05-02 18:45:55 +0000
commited31f1642d462a186478ee69ca73079926e3bc4e (patch)
treeee17de0897bf36226dcd784467e4dfb943b12260
parent1b13d0457610418bb76bdcda5fa2789619ddae7c (diff)
parent43105674c4afcca2cd9117b7777faf79a948aa7d (diff)
downloadcommon-ed31f1642d462a186478ee69ca73079926e3bc4e.tar.gz
Merge "Address review comments on finalize_sdk.py" into tm-dev am: 52ef4e0e12 am: 43105674c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/common/+/18030543 Change-Id: I20c90538e036b675f1ccb9436b29b446bb09efef Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rwxr-xr-xtools/finalize_sdk.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/finalize_sdk.py b/tools/finalize_sdk.py
index 84fd762e..c045295e 100755
--- a/tools/finalize_sdk.py
+++ b/tools/finalize_sdk.py
@@ -90,9 +90,7 @@ build_target = BUILD_TARGET_TRAIN if args.bid[0] == 'T' else BUILD_TARGET_CONTIN
branch_name = 'finalize-%d' % args.finalize_sdk
cmdline = " ".join([x for x in sys.argv if x not in ['-a', '--amend_last_commit']])
commit_message = COMMIT_TEMPLATE % (args.finalize_sdk, args.bid, cmdline, args.bug)
-module_names = args.modules
-if not module_names:
- module_names = ['*']
+module_names = args.modules or ['*']
compat_dir = COMPAT_REPO.joinpath('extensions/%d' % args.finalize_sdk)
if compat_dir.is_dir():
@@ -112,8 +110,8 @@ for m in module_names:
with zipfile.ZipFile(tmpdir.joinpath(f)) as zipFile:
zipFile.extractall(target_dir)
- # Just capture the artifacts, not the bp files of finalized versions
- os.remove(target_dir.joinpath('Android.bp'))
+ # Disable the Android.bp, but keep it for reference / potential future use.
+ shutil.move(target_dir.joinpath('Android.bp'), target_dir.joinpath('Android.bp.auto'))
print('Created %s' % target_dir)
created_dirs[repo].add(dir)