aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hansson <hansson@google.com>2022-05-02 17:45:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-05-02 17:45:58 +0000
commit43105674c4afcca2cd9117b7777faf79a948aa7d (patch)
treeee17de0897bf36226dcd784467e4dfb943b12260
parent0102c8df0e99e6cccaa8db1815a23a62797b20e0 (diff)
parent52ef4e0e12eb21d3fc2dac0f99a0ba442a177b3f (diff)
downloadcommon-43105674c4afcca2cd9117b7777faf79a948aa7d.tar.gz
Merge "Address review comments on finalize_sdk.py" into tm-dev am: 52ef4e0e12
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/common/+/18030543 Change-Id: I64a9cd757216839f557011e14998af32e8ae2d88 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)