From 29ec06b7ba5c3e87539c21ca21c8af5035b61828 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Wed, 15 Nov 2017 10:34:01 -0800 Subject: [PATCH] Silence superfluous build messages. Bug: 69315492 Test: it builds Change-Id: Ic02484b80fa27c53786204402930ed5f33ec7fda --- core/Makefile | 7 +++---- tools/generate-notice-files.py | 3 --- tools/releasetools/build_image.py | 11 ++++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/core/Makefile b/core/Makefile index 5bc632220f..162467836c 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1213,15 +1213,15 @@ RECOVERYIMAGE_ID_FILE := $(PRODUCT_OUT)/recovery.id # $(1): output file define build-recoveryimage-target - @echo ----- Making recovery image ------ + # Making recovery image $(hide) mkdir -p $(TARGET_RECOVERY_OUT) $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc $(TARGET_RECOVERY_ROOT_OUT)/sdcard $(TARGET_RECOVERY_ROOT_OUT)/tmp - @echo Copying baseline ramdisk... + # Copying baseline ramdisk... # Use rsync because "cp -Rf" fails to overwrite broken symlinks on Mac. $(hide) rsync -a --exclude=etc --exclude=sdcard $(IGNORE_RECOVERY_SEPOLICY) $(IGNORE_CACHE_LINK) $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) # Copy adbd from system/bin to recovery/root/sbin $(hide) cp -f $(TARGET_OUT_EXECUTABLES)/adbd $(TARGET_RECOVERY_ROOT_OUT)/sbin/adbd - @echo Modifying ramdisk contents... + # Modifying ramdisk contents... $(if $(BOARD_RECOVERY_KERNEL_MODULES), \ $(call build-image-kernel-modules,$(BOARD_RECOVERY_KERNEL_MODULES),$(TARGET_RECOVERY_ROOT_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_recovery))) # Removes $(TARGET_RECOVERY_ROOT_OUT)/init*.rc EXCEPT init.recovery*.rc. @@ -1273,7 +1273,6 @@ define build-recoveryimage-target $(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)), \ $(hide) $(call assert-max-image-size,$(1),$(BOARD_BOOTIMAGE_PARTITION_SIZE)), \ $(hide) $(call assert-max-image-size,$(1),$(BOARD_RECOVERYIMAGE_PARTITION_SIZE))) - @echo ----- Made recovery image: $(1) -------- endef ADBD := $(TARGET_OUT_EXECUTABLES)/adbd diff --git a/tools/generate-notice-files.py b/tools/generate-notice-files.py index adbf7c2315..b754174a9f 100755 --- a/tools/generate-notice-files.py +++ b/tools/generate-notice-files.py @@ -253,15 +253,12 @@ def main(argv): filesets = [sorted(files_with_same_hash[md5]) for md5 in sorted(files_with_same_hash.keys())] - print "Combining NOTICE files into text" combine_notice_files_text(filesets, input_dir, txt_output_file, file_title) if html_output_file is not None: - print "Combining NOTICE files into HTML" combine_notice_files_html(filesets, input_dir, html_output_file) if xml_output_file is not None: - print "Combining NOTICE files into XML" combine_notice_files_xml(files_with_same_hash, input_dir, xml_output_file) if __name__ == "__main__": diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index a388f8a2d3..e11f5a63f2 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -195,8 +195,9 @@ def AdjustPartitionSizeForVerity(partition_size, fec_supported): else: hi = i - print("Adjusted partition size for verity, partition_size: {}," - " verity_size: {}".format(result, verity_size)) + if OPTIONS.verbose: + print("Adjusted partition size for verity, partition_size: {}," + " verity_size: {}".format(result, verity_size)) AdjustPartitionSizeForVerity.results[key] = (result, verity_size) return (result, verity_size) @@ -257,7 +258,7 @@ def Append2Simg(sparse_image_path, unsparse_image_path, error_message): return True def Append(target, file_to_append, error_message): - print "appending %s to %s" % (file_to_append, target) + # appending file_to_append to target with open(target, "a") as out_file: with open(file_to_append, "r") as input_file: for line in input_file: @@ -535,9 +536,9 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None): try: if fs_type.startswith("ext4"): - (ext4fs_output, exit_code) = RunCommand(build_command, True) + (ext4fs_output, exit_code) = RunCommand(build_command) else: - (_, exit_code) = RunCommand(build_command, True) + (_, exit_code) = RunCommand(build_command) finally: if in_dir != origin_in: # Clean up temporary directories and files.