Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit b44c5b7

Browse files
jgalmes2Gerrit Code Review
authored andcommitted
Merge "Implement directed recovery snapshot."
2 parents acffc6c + 8070a1a commit b44c5b7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vendor_snapshot/update.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,8 @@ def get_ninja_inputs(ninja_binary, ninja_build_file, modules):
512512
return inputs
513513

514514

515-
def check_module_usage(install_dir, ninja_binary, ninja_file, goals, output):
515+
def check_module_usage(install_dir, ninja_binary, image, ninja_file, goals,
516+
output):
516517
all_installed_files = find_all_installed_files(install_dir)
517518
all_props_files = find_all_props_files(install_dir)
518519

@@ -555,14 +556,14 @@ def check_module_usage(install_dir, ninja_binary, ninja_file, goals, output):
555556
for f, i in sorted(used_file_to_info.items()):
556557
logging.debug('{} {}'.format(f, i))
557558
for m in i:
558-
key = 'n=%s,v=%s,a=%s,c=%s,h=%s' % m
559559
(name, variation, arch, is_cfi, is_header) = m
560560
if not is_header:
561-
used_modules.add(key)
561+
used_modules.add(name)
562562

563563
with open(output, 'w') as f:
564+
f.write('%s_SNAPSHOT_MODULES := \\\n' % image.upper())
564565
for m in sorted(used_modules):
565-
f.write('%s\n' % m)
566+
f.write(' %s \\\n' % m)
566567

567568
def check_call(cmd):
568569
logging.debug('Running `{}`'.format(' '.join(cmd)))
@@ -738,7 +739,7 @@ def main():
738739
raise ValueError(
739740
'Please provide --check-module-usage-output option.')
740741

741-
check_module_usage(install_dir, ninja_binary,
742+
check_module_usage(install_dir, ninja_binary, args.image,
742743
args.check_module_usage_ninja_file,
743744
args.check_module_usage_goal,
744745
args.check_module_usage_output)

0 commit comments

Comments
 (0)