Merge "Implement directed recovery snapshot." am: b44c5b747c
Original change: https://android-review.googlesource.com/c/platform/development/+/1579217 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I2ed083cd79836725f69ad43d2f2e0513ca07034f
This commit is contained in:
committed by
Automerger Merge Worker
commit
d2f9cd048d
@@ -512,7 +512,8 @@ def get_ninja_inputs(ninja_binary, ninja_build_file, modules):
|
|||||||
return inputs
|
return inputs
|
||||||
|
|
||||||
|
|
||||||
def check_module_usage(install_dir, ninja_binary, ninja_file, goals, output):
|
def check_module_usage(install_dir, ninja_binary, image, ninja_file, goals,
|
||||||
|
output):
|
||||||
all_installed_files = find_all_installed_files(install_dir)
|
all_installed_files = find_all_installed_files(install_dir)
|
||||||
all_props_files = find_all_props_files(install_dir)
|
all_props_files = find_all_props_files(install_dir)
|
||||||
|
|
||||||
@@ -555,14 +556,14 @@ def check_module_usage(install_dir, ninja_binary, ninja_file, goals, output):
|
|||||||
for f, i in sorted(used_file_to_info.items()):
|
for f, i in sorted(used_file_to_info.items()):
|
||||||
logging.debug('{} {}'.format(f, i))
|
logging.debug('{} {}'.format(f, i))
|
||||||
for m in i:
|
for m in i:
|
||||||
key = 'n=%s,v=%s,a=%s,c=%s,h=%s' % m
|
|
||||||
(name, variation, arch, is_cfi, is_header) = m
|
(name, variation, arch, is_cfi, is_header) = m
|
||||||
if not is_header:
|
if not is_header:
|
||||||
used_modules.add(key)
|
used_modules.add(name)
|
||||||
|
|
||||||
with open(output, 'w') as f:
|
with open(output, 'w') as f:
|
||||||
|
f.write('%s_SNAPSHOT_MODULES := \\\n' % image.upper())
|
||||||
for m in sorted(used_modules):
|
for m in sorted(used_modules):
|
||||||
f.write('%s\n' % m)
|
f.write(' %s \\\n' % m)
|
||||||
|
|
||||||
def check_call(cmd):
|
def check_call(cmd):
|
||||||
logging.debug('Running `{}`'.format(' '.join(cmd)))
|
logging.debug('Running `{}`'.format(' '.join(cmd)))
|
||||||
@@ -738,7 +739,7 @@ def main():
|
|||||||
raise ValueError(
|
raise ValueError(
|
||||||
'Please provide --check-module-usage-output option.')
|
'Please provide --check-module-usage-output option.')
|
||||||
|
|
||||||
check_module_usage(install_dir, ninja_binary,
|
check_module_usage(install_dir, ninja_binary, args.image,
|
||||||
args.check_module_usage_ninja_file,
|
args.check_module_usage_ninja_file,
|
||||||
args.check_module_usage_goal,
|
args.check_module_usage_goal,
|
||||||
args.check_module_usage_output)
|
args.check_module_usage_output)
|
||||||
|
|||||||
Reference in New Issue
Block a user